diff options
Diffstat (limited to 'rtems-ld.cpp')
-rw-r--r-- | rtems-ld.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/rtems-ld.cpp b/rtems-ld.cpp index 302dc50..189e699 100644 --- a/rtems-ld.cpp +++ b/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. */ |