]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/9316 (powerpc-rtems/extending multilibs)
authorRalf Corsepius <corsepiu@faw.uni-ulm.de>
Thu, 30 Jan 2003 14:03:42 +0000 (14:03 +0000)
committerJoel Sherrill <joel@gcc.gnu.org>
Thu, 30 Jan 2003 14:03:42 +0000 (14:03 +0000)
2003-01-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

PR target/9316
* config/rs6000/rtems.h: Add CPP_OS_DEFAULT_SPEC.
* config/rs6000/sysv4.h: Add CPP_OS_RTEMS_SPEC.
* config/rs6000/t-rtems: New file. multilib variants to match OS.
* config.gcc (powerpc-*-rtems*): Use rs6000/t-rtems instead of
rs6000/t-ppcgas so we get the desired multilibs.

From-SVN: r62136

gcc/ChangeLog
gcc/config.gcc
gcc/config/rs6000/rtems.h
gcc/config/rs6000/sysv4.h
gcc/config/rs6000/t-rtems [new file with mode: 0644]

index 33a731e83cdeb3630241b5d3b36492c9c52c30c8..ee67df950a37b49d1ad4c6fd0585f5218df51d7a 100644 (file)
@@ -1,3 +1,12 @@
+2003-01-30     Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+       PR target/9316 
+       * config/rs6000/rtems.h: Add CPP_OS_DEFAULT_SPEC.
+       * config/rs6000/sysv4.h: Add CPP_OS_RTEMS_SPEC.
+       * config/rs6000/t-rtems: New file. multilib variants to match OS.
+       * config.gcc (powerpc-*-rtems*): Use rs6000/t-rtems instead of
+       rs6000/t-ppcgas so we get the desired multilibs.
+
 2003-01-29     Joel Sherrill <joel@OARcorp.com>
 
        * gthr-rtems.h: Define __GTHREAD_MUTEX_INIT.  Apparently no code
index 8971702a9cfa2592d7054e65920f361c19ea6053..bb71f51a3ec9c98f2826265f7e48dd05ef6ec108 100644 (file)
@@ -1,5 +1,5 @@
 # GCC build-, host- and target-specific configuration file.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -2839,7 +2839,7 @@ powerpc-*-eabi*)
 powerpc-*-rtems*)
        xm_defines=POSIX
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h"
-       tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
+       tmake_file="rs6000/t-rtems t-rtems rs6000/t-ppccomm"
        if test x$enable_threads = xyes; then
          thread_file='rtems'
        fi
index aa68130ba17e6ad4d8c388914cc74f6808554e5a..cc8295af867294c22c617e8e95fd44352a0fba43 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for rtems targeting a PowerPC using elf.
-   Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Joel Sherrill (joel@OARcorp.com).
 
 This file is part of GNU CC.
@@ -22,5 +22,8 @@ Boston, MA 02111-1307, USA.  */
 /* Specify predefined symbols in preprocessor.  */
 
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-DPPC -D__rtems__ \
+#define CPP_PREDEFINES "-DPPC -D__rtems__ -D__USE_INIT_FINI__ \
    -Asystem=rtems -Acpu=powerpc -Amachine=powerpc"
+
+#undef CPP_OS_DEFAULT_SPEC
+#define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)"
index 635e926f8c8314c78e04a69b3146c72c9e2eadea..ecc37ee25ed55258cdbc27ea1e34974587f75400 100644 (file)
@@ -1,5 +1,5 @@
 /* Target definitions for GNU compiler for PowerPC running System V.4
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
@@ -1318,6 +1318,21 @@ ncrtn.o%s"
 #define CPP_OS_NETBSD_SPEC "\
 -D__powerpc__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__"
 
+/* RTEMS support.  */  
+
+#define CPP_OS_RTEMS_SPEC "\
+%{!mcpu*:  %{!Dppc*: %{!Dmpc*: -Dmpc750} } }\
+%{mcpu=403:  %{!Dppc*: %{!Dmpc*: -Dppc403}  } } \
+%{mcpu=505:  %{!Dppc*: %{!Dmpc*: -Dmpc505}  } } \
+%{mcpu=601:  %{!Dppc*: %{!Dmpc*: -Dppc601}  } } \
+%{mcpu=602:  %{!Dppc*: %{!Dmpc*: -Dppc602}  } } \
+%{mcpu=603:  %{!Dppc*: %{!Dmpc*: -Dppc603}  } } \
+%{mcpu=603e: %{!Dppc*: %{!Dmpc*: -Dppc603e} } } \
+%{mcpu=604:  %{!Dppc*: %{!Dmpc*: -Dmpc604}  } } \
+%{mcpu=750:  %{!Dppc*: %{!Dmpc*: -Dmpc750}  } } \
+%{mcpu=821:  %{!Dppc*: %{!Dmpc*: -Dmpc821}  } } \
+%{mcpu=860:  %{!Dppc*: %{!Dmpc*: -Dmpc860}  } }" 
+
 /* VxWorks support.  */
 /* VxWorks does all the library stuff itself.  */
 #define LIB_VXWORKS_SPEC ""
