From 5679661069a8b9acaec26d61c8da797f0726506b Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 5 Sep 2014 18:16:40 +1000 Subject: 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. --- rld-rtems.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 rld-rtems.h (limited to 'rld-rtems.h') 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 + * + * 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 + +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 -- cgit v1.2.3