diff options
Diffstat (limited to 'rld-cc.h')
-rw-r--r-- | rld-cc.h | 46 |
1 files changed, 38 insertions, 8 deletions
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012, Chris Johns <chrisj@rtems.org> + * Copyright (c) 2011-2014, Chris Johns <chrisj@rtems.org> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -28,31 +28,61 @@ #include <string> #include <rld-files.h> +#include <rld-process.h> namespace rld { namespace cc { - extern std::string cc; //< The CC executable. + extern std::string cc; //< The CC executable as absolute path. + extern std::string cc_name; //< The CC name, ie gcc, clang. extern std::string exec_prefix; //< The CC executable prefix. - extern std::string march; //< The CC machine architecture. - extern std::string mcpu; //< The CC machine CPU. + + extern std::string cppflags; //< The CPP flags. + extern std::string cflags; //< The CC flags. + extern std::string cxxflags; //< The CXX flags. + extern std::string ldflags; //< The LD flags. extern std::string install_path; //< The CC reported install path. extern std::string programs_path; //< The CC reported programs path. extern std::string libraries_path; //< The CC reported libraries path. /** + * Make a CC command from the set arguments. + */ + void make_cc_command (rld::process::arg_container& args); + + /** + * If the cppflags has been set append to the arguments. + */ + void add_cppflags (rld::process::arg_container& args); + + /** + * If the cflags has been set append to the arguments. + */ + void add_cflags (rld::process::arg_container& args); + + /** + * If the cxxflags has been set append to the arguments. + */ + void add_cxxflags (rld::process::arg_container& args); + + /** + * If the ldflags has been set append to the arguments. + */ + void add_ldflags (rld::process::arg_container& args); + + /** * Get the standard libraries paths from the compiler. */ - void get_standard_libpaths (rld::files::paths& libpaths); + void get_standard_libpaths (rld::path::paths& libpaths); /** * Get the standard libraries. Optionally add the C++ library. */ - void get_standard_libs (rld::files::paths& libs, - rld::files::paths& libpaths, - bool cpp = false); + void get_standard_libs (rld::path::paths& libs, + rld::path::paths& libpaths, + bool cpp = false); } } |