@@ -1439,6 +1454,7 @@ ncrtn.o%s"
   { "cpp_os_linux",            CPP_OS_LINUX_SPEC },                    \
   { "cpp_os_netbsd",           CPP_OS_NETBSD_SPEC },                   \
   { "cpp_os_vxworks",          CPP_OS_VXWORKS_SPEC },                  \
+  { "cpp_os_rtems",            CPP_OS_RTEMS_SPEC },                    \
   { "cpp_os_default",          CPP_OS_DEFAULT_SPEC },
 
 /* Define this macro as a C expression for the initializer of an
diff --git a/gcc/config/rs6000/t-rtems b/gcc/config/rs6000/t-rtems
new file mode 100644 (file)
index 0000000..364a22d
--- /dev/null
@@ -0,0 +1,86 @@
+# Multilibs for powerpc RTEMS targets.
+
+MULTILIB_OPTIONS       = \
+mcpu=403/mcpu=505/mcpu=601/mcpu=602/mcpu=603/mcpu=603e/mcpu=604/mcpu=750/mcpu=821/mcpu=860 \
+Dmpc509/Dmpc8260 \
+D_OLD_EXCEPTIONS \
+msoft-float
+
+MULTILIB_DIRNAMES      = \
+m403 m505 m601 m602 m603 m603e m604 m750 m821 m860 \
+mpc509 \
+mpc8260 \
+roe \
+nof
+
+MULTILIB_EXTRA_OPTS    = mrelocatable-lib mno-eabi mstrict-align
+
+# MULTILIB_MATCHES     = ${MULTILIB_MATCHES_FLOAT}
+MULTILIB_MATCHES       = ${MULTILIB_MATCHES_ENDIAN} \
+                         ${MULTILIB_MATCHES_SYSV} \
+                         mcpu?505/Dmpc505=mcpu?505/Dmpc509
+
+#
+# RTEMS old/new-exceptions handling
+#
+# old-exception processing is depredicated, therefore
+#
+# * Cpu-variants supporting new exception processing are build 
+# with new exception processing only
+# * Cpu-variants not having been ported to new exception processing are
+# build with old and new exception processing
+#
+
+# Cpu-variants supporting new exception processing only
+MULTILIB_NEW_EXCEPTIONS_ONLY = \
+*mcpu=604*/*D_OLD_EXCEPTIONS* \
+*mcpu=750*/*D_OLD_EXCEPTIONS* \
+*mcpu=821*/*D_OLD_EXCEPTIONS* \
+*Dmpc8260*/*D_OLD_EXCEPTIONS* \
+*mcpu=860*/*D_OLD_EXCEPTIONS*
+
+# Soft-float only, default implies msoft-float
+# NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
+MULTILIB_SOFTFLOAT_ONLY = \
+mcpu=403/*msoft-float* \
+mcpu=821/*msoft-float* \
+mcpu=860/*msoft-float*
+
+# Hard-float only, take out msoft-float
+MULTILIB_HARDFLOAT_ONLY = \
+mcpu=505/*msoft-float*
+
+MULTILIB_EXCEPTIONS =
+
+# Disallow -D_OLD_EXCEPTIONS without other options
+MULTILIB_EXCEPTIONS    += D_OLD_EXCEPTIONS*
+
+# Disallow -Dppc and -Dmpc without other options
+MULTILIB_EXCEPTIONS    += Dppc* Dmpc*
+
+MULTILIB_EXCEPTIONS    += \
+${MULTILIB_NEW_EXCEPTIONS_ONLY} \
+${MULTILIB_SOFTFLOAT_ONLY} \
+${MULTILIB_HARDFLOAT_ONLY}
+
+# Special rules
+# Take out all variants we don't want
+MULTILIB_EXCEPTIONS += mcpu=403/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=403/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=505/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=505/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=601/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=601/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=602/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=602/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=603/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=603/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=603e/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=604/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=604/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=750/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=750/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=821/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=821/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=860/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=860/Dmpc8260*