Changeset b7ad4a2 in rtems-tools for linkers/rld.cpp


Ignore:
Timestamp:
Sep 8, 2014, 10:40:13 PM (7 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 5, master
Children:
30a7f06
Parents:
6fb1409
Message:

linkers: If no RTEMS path is provied see if the prefix can be used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linkers/rld.cpp

    r6fb1409 rb7ad4a2  
    4040{
    4141  static int verbose_level = 0;
     42
     43  /**
     44   * The program's command line.
     45   */
     46  static std::string cmdline;
     47
     48  /**
     49   * The program name as set by the caller.
     50   */
    4251  static std::string progname;
    4352
     
    207216
    208217  void
     218  set_cmdline (int argc, char* argv[])
     219  {
     220    cmdline.clear ();
     221    for (int arg = 0; arg < argc; ++arg)
     222    {
     223      std::string a = argv[arg];
     224      cmdline += ' ' + a;
     225    }
     226    cmdline = rld::trim (cmdline);
     227  }
     228
     229  const std::string
     230  get_cmdline ()
     231  {
     232    return cmdline;
     233  }
     234
     235  void
    209236  set_progname (const std::string& progname_)
    210237  {
     
    234261  {
    235262    std::string pp = get_program_path ();
    236     std::cout << "PP=" << pp << std::endl;
    237263    if (rld::path::basename (pp) == "bin")
    238       pp = rld::path::dirname (pp);
    239     return pp;
     264      return rld::path::dirname (pp);
     265    return "";
    240266  }
    241267
Note: See TracChangeset for help on using the changeset viewer.