summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-09-25 14:14:04 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-09-25 14:14:04 +0200
commit40f7d5cf7d5353dba29ebcde2d1a51fc66fb33fb (patch)
tree7bb277cdc06ad91bcfe20fa77852288123f0e880
parentdf811cf76c341ec89451dfa8024cafbc12f99887 (diff)
downloadrtems-libbsd-40f7d5cf7d5353dba29ebcde2d1a51fc66fb33fb.tar.bz2
builder.py: addTargetSourceCPUDependentSourceFiles
Avoid and delete this function.
-rwxr-xr-xbuilder.py19
-rwxr-xr-xlibbsd.py37
-rw-r--r--wscript25
3 files changed, 29 insertions, 52 deletions
diff --git a/builder.py b/builder.py
index 8059475c..1f37bc9b 100755
--- a/builder.py
+++ b/builder.py
@@ -450,23 +450,14 @@ class Module:
RTEMSPathComposer(), NoConverter(), NoConverter(),
assertSourceFile, sourceFileFragmentComposer)
- def addCPUDependentSourceFiles(self, cpu, files, sourceFileFragmentComposer):
- self.initCPUDependencies(cpu)
- self.cpuDependentSourceFiles[cpu] += \
- self.addFiles(files,
- CPUDependentPathComposer(), FromFreeBSDToRTEMSSourceConverter(),
- FromRTEMSToFreeBSDSourceConverter(), assertSourceFile,
- sourceFileFragmentComposer)
-
- def addTargetSourceCPUDependentSourceFiles(self, targetCPUs, sourceCPU, files,
- sourceFileFragmentComposer):
- for cpu in targetCPUs:
+ def addCPUDependentSourceFiles(self, cpus, files, sourceFileFragmentComposer):
+ for cpu in cpus:
self.initCPUDependencies(cpu)
self.cpuDependentSourceFiles[cpu] += \
self.addFiles(files,
- TargetSourceCPUDependentPathComposer(cpu, sourceCPU),
- FromFreeBSDToRTEMSSourceConverter(), NoConverter(),
- assertSourceFile, sourceFileFragmentComposer)
+ CPUDependentPathComposer(), FromFreeBSDToRTEMSSourceConverter(),
+ FromRTEMSToFreeBSDSourceConverter(), assertSourceFile,
+ sourceFileFragmentComposer)
def addTest(self, testFragementComposer):
self.files += [File(testFragementComposer.testName,
diff --git a/libbsd.py b/libbsd.py
index 24d4606a..3f83cc32 100755
--- a/libbsd.py
+++ b/libbsd.py
@@ -1743,7 +1743,7 @@ def pci(mm):
]
)
mod.addCPUDependentSourceFiles(
- 'i386',
+ [ 'i386' ],
[
'sys/i386/i386/legacy.c',
'sys/x86/pci/pci_bus.c',
@@ -2367,48 +2367,35 @@ def in_cksum(mm):
'sys/mips/include/in_cksum.h',
]
)
- mod.addTargetSourceCPUDependentSourceFiles(
- [ 'arm', 'avr', 'bfin', 'h8300', 'lm32', 'm32c', 'm32r', 'm68k',
- 'nios2', 'sh', 'sparc', 'v850' ],
- 'mips',
- [
- 'sys/mips/mips/in_cksum.c',
- ],
- mm.generator['source']()
- )
mod.addCPUDependentSourceFiles(
- 'i386',
+ [ 'i386' ],
[
'sys/i386/i386/in_cksum.c',
],
mm.generator['source']()
)
mod.addCPUDependentSourceFiles(
- 'mips',
- [
- 'sys/mips/mips/in_cksum.c',
- ],
- mm.generator['source']()
- )
- mod.addCPUDependentSourceFiles(
- 'powerpc',
+ [ 'powerpc' ],
[
'sys/powerpc/powerpc/in_cksum.c',
],
mm.generator['source']()
)
mod.addCPUDependentSourceFiles(
- 'sparc',
+ [ 'sparc64' ],
[
- 'sys/mips/mips/in_cksum.c',
+ 'sys/sparc64/sparc64/in_cksum.c',
],
mm.generator['source']()
)
mod.addCPUDependentSourceFiles(
- 'sparc64',
- [
- 'sys/sparc64/sparc64/in_cksum.c',
- ],
+ [
+ 'arm', 'avr', 'bfin', 'h8300', 'lm32', 'm32c', 'm32r', 'm68k',
+ 'mips', 'nios2', 'sh', 'sparc', 'v850'
+ ],
+ [
+ 'sys/mips/mips/in_cksum.c',
+ ],
mm.generator['source']()
)
return mod
diff --git a/wscript b/wscript
index 673479f4..88334e44 100644
--- a/wscript
+++ b/wscript
@@ -1053,42 +1053,41 @@ def build(bld):
'rtemsbsd/telnetd/pty.c',
'rtemsbsd/telnetd/telnetd.c']
if bld.get_env()["RTEMS_ARCH"] == "arm":
- source += ['freebsd/sys/arm/arm/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "avr":
- source += ['freebsd/sys/avr/avr/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "bfin":
- source += ['freebsd/sys/bfin/bfin/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "cflags":
source += ['default']
if bld.get_env()["RTEMS_ARCH"] == "h8300":
- source += ['freebsd/sys/h8300/h8300/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "i386":
source += ['freebsd/sys/i386/i386/in_cksum.c',
'freebsd/sys/i386/i386/legacy.c',
'freebsd/sys/x86/pci/pci_bus.c']
if bld.get_env()["RTEMS_ARCH"] == "lm32":
- source += ['freebsd/sys/lm32/lm32/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "m32c":
- source += ['freebsd/sys/m32c/m32c/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "m32r":
- source += ['freebsd/sys/m32r/m32r/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "m68k":
- source += ['freebsd/sys/m68k/m68k/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "mips":
source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "nios2":
- source += ['freebsd/sys/nios2/nios2/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "powerpc":
source += ['freebsd/sys/powerpc/powerpc/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "sh":
- source += ['freebsd/sys/sh/sh/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "sparc":
- source += ['freebsd/sys/mips/mips/in_cksum.c',
- 'freebsd/sys/sparc/sparc/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "sparc64":
source += ['freebsd/sys/sparc64/sparc64/in_cksum.c']
if bld.get_env()["RTEMS_ARCH"] == "v850":
- source += ['freebsd/sys/v850/v850/in_cksum.c']
+ source += ['freebsd/sys/mips/mips/in_cksum.c']
bld.stlib(target = "bsd",
features = "c cxx",
cflags = cflags,