[PATCH v3 2/3] amd64: Add to build

Jan Sommer jan.sommer at dlr.de
Tue Feb 11 12:06:51 UTC 2020


---
 libbsd.py     | 14 ++++++++++++++
 waf_libbsd.py |  4 ++++
 2 files changed, 18 insertions(+)

diff --git a/libbsd.py b/libbsd.py
index 3823c03f..15d3da86 100644
--- a/libbsd.py
+++ b/libbsd.py
@@ -1548,6 +1548,7 @@ class dev_nic(builder.Module):
                 'sys/sys/buf.h',
                 'sys/sys/mqueue.h',
                 'sys/sys/user.h',
+                'sys/sys/efi.h',
             ]
         )
         self.addCPUDependentFreeBSDHeaderFiles(
@@ -1559,6 +1560,11 @@ class dev_nic(builder.Module):
                 'sys/x86/include/intr_machdep.h',
                 'sys/x86/include/metadata.h',
                 'sys/i386/include/cpufunc.h',
+                'sys/amd64/include/specialreg.h',
+                'sys/amd64/include/md_var.h',
+                'sys/amd64/include/efi.h',
+                'sys/amd64/include/_bus.h',
+                'sys/amd64/include/cpufunc.h',
                 'sys/mips/include/cpufunc.h',
                 'sys/mips/include/cpuregs.h',
                 'sys/powerpc/include/cpufunc.h',
@@ -4993,6 +4999,7 @@ class in_cksum(builder.Module):
         self.addCPUDependentFreeBSDHeaderFiles(
             [
                 'sys/i386/include/in_cksum.h',
+                'sys/amd64/include/in_cksum.h',
                 'sys/mips/include/in_cksum.h',
                 'sys/powerpc/include/in_cksum.h',
                 'sys/sparc64/include/in_cksum.h',
@@ -5013,6 +5020,13 @@ class in_cksum(builder.Module):
             ],
             mm.generator['source']()
         )
+        self.addCPUDependentFreeBSDSourceFiles(
+            [ 'x86_64' ],
+            [
+                'sys/amd64/amd64/in_cksum.c',
+            ],
+            mm.generator['source']()
+        )
         self.addCPUDependentFreeBSDSourceFiles(
             [ 'powerpc' ],
             [
diff --git a/waf_libbsd.py b/waf_libbsd.py
index 84f22b76..3b1f2d16 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -197,6 +197,10 @@ class Builder(builder.ModuleManager):
         if 'cpu-include-paths' in config:
             cpu = bld.get_env()['RTEMS_ARCH']
             if cpu == "i386":
+                cpu = 'i386'
+                includes += ['freebsd/sys/x86/include']
+            if cpu == "x86_64":
+                cpu = 'amd64'
                 includes += ['freebsd/sys/x86/include']
             for i in config['cpu-include-paths']:
                 includes += [i.replace('@CPU@', cpu)]
-- 
2.17.1



More information about the devel mailing list