summaryrefslogtreecommitdiff
path: root/linkers/wscript
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-08-01 16:44:32 +1000
committerChris Johns <chrisj@rtems.org>2014-08-01 16:48:09 +1000
commitea299027e85c686b8f36b2564ada99803708b373 (patch)
tree836d1ef216ac9faf911c3f29e5e9a6a6a16552f9 /linkers/wscript
parent2ce23a3d6ff611de42493fe389901d5346f56beb (diff)
Add initial support for the RTEM Trace Linker.
The RTEMS Trace Linker or rtems-rld creates an RTEMS executable with trace support built in without any changes the existing code. This commit is an initial starting point with function signatures being read from INI files.
Diffstat (limited to 'linkers/wscript')
-rw-r--r--linkers/wscript47
1 files changed, 35 insertions, 12 deletions
diff --git a/linkers/wscript b/linkers/wscript
index a7cfb96..c6d1d31 100644
--- a/linkers/wscript
+++ b/linkers/wscript
@@ -91,14 +91,11 @@ def build(bld):
bld_libiberty(bld)
#
- # The list of modules.
- #
- modules = ['fastlz', 'elf', 'iberty']
-
- #
# RLD source.
#
- rld_source = ['rld-elf.cpp',
+ rld_source = ['ConvertUTF.c',
+ 'rld-config.cpp',
+ 'rld-elf.cpp',
'rld-files.cpp',
'rld-cc.cpp',
'rld-compression.cpp',
@@ -115,11 +112,26 @@ def build(bld):
rtems_utils = ['rtems-utils.cpp']
#
+ # RTL static library
+ #
+ bld.stlib(target = 'rld',
+ source = rld_source + rtems_utils,
+ defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
+ includes = ['.'] + bld.includes,
+ cflags = bld.cflags + bld.warningflags,
+ cxxflags = bld.cxxflags + bld.warningflags,
+ linkflags = bld.linkflags)
+
+ #
+ # The list of modules.
+ #
+ modules = ['rld', 'fastlz', 'elf', 'iberty']
+
+ #
# Build the linker.
#
bld.program(target = 'rtems-ld',
- source = ['rtems-ld.cpp',
- 'pkgconfig.cpp'] + rld_source,
+ source = ['rtems-ld.cpp', 'pkgconfig.cpp'],
defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
includes = ['.'] + bld.includes,
cflags = bld.cflags + bld.warningflags,
@@ -131,8 +143,19 @@ def build(bld):
# Build the ra linker.
#
bld.program(target = 'rtems-ra',
- source = ['rtems-ra.cpp',
- 'pkgconfig.cpp'] + rld_source,
+ source = ['rtems-ra.cpp', 'pkgconfig.cpp'],
+ defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
+ includes = ['.'] + bld.includes,
+ cflags = bld.cflags + bld.warningflags,
+ cxxflags = bld.cxxflags + bld.warningflags,
+ linkflags = bld.linkflags,
+ use = modules)
+
+ #
+ # Build the trace linker.
+ #
+ bld.program(target = 'rtems-tld',
+ source = ['rtems-tld.cpp'],
defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
includes = ['.'] + bld.includes,
cflags = bld.cflags + bld.warningflags,
@@ -144,7 +167,7 @@ def build(bld):
# Build the symbols.
#
bld.program(target = 'rtems-syms',
- source = ['rtems-syms.cpp'] + rld_source,
+ source = ['rtems-syms.cpp'],
defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
includes = ['.'] + bld.includes,
cflags = bld.cflags + bld.warningflags,
@@ -156,7 +179,7 @@ def build(bld):
# Build the RAP utility.
#
bld.program(target = 'rtems-rap',
- source = ['rtems-rapper.cpp'] + rld_source + rtems_utils,
+ source = ['rtems-rapper.cpp'],
defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
includes = ['.'] + bld.includes,
cflags = bld.cflags + bld.warningflags,