[rtems commit] bsps/powerpc: Hack to fix the build

Sebastian Huber sebh at rtems.org
Mon Jun 11 12:48:05 UTC 2018


Module:    rtems
Branch:    master
Commit:    07c597636a87b1a5e8d5959190f59d3fb5ea1634
Changeset: http://git.rtems.org/rtems/commit/?id=07c597636a87b1a5e8d5959190f59d3fb5ea1634

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jun  7 06:58:59 2018 +0200

bsps/powerpc: Hack to fix the build

The ppc405 define must be checked before the ppc403 define.  The ppc405
define is provided by <bspopts.h>.  The ppc403 define is provided by GCC
as a built-in define if no ppc* or mpc* define is set via the
command line (see GCC sources "gcc/config/rs6000/rtems.h").

Update #3425.

---

 bsps/powerpc/include/rtems/powerpc/powerpc.h | 30 +++++++++++++++++-----------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/bsps/powerpc/include/rtems/powerpc/powerpc.h b/bsps/powerpc/include/rtems/powerpc/powerpc.h
index 8b2cf1e..f1b6e80 100644
--- a/bsps/powerpc/include/rtems/powerpc/powerpc.h
+++ b/bsps/powerpc/include/rtems/powerpc/powerpc.h
@@ -111,7 +111,24 @@ extern "C" {
  *  predefines.
  */
 
-#if defined(ppc403)
+/*
+ * FIXME: The ppc405 define must be checked before the ppc403 define.  The
+ * ppc405 define is provided by <bspopts.h>.  The ppc403 define is provided by
+ * GCC as a built-in define if no ppc* or mpc* define is set via the
+ * command line (see GCC sources "gcc/config/rs6000/rtems.h").
+ */
+#if defined(ppc405)
+
+#define PPC_CACHE_ALIGNMENT	32
+#define PPC_HAS_RI    	     0
+#define PPC_HAS_RFCI    	1
+#define PPC_USE_MULTIPLE	1
+#define PPC_I_CACHE		16384
+#define PPC_D_CACHE		16384		/* except GP/CR */
+#define PPC_HAS_EXCEPTION_PREFIX 0
+#define PPC_HAS_EVPR             1
+
+#elif defined(ppc403)
 /*
  *  IBM 403
  *
@@ -130,17 +147,6 @@ extern "C" {
 #define PPC_HAS_EXCEPTION_PREFIX 0
 #define PPC_HAS_EVPR             1
 
-#elif defined (ppc405)
-
-#define PPC_CACHE_ALIGNMENT	32
-#define PPC_HAS_RI    	     0
-#define PPC_HAS_RFCI    	1
-#define PPC_USE_MULTIPLE	1
-#define PPC_I_CACHE		16384
-#define PPC_D_CACHE		16384		/* except GP/CR */
-#define PPC_HAS_EXCEPTION_PREFIX 0
-#define PPC_HAS_EVPR             1
-
 #elif defined (ppc440)
 
 #define PPC_CACHE_ALIGNMENT         32



More information about the vc mailing list