diff options
author | Chris Johns <chrisj@rtems.org> | 2014-09-05 18:18:11 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-09-05 18:18:11 +1000 |
commit | 31bf37564b273a085f1fbda47b0b55fe8c913736 (patch) | |
tree | 0f59ade95de29d38db357b23348fc3004f4a0bcf /linkers/rtems-ld.cpp | |
parent | Add support for RTEMS BSP or user supplied CFLAGS. Remove march/mcpu. (diff) | |
download | rtems-tools-31bf37564b273a085f1fbda47b0b55fe8c913736.tar.bz2 |
Remove march/mcpu and add RTEMS BSP and cflags support.
Diffstat (limited to 'linkers/rtems-ld.cpp')
-rw-r--r-- | linkers/rtems-ld.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/linkers/rtems-ld.cpp b/linkers/rtems-ld.cpp index 302dc50..189e699 100644 --- a/linkers/rtems-ld.cpp +++ b/linkers/rtems-ld.cpp @@ -42,6 +42,7 @@ #include <rld-outputter.h> #include <rld-process.h> #include <rld-resolver.h> +#include <rld-rtems.h> #ifndef HAVE_KILL #define kill(p,s) raise(s) @@ -73,6 +74,8 @@ static struct option rld_opts[] = { { "rpath", required_argument, NULL, 'R' }, { "runtime-lib", required_argument, NULL, 'P' }, { "one-file", no_argument, NULL, 's' }, + { "rtems", required_argument, NULL, 'r' }, + { "rtems-bsp", required_argument, NULL, 'B' }, { NULL, 0, NULL, 0 } }; @@ -117,6 +120,8 @@ usage (int exit_code) << " -P : place objects from archives (also --runtime-lib)" << std::endl << " -s : Include archive elf object files (also --one-file)" << std::endl << " -Wl,opts : link compatible flags, ignored" << std::endl + << " -r path : RTEMS path (also --rtems)" << std::endl + << " -B bsp : RTEMS arch/bsp (also --rtems-bsp)" << std::endl << "Output Formats:" << std::endl << " rap - RTEMS application (LZ77, single image)" << std::endl << " elf - ELF application (script, ELF files)" << std::endl @@ -192,12 +197,13 @@ main (int argc, char* argv[]) bool map = false; bool warnings = false; bool one_file = false; + bool arch_bsp_load = false; libpaths.push_back ("."); while (true) { - int opt = ::getopt_long (argc, argv, "hvwVMnsSb:E:o:O:L:l:c:e:d:u:C:W:R:P:", rld_opts, NULL); + int opt = ::getopt_long (argc, argv, "hvwVMnsSb:E:o:O:L:l:c:e:d:u:C:W:R:P:r:B:", rld_opts, NULL); if (opt < 0) break; @@ -305,6 +311,15 @@ main (int argc, char* argv[]) /* ignore linker compatiable flags */ break; + case 'r': + rld::rtems::path = optarg; + break; + + case 'B': + rld::rtems::arch_bsp = optarg; + arch_bsp_load = true; + break; + case '?': usage (3); break; @@ -337,6 +352,12 @@ main (int argc, char* argv[]) throw rld::error ("invalid output format", "options"); /* + * Load the arch/bsp value if provided. + */ + if (arch_bsp_load) + rld::rtems::load_cc (); + + /* * Load the remaining command line arguments into the cache as object * files. */ |