summaryrefslogtreecommitdiff
path: root/rld-cc.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-09-01 13:26:47 +1000
committerChris Johns <chrisj@rtems.org>2014-09-01 13:26:47 +1000
commit8c841a582f45d8a6cc1b3c439d4f660099e34d1b (patch)
tree6d5099a2bc67b72cbb43c0b3c3af0e8db39ce2cf /rld-cc.h
parent02ccf12ec62e7894786b6fff059f92fdcd7acaa1 (diff)
rld: Split the file into a path module for path specific functions.
This allows resued for other parts of the system not dependent on objcet files or archives.
Diffstat (limited to 'rld-cc.h')
-rw-r--r--rld-cc.h46
1 files changed, 38 insertions, 8 deletions
diff --git a/rld-cc.h b/rld-cc.h
index a914b2f..db1163e 100644
--- a/rld-cc.h
+++ b/rld-cc.h
@@ -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);
}
}