- Timestamp:
- Sep 1, 2014, 3:26:47 AM (5 years ago)
- Branches:
- 4.10, 4.11, master
- Children:
- 2f48445
- Parents:
- e5165d2
- Location:
- linkers
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
linkers/rld-cc.cpp
re5165d2 r40fd7a0 1 1 /* 2 * Copyright (c) 2011-201 2, Chris Johns <chrisj@rtems.org>2 * Copyright (c) 2011-2014, Chris Johns <chrisj@rtems.org> 3 3 * 4 4 * Permission to use, copy, modify, and/or distribute this software for any … … 28 28 { 29 29 std::string cc; 30 std::string cc_name = "gcc"; 30 31 std::string exec_prefix; 31 std::string march; 32 std::string mcpu; 32 std::string cppflags; 33 std::string cflags; 34 std::string cxxflags; 35 std::string ldflags; 33 36 std::string install_path; 34 37 std::string programs_path; … … 42 45 static const char* std_lib_cplusplus = "libstdc++.a"; 43 46 44 staticvoid47 void 45 48 make_cc_command (rld::process::arg_container& args) 46 49 { 47 50 /* 48 * Use the absolute path to CC i sprovided.51 * Use the absolute path to CC if provided. 49 52 */ 50 53 if (!cc.empty ()) … … 52 55 else 53 56 { 54 std::string cmd = "gcc";57 std::string cmd = cc_name; 55 58 if (!exec_prefix.empty ()) 56 59 cmd = exec_prefix + "-rtems" + rld::rtems_version () + '-' + cmd; 57 60 args.push_back (cmd); 58 61 } 59 if (!march.empty ()) 60 args.push_back ("-march=" + march); 61 if (!mcpu.empty ()) 62 args.push_back ("-mcpu=" + mcpu); 62 } 63 64 void 65 add_cppflags (rld::process::arg_container& args) 66 { 67 if (!cppflags.empty ()) 68 args.push_back (cppflags); 69 } 70 71 void 72 add_cflags (rld::process::arg_container& args) 73 { 74 if (!cflags.empty ()) 75 args.push_back (cflags); 76 } 77 78 void 79 add_cxxflags (rld::process::arg_container& args) 80 { 81 if (!cxxflags.empty ()) 82 args.push_back (cxxflags); 83 } 84 85 void 86 add_ldflags (rld::process::arg_container& args) 87 { 88 if (!ldflags.empty ()) 89 args.push_back (ldflags); 63 90 } 64 91 … … 83 110 84 111 make_cc_command (args); 112 add_cppflags (args); 113 add_cflags (args); 85 114 args.push_back ("-print-search-dirs"); 86 115 … … 89 118 rld::process::status status; 90 119 91 status = rld::process::execute ( "gcc", args, out.name (), err.name ());120 status = rld::process::execute (cc_name, args, out.name (), err.name ()); 92 121 93 122 if ((status.type == rld::process::status::normal) && … … 95 124 { 96 125 if (rld::verbose () >= RLD_VERBOSE_DETAILS) 97 out.output ( "gcc", std::cout, true);126 out.output (cc_name, std::cout, true); 98 127 out.open (); 99 128 while (true) … … 120 149 else 121 150 { 122 err.output ( "gcc", std::cout);151 err.output (cc_name, std::cout); 123 152 } 124 153 } … … 130 159 131 160 make_cc_command (args); 161 add_cflags (args); 162 add_ldflags (args); 132 163 args.push_back ("-print-file-name=" + name); 133 164 … … 136 167 rld::process::status status; 137 168 138 status = rld::process::execute ( "gcc", args, out.name (), err.name ());169 status = rld::process::execute (cc_name, args, out.name (), err.name ()); 139 170 140 171 if ((status.type == rld::process::status::normal) && … … 156 187 157 188 void 158 get_standard_libpaths (rld:: files::paths& libpaths)189 get_standard_libpaths (rld::path::paths& libpaths) 159 190 { 160 191 search_dirs (); … … 163 194 164 195 void 165 get_standard_libs (rld:: files::paths& libs,166 rld:: files::paths& libpaths,167 bool 196 get_standard_libs (rld::path::paths& libs, 197 rld::path::paths& libpaths, 198 bool cplusplus) 168 199 { 169 200 strings libnames; … … 171 202 rld::split (std_lib_c, libnames, RLD_PATHSTR_SEPARATOR); 172 203 if (cplusplus) 173 rld:: files::path_split (std_lib_cplusplus, libnames);204 rld::path::path_split (std_lib_cplusplus, libnames); 174 205 175 206 for (strings::iterator lni = libnames.begin (); … … 182 213 std::string path; 183 214 184 rld:: files::find_file (path, *lni, libpaths);215 rld::path::find_file (path, *lni, libpaths); 185 216 if (path.empty ()) 186 217 throw rld::error ("Library not found: " + *lni, "getting standard libs"); -
linkers/rld-cc.h
re5165d2 r40fd7a0 1 1 /* 2 * Copyright (c) 2011-201 2, Chris Johns <chrisj@rtems.org>2 * Copyright (c) 2011-2014, Chris Johns <chrisj@rtems.org> 3 3 * 4 4 * Permission to use, copy, modify, and/or distribute this software for any … … 29 29 30 30 #include <rld-files.h> 31 #include <rld-process.h> 31 32 32 33 namespace rld … … 34 35 namespace cc 35 36 { 36 extern std::string cc; //< The CC executable. 37 extern std::string cc; //< The CC executable as absolute path. 38 extern std::string cc_name; //< The CC name, ie gcc, clang. 37 39 extern std::string exec_prefix; //< The CC executable prefix. 38 extern std::string march; //< The CC machine architecture. 39 extern std::string mcpu; //< The CC machine CPU. 40 41 extern std::string cppflags; //< The CPP flags. 42 extern std::string cflags; //< The CC flags. 43 extern std::string cxxflags; //< The CXX flags. 44 extern std::string ldflags; //< The LD flags. 40 45 41 46 extern std::string install_path; //< The CC reported install path. … … 44 49 45 50 /** 51 * Make a CC command from the set arguments. 52 */ 53 void make_cc_command (rld::process::arg_container& args); 54 55 /** 56 * If the cppflags has been set append to the arguments. 57 */ 58 void add_cppflags (rld::process::arg_container& args); 59 60 /** 61 * If the cflags has been set append to the arguments. 62 */ 63 void add_cflags (rld::process::arg_container& args); 64 65 /** 66 * If the cxxflags has been set append to the arguments. 67 */ 68 void add_cxxflags (rld::process::arg_container& args); 69 70 /** 71 * If the ldflags has been set append to the arguments. 72 */ 73 void add_ldflags (rld::process::arg_container& args); 74 75 /** 46 76 * Get the standard libraries paths from the compiler. 47 77 */ 48 void get_standard_libpaths (rld:: files::paths& libpaths);78 void get_standard_libpaths (rld::path::paths& libpaths); 49 79 50 80 /** 51 81 * Get the standard libraries. Optionally add the C++ library. 52 82 */ 53 void get_standard_libs (rld:: files::paths& libs,54 rld:: files::paths& libpaths,55 bool 83 void get_standard_libs (rld::path::paths& libs, 84 rld::path::paths& libpaths, 85 bool cpp = false); 56 86 57 87 } -
linkers/rld-files.cpp
re5165d2 r40fd7a0 74 74 } 75 75 76 std::string77 basename (const std::string& name)78 {79 size_t b = name.find_last_of (RLD_PATH_SEPARATOR);80 if (b != std::string::npos)81 return name.substr (b + 1);82 return name;83 }84 85 std::string86 dirname (const std::string& name)87 {88 size_t b = name.find_last_of (RLD_PATH_SEPARATOR);89 if (b != std::string::npos)90 return name.substr (0, b - 1);91 return name;92 }93 94 std::string95 extension (const std::string& name)96 {97 size_t b = name.find_last_of ('.');98 if (b != std::string::npos)99 return name.substr (b);100 return name;101 }102 103 void104 path_split (const std::string& path, rld::files::paths& paths)105 {106 strings ps;107 rld::split (path, ps, RLD_PATHSTR_SEPARATOR);108 if (ps.size ())109 {110 for (strings::iterator psi = ps.begin ();111 psi != ps.end ();112 ++psi)113 {114 if (check_directory (*psi))115 paths.push_back (*psi);116 }117 }118 }119 120 void121 path_join (const std::string& path_, const std::string& file_, std::string& joined)122 {123 if ((path_[path_.size () - 1] != RLD_PATH_SEPARATOR) &&124 (file_[0] != RLD_PATH_SEPARATOR))125 joined = path_ + RLD_PATH_SEPARATOR + file_;126 else if ((path_[path_.size () - 1] == RLD_PATH_SEPARATOR) &&127 (file_[0] == RLD_PATH_SEPARATOR))128 joined = path_ + &file_[1];129 else130 joined = path_ + file_;131 }132 133 bool134 check_file (const std::string& path)135 {136 struct stat sb;137 if (::stat (path.c_str (), &sb) == 0)138 if (S_ISREG (sb.st_mode))139 return true;140 return false;141 }142 143 bool144 check_directory (const std::string& path)145 {146 struct stat sb;147 if (::stat (path.c_str (), &sb) == 0)148 if (S_ISDIR (sb.st_mode))149 return true;150 return false;151 }152 153 void154 find_file (std::string& path, const std::string& name, paths& search_paths)155 {156 for (rld::files::paths::iterator pi = search_paths.begin ();157 pi != search_paths.end ();158 ++pi)159 {160 path_join (*pi, name, path);161 if (check_file (path))162 return;163 }164 path.clear ();165 }166 167 76 file::file (const std::string& aname, 168 77 const std::string& oname, … … 245 154 file::is_valid () const 246 155 { 247 return !aname_.empty () || ~oname_.empty ();156 return !aname_.empty () || !oname_.empty (); 248 157 } 249 158 … … 257 166 const std::string p = path (); 258 167 if (!p.empty ()) 259 result = check_file (p);168 result = path::check_file (p); 260 169 return result; 261 170 } … … 289 198 file::basename () const 290 199 { 291 return rld:: files::basename (full ());200 return rld::path::basename (full ()); 292 201 } 293 202 … … 844 753 { 845 754 object& obj = *(*oi); 846 const std::string& oname = basename (obj.name ().oname ());755 const std::string& oname = path::basename (obj.name ().oname ()); 847 756 if (oname.length () >= rld_archive_fname_size) 848 757 extended_file_names += oname + '\n'; … … 869 778 try 870 779 { 871 std::string oname = basename (obj.name ().oname ());780 std::string oname = path::basename (obj.name ().oname ()); 872 781 873 782 /* … … 1392 1301 1393 1302 void 1394 cache::add (path s& paths__)1395 { 1396 for (path s::iterator pi = paths__.begin();1303 cache::add (path::paths& paths__) 1304 { 1305 for (path::paths::iterator pi = paths__.begin(); 1397 1306 pi != paths__.end(); 1398 1307 ++pi) … … 1401 1310 1402 1311 void 1403 cache::add_libraries (path s& paths__)1404 { 1405 for (path s::iterator pi = paths__.begin();1312 cache::add_libraries (path::paths& paths__) 1313 { 1314 for (path::paths::iterator pi = paths__.begin(); 1406 1315 pi != paths__.end(); 1407 1316 ++pi) … … 1460 1369 cache::collect_object_files () 1461 1370 { 1462 for (path s::iterator ni = paths_.begin (); ni != paths_.end (); ++ni)1371 for (path::paths::iterator ni = paths_.begin (); ni != paths_.end (); ++ni) 1463 1372 collect_object_files (*ni); 1464 1373 } … … 1566 1475 { 1567 1476 list.clear (); 1568 for (path s::const_iterator pi = paths_.begin ();1477 for (path::paths::const_iterator pi = paths_.begin (); 1569 1478 pi != paths_.end (); 1570 1479 ++pi) … … 1577 1486 } 1578 1487 1579 const path s&1488 const path::paths& 1580 1489 cache::get_paths () const 1581 1490 { … … 1640 1549 1641 1550 void 1642 find_libraries (paths& libraries, paths& libpaths, paths& libs) 1551 find_libraries (path::paths& libraries, 1552 path::paths& libpaths, 1553 path::paths& libs) 1643 1554 { 1644 1555 if (rld::verbose () >= RLD_VERBOSE_INFO) 1645 1556 std::cout << "Finding libraries:." << std::endl; 1646 1557 libraries.clear (); 1647 for (path s::size_type l = 0; l < libs.size (); ++l)1558 for (path::paths::size_type l = 0; l < libs.size (); ++l) 1648 1559 { 1649 1560 std::string lib = "lib" + libs[l] + ".a"; … … 1651 1562 std::cout << " searching: " << lib << std::endl; 1652 1563 bool found = false; 1653 for (path s::size_type p = 0; p < libpaths.size (); ++p)1564 for (path::paths::size_type p = 0; p < libpaths.size (); ++p) 1654 1565 { 1655 1566 std::string plib; 1656 path _join (libpaths[p], lib, plib);1567 path::path_join (libpaths[p], lib, plib); 1657 1568 if (rld::verbose () >= RLD_VERBOSE_DETAILS) 1658 1569 std::cout << " checking: " << plib << std::endl; 1659 if ( check_file (plib))1570 if (path::check_file (plib)) 1660 1571 { 1661 1572 if (rld::verbose () >= RLD_VERBOSE_INFO) -
linkers/rld-files.h
re5165d2 r40fd7a0 39 39 40 40 #include <rld.h> 41 #include <rld-path.h> 41 42 42 43 namespace rld … … 45 46 { 46 47 /** 47 * Container of file paths.48 */49 typedef std::vector < std::string > paths;50 51 /**52 48 * Container of files. 53 49 */ … … 68 64 */ 69 65 typedef std::list < object* > object_list; 70 71 /**72 * Return the basename of the file name.73 *74 * @param name The full file name.75 * @return std::string The basename of the file.76 */77 std::string basename (const std::string& name);78 79 /**80 * Return the dirname of the file name.81 *82 * @param name The full file name.83 * @return std::string The dirname of the file.84 */85 std::string dirname (const std::string& name);86 87 /**88 * Return the extension of the file name.89 *90 * @param name The full file name.91 * @return std::string The extension of the file.92 */93 std::string extension (const std::string& name);94 95 /**96 * Split a path from a string with a delimiter to the path container. Add97 * only the paths that exist and ignore those that do not.98 *99 * @param path The paths as a single string delimited by the path100 * separator.101 * @param paths The split path paths.102 */103 void path_split (const std::string& path,104 paths& paths);105 106 /**107 * Make a path by joining the parts with required separator.108 *109 * @param path_ The path component to be joined.110 * @param file_ The file name to add to the path.111 * @param joined The joined path and file name with a path separator.112 */113 void path_join (const std::string& path_,114 const std::string& file_,115 std::string& joined);116 117 /**118 * Check the path is a file using a stat call.119 *120 * @param path The path to check.121 * @retval true The path is valid.122 * @retval false The path is not valid.123 */124 bool check_file (const std::string& path);125 126 /**127 * Check if the path is a directory.128 *129 * @param path The path to check.130 * @retval false The path is not a directory.131 * @retval true The path is a directory.132 */133 bool check_directory (const std::string& path);134 135 /**136 * Find the file given a container of paths and file names.137 *138 * @param path The path of the file if found else empty.139 * @param name The name of the file to search for.140 * @param search_paths The container of paths to search.141 */142 void find_file (std::string& path,143 const std::string& name,144 paths& search_paths);145 66 146 67 /** … … 925 846 * Add a container of path to the cache. 926 847 */ 927 void add (path s& paths__);848 void add (path::paths& paths__); 928 849 929 850 /** 930 851 * Add a container of path to the cache. 931 852 */ 932 void add_libraries (path s& paths__);853 void add_libraries (path::paths& paths__); 933 854 934 855 /** … … 994 915 * Get the paths. 995 916 */ 996 const path s& get_paths () const;917 const path::paths& get_paths () const; 997 918 998 919 /** … … 1039 960 1040 961 private: 1041 path spaths_; //< The names of the files to process.1042 archives archives_; //< The archive files.1043 objects objects_; //< The object files.1044 bool opened; //< The cache is open.962 path::paths paths_; //< The names of the files to process. 963 archives archives_; //< The archive files. 964 objects objects_; //< The object files. 965 bool opened; //< The cache is open. 1045 966 }; 1046 967 … … 1058 979 * have 'lib' and '.a' added. 1059 980 */ 1060 void find_libraries (paths& libraries, paths& libpaths, paths& libs); 981 void find_libraries (path::paths& libraries, 982 path::paths& libpaths, 983 path::paths& libs); 1061 984 1062 985 } -
linkers/rld-outputter.cpp
re5165d2 r40fd7a0 189 189 << ", dependents: " << dependents.size () << std::endl; 190 190 191 std::string ext = files::extension (name);191 std::string ext = path::extension (name); 192 192 std::string mdname = 193 193 name.substr (0, name.length () - ext.length ()) + "-metadata.o"; -
linkers/rld-process.cpp
re5165d2 r40fd7a0 161 161 tempfile::open (bool writable) 162 162 { 163 if ((fd < 0) && rld:: files::check_file (_name))163 if ((fd < 0) && rld::path::check_file (_name)) 164 164 { 165 165 level = 0; -
linkers/rld-resolver.cpp
re5165d2 r40fd7a0 58 58 const std::string& fullname) 59 59 { 60 const std::string name = files::basename (fullname);60 const std::string name = path::basename (fullname); 61 61 62 62 static int nesting = 0; -
linkers/rtems-ld.cpp
re5165d2 r40fd7a0 69 69 { "cc", required_argument, NULL, 'C' }, 70 70 { "exec-prefix", required_argument, NULL, 'E' }, 71 { "march", required_argument, NULL, 'a' }, 72 { "mcpu", required_argument, NULL, 'c' }, 71 { "cflags", required_argument, NULL, 'c' }, 73 72 { "rap-strip", no_argument, NULL, 'S' }, 74 73 { "rpath", required_argument, NULL, 'R' }, … … 113 112 << " -C file : execute file as the target C compiler (also --cc)" << std::endl 114 113 << " -E prefix : the RTEMS tool prefix (also --exec-prefix)" << std::endl 115 << " -a march : machine architecture (also --march)" << std::endl 116 << " -c cpu : machine architecture's CPU (also --mcpu)" << std::endl 114 << " -c cflags : C compiler flags (also --cflags)" << std::endl 117 115 << " -S : do not include file details (also --rap-strip)" << std::endl 118 116 << " -R : include file paths (also --rpath)" << std::endl … … 174 172 rld::files::cache base; 175 173 rld::files::cache cachera; 176 rld:: files::pathslibpaths;177 rld:: files::pathslibs;178 rld:: files::pathsobjects;179 rld:: files::pathslibraries;174 rld::path::paths libpaths; 175 rld::path::paths libs; 176 rld::path::paths objects; 177 rld::path::paths libraries; 180 178 rld::symbols::bucket defines; 181 179 rld::symbols::bucket undefines; … … 200 198 while (true) 201 199 { 202 int opt = ::getopt_long (argc, argv, "hvwVMnsSb:E:o:O:L:l: a:c:e:d:u:C:W:R:P:", rld_opts, NULL);200 int opt = ::getopt_long (argc, argv, "hvwVMnsSb:E:o:O:L:l:c:e:d:u:C:W:R:P:", rld_opts, NULL); 203 201 if (opt < 0) 204 202 break; … … 275 273 break; 276 274 277 case 'a':278 rld::cc::march = optarg;279 break;280 281 275 case 'c': 282 rld::cc:: mcpu= optarg;276 rld::cc::cflags = optarg; 283 277 break; 284 278 … … 476 470 if (!outra.empty ()) 477 471 { 478 rld:: files::paths ra_libs;472 rld::path::paths ra_libs; 479 473 bool ra_exist = false; 480 474 -
linkers/rtems-ra.cpp
re5165d2 r40fd7a0 100 100 << " -C file : execute file as the target C compiler (also --cc)" << std::endl 101 101 << " -E prefix : the RTEMS tool prefix (also --exec-prefix)" << std::endl 102 << " -a march : machine architecture (also --march)" << std::endl 103 << " -c cpu : machine architecture's CPU (also --mcpu)" << std::endl 102 << " -c cflags : C compiler flags (also --cflags)" << std::endl 104 103 << " -S : do not include file details (also --rap-strip)" << std::endl 105 104 << " -R : include file paths (also --rpath)" << std::endl … … 156 155 try 157 156 { 158 rld:: files::pathslibpaths;159 rld:: files::pathslibs;160 rld:: files::pathslibraries;161 rld:: files::pathsoutra;162 rld:: files::pathsraps_add;163 rld:: files::pathsraps_replace;164 rld:: files::pathsraps_delete;157 rld::path::paths libpaths; 158 rld::path::paths libs; 159 rld::path::paths libraries; 160 rld::path::paths outra; 161 rld::path::paths raps_add; 162 rld::path::paths raps_replace; 163 rld::path::paths raps_delete; 165 164 std::string cc_name; 166 165 std::string entry; … … 253 252 break; 254 253 255 case 'a':256 rld::cc::march = optarg;257 break;258 259 254 case 'c': 260 rld::cc:: mcpu= optarg;255 rld::cc::cflags = optarg; 261 256 break; 262 257 … … 326 321 * Convert ar file to ra file 327 322 */ 328 for (rld:: files::paths::iterator p = libraries.begin (); p != libraries.end (); ++p)323 for (rld::path::paths::iterator p = libraries.begin (); p != libraries.end (); ++p) 329 324 { 330 rld:: files::paths library;331 rld::symbols::table 332 rld::files::cache* 325 rld::path::paths library; 326 rld::symbols::table symbols; 327 rld::files::cache* cache = new rld::files::cache (); 333 328 334 329 library.clear (); … … 351 346 352 347 rld::files::objects& objs = cache->get_objects (); 353 rld:: files::pathsraobjects;348 rld::path::paths raobjects; 354 349 355 350 int pos = -1; … … 385 380 386 381 dependents.clear (); 387 for (rld:: files::paths::iterator ni = raobjects.begin (); ni != raobjects.end (); ++ni)382 for (rld::path::paths::iterator ni = raobjects.begin (); ni != raobjects.end (); ++ni) 388 383 { 389 384 rld::files::object* obj = new rld::files::object (*ni); … … 391 386 } 392 387 393 bool ra_rap = true;394 bool ra_exist = false;388 bool ra_rap = true; 389 bool ra_exist = false; 395 390 rld::files::cache cachera; 396 std::string raname = *p;391 std::string raname = *p; 397 392 398 393 pos = -1; … … 441 436 * Add, replace, delete files from the ra file. 442 437 */ 443 for (rld:: files::paths::iterator pl = libs.begin (); pl != libs.end (); ++pl)438 for (rld::path::paths::iterator pl = libs.begin (); pl != libs.end (); ++pl) 444 439 { 445 rld:: files::pathslibrary;446 rld::files::cache* 440 rld::path::paths library; 441 rld::files::cache* cache = new rld::files::cache (); 447 442 448 443 library.clear (); … … 460 455 461 456 rld::files::objects& objs = cache->get_objects (); 462 rld:: files::pathsraobjects;457 rld::path::paths raobjects; 463 458 464 459 std::string rap_name; 465 bool rap_delete = false;460 bool rap_delete = false; 466 461 467 462 dependents.clear (); … … 478 473 rap_delete = false; 479 474 480 for (rld:: files::paths::iterator pa = raps_delete.begin ();475 for (rld::path::paths::iterator pa = raps_delete.begin (); 481 476 pa != raps_delete.end (); 482 477 ++pa) … … 496 491 * Add rap files into ra file, add supports replace. 497 492 */ 498 bool rap_exist = false; 499 rld::files::paths rap_objects; 500 for (rld::files::paths::iterator pa = raps_add.begin (); 493 rld::path::paths rap_objects; 494 bool rap_exist = false; 495 496 for (rld::path::paths::iterator pa = raps_add.begin (); 501 497 pa != raps_add.end (); 502 498 ++pa) … … 521 517 } 522 518 523 for (rld:: files::paths::iterator pa = rap_objects.begin ();519 for (rld::path::paths::iterator pa = rap_objects.begin (); 524 520 pa != rap_objects.end (); 525 521 ++pa) … … 537 533 * Replace rap files in ra file 538 534 */ 539 bool rap_replace = false;540 535 rld::files::cache cachera; 536 bool rap_replace = false; 541 537 542 538 rap_objects.clear (); 543 539 cachera.open (); 544 540 545 for (rld:: files::paths::iterator pa = raps_replace.begin ();541 for (rld::path::paths::iterator pa = raps_replace.begin (); 546 542 pa != raps_replace.end (); 547 543 ++pa) … … 567 563 } 568 564 569 for (rld:: files::paths::iterator pa = rap_objects.begin ();565 for (rld::path::paths::iterator pa = rap_objects.begin (); 570 566 pa != rap_objects.end (); 571 567 ++pa) -
linkers/rtems-rapper.cpp
re5165d2 r40fd7a0 639 639 { 640 640 std::string name = image.name ().full (); 641 std::string extension = rld:: files::extension (image.name ().full ());641 std::string extension = rld::path::extension (image.name ().full ()); 642 642 643 643 name = name.substr (0, name.size () - extension.size ()) + ".xrap"; … … 704 704 705 705 void 706 rap_show (rld:: files::paths& raps,707 bool 708 bool 709 bool 710 bool 711 bool 712 bool 713 bool 714 bool 706 rap_show (rld::path::paths& raps, 707 bool warnings, 708 bool show_header, 709 bool show_machine, 710 bool show_layout, 711 bool show_strings, 712 bool show_symbols, 713 bool show_relocs, 714 bool show_details) 715 715 { 716 for (rld:: files::paths::iterator pi = raps.begin();716 for (rld::path::paths::iterator pi = raps.begin(); 717 717 pi != raps.end(); 718 718 ++pi) … … 961 961 962 962 void 963 rap_overlay (rld:: files::paths& raps, bool warnings)963 rap_overlay (rld::path::paths& raps, bool warnings) 964 964 { 965 965 std::cout << "Overlay .... " << std::endl; 966 for (rld:: files::paths::iterator pi = raps.begin();966 for (rld::path::paths::iterator pi = raps.begin(); 967 967 pi != raps.end(); 968 968 ++pi) … … 1051 1051 1052 1052 void 1053 rap_expander (rld:: files::paths& raps, bool warnings)1053 rap_expander (rld::path::paths& raps, bool warnings) 1054 1054 { 1055 1055 std::cout << "Expanding .... " << std::endl; 1056 for (rld:: files::paths::iterator pi = raps.begin();1056 for (rld::path::paths::iterator pi = raps.begin(); 1057 1057 pi != raps.end(); 1058 1058 ++pi) … … 1150 1150 try 1151 1151 { 1152 rld:: files::paths raps;1153 bool 1154 bool 1155 bool 1156 bool 1157 bool 1158 bool 1159 bool 1160 bool 1161 bool 1162 bool 1163 bool 1152 rld::path::paths raps; 1153 bool warnings = true; 1154 bool show = false; 1155 bool show_header = false; 1156 bool show_machine = false; 1157 bool show_layout = false; 1158 bool show_strings = false; 1159 bool show_symbols = false; 1160 bool show_relocs = false; 1161 bool show_details = false; 1162 bool overlay = false; 1163 bool expand = false; 1164 1164 1165 1165 while (true) -
linkers/rtems-syms.cpp
re5165d2 r40fd7a0 83 83 << " -C file : execute file as the target C compiler (also --cc)" << std::endl 84 84 << " -E prefix : the RTEMS tool prefix (also --exec-prefix)" << std::endl 85 << " -a march : machine architecture (also --march)" << std::endl 86 << " -c cpu : machine architecture's CPU (also --mcpu)" << std::endl; 85 << " -c cflags : C compiler flags (also --cflags)" << std::endl; 87 86 ::exit (exit_code); 88 87 } … … 132 131 { 133 132 rld::files::cache cache; 134 rld:: files::pathslibpaths;135 rld:: files::pathslibs;136 rld:: files::pathsobjects;137 rld:: files::pathslibraries;133 rld::path::paths libpaths; 134 rld::path::paths libs; 135 rld::path::paths objects; 136 rld::path::paths libraries; 138 137 rld::symbols::table symbols; 139 138 std::string base_name; … … 149 148 while (true) 150 149 { 151 int opt = ::getopt_long (argc, argv, "hvwVSE:L:l: a:c:C:", rld_opts, NULL);150 int opt = ::getopt_long (argc, argv, "hvwVSE:L:l:c:C:", rld_opts, NULL); 152 151 if (opt < 0) 153 152 break; … … 200 199 break; 201 200 202 case 'a':203 rld::cc::march = optarg;204 break;205 206 201 case 'c': 207 rld::cc:: mcpu= optarg;202 rld::cc::cflags = optarg; 208 203 break; 209 204 -
linkers/rtems-tld.cpp
re5165d2 r40fd7a0 756 756 << " -k : keep temporary files (also --keep)" << std::endl 757 757 << " -E prefix : the RTEMS tool prefix (also --exec-prefix)" << std::endl 758 << " -a march : machine architecture (also --march)" << std::endl 759 << " -c cpu : machine architecture's CPU (also --mcpu)" << std::endl 758 << " -c cflags : C compiler flags (also --cflags)" << std::endl 760 759 << " -C ini : user configuration INI file (also --config)" << std::endl; 761 760 ::exit (exit_code); … … 816 815 while (true) 817 816 { 818 int opt = ::getopt_long (argc, argv, "hvwkVE: a:c:C:", rld_opts, NULL);817 int opt = ::getopt_long (argc, argv, "hvwkVE:c:C:", rld_opts, NULL); 819 818 if (opt < 0) 820 819 break; … … 847 846 break; 848 847 849 case 'a':850 rld::cc::march = optarg;851 break;852 853 848 case 'c': 854 rld::cc:: mcpu= optarg;849 rld::cc::cflags = optarg; 855 850 break; 856 851 -
linkers/wscript
re5165d2 r40fd7a0 101 101 'rld-compression.cpp', 102 102 'rld-outputter.cpp', 103 'rld-path.cpp', 103 104 'rld-process.cpp', 104 105 'rld-resolver.cpp',
Note: See TracChangeset
for help on using the changeset viewer.