summaryrefslogtreecommitdiff
path: root/linkers/rtems-tld.cpp
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-09-09 08:40:13 +1000
committerChris Johns <chrisj@rtems.org>2014-09-09 08:40:13 +1000
commitb7ad4a2431429ad262f93efea693a480ad0c9ea6 (patch)
tree21dbc1abe61f094e2b4c4a37dc6d8c9688bb1279 /linkers/rtems-tld.cpp
parent6fb14092151645e40a207161f1b0a89b5a848a97 (diff)
linkers: If no RTEMS path is provied see if the prefix can be used.
Diffstat (limited to 'linkers/rtems-tld.cpp')
-rw-r--r--linkers/rtems-tld.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/linkers/rtems-tld.cpp b/linkers/rtems-tld.cpp
index ea9518c..417b904 100644
--- a/linkers/rtems-tld.cpp
+++ b/linkers/rtems-tld.cpp
@@ -972,6 +972,8 @@ main (int argc, char* argv[])
std::string rtems_path;
std::string rtems_arch_bsp;
+ rld::set_cmdline (argc, argv);
+
while (true)
{
int opt = ::getopt_long (argc, argv, "hvwkVc:l:E:f:C:r:B:W:", rld_opts, NULL);
@@ -1051,16 +1053,23 @@ main (int argc, char* argv[])
argv += optind;
if (rld::verbose ())
+ {
std::cout << "RTEMS Trace Linker " << rld::version () << std::endl;
+ std::cout << " " << rld::get_cmdline () << std::endl;
+ }
/*
* Load the arch/bsp value if provided.
*/
if (!rtems_arch_bsp.empty ())
{
- if (rtems_path.empty ())
+ const std::string& prefix = rld::get_prefix ();
+ if (rtems_path.empty () && prefix.empty ())
throw rld::error ("No RTEMS path provide with arch/bsp", "options");
- rld::rtems::set_path (rtems_path);
+ if (!rtems_path.empty ())
+ rld::rtems::set_path (rtems_path);
+ else
+ rld::rtems::set_path (prefix);
rld::rtems::set_arch_bsp (rtems_arch_bsp);
}