summaryrefslogtreecommitdiff
path: root/rld-rtems.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-09-05 18:16:40 +1000
committerChris Johns <chrisj@rtems.org>2014-09-05 18:16:40 +1000
commit5679661069a8b9acaec26d61c8da797f0726506b (patch)
treeb3a8af2246ebbdfdd988a41a7c9658b374d0f165 /rld-rtems.h
parent566f389fb9f7f2b124e6055947c9edc8820107b6 (diff)
Add support for RTEMS BSP or user supplied CFLAGS. Remove march/mcpu.
Added support to read an RTEMS BSP pkgconfig file and ste the CC flags.
Diffstat (limited to 'rld-rtems.h')
-rw-r--r--rld-rtems.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/rld-rtems.h b/rld-rtems.h
new file mode 100644
index 0000000..97dc67e
--- /dev/null
+++ b/rld-rtems.h
@@ -0,0 +1,82 @@
+/*
+ * 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
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/**
+ * @file
+ *
+ * @ingroup rtems-ld
+ *
+ * @brief Support to manage RTEMS.
+ *
+ */
+
+#if !defined (_RLD_RTEMS_H_)
+#define _RLD_RTEMS_H_
+
+#include <string>
+
+namespace rld
+{
+ namespace rtems
+ {
+ /**
+ * The RTEMS default version.
+ */
+ extern std::string version;
+
+ /**
+ * The path to RTEMS.
+ */
+ extern std::string path;
+
+ /**
+ * Is the RTEMS installed.
+ */
+ extern bool installed;
+
+ /**
+ * The BSP name.
+ */
+ extern std::string arch_bsp;
+
+ /**
+ * Return the architecture given an arch/bsp string.
+ */
+ const std::string arch (const std::string& ab);
+
+ /**
+ * Return the bsp given an arch/bsp string.
+ */
+ const std::string bsp (const std::string& ab);
+
+ /**
+ * Return the RTEMS bsp string given an arch/bsp string.
+ */
+ const std::string rtems_bsp (const std::string& ab);
+
+ /**
+ * Load the configuration. Set the various values via the command or a
+ * configuration file then check the configuration.
+ */
+ void load_cc ();
+
+ /**
+ * Process the BSP name updating the various CC flags.
+ */
+ void set_cc (void);
+ }
+}
+
+#endif