This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2] gcc: add support for the PowerPC EABI


# HG changeset patch
# User Mircea Gherzan <mgherzan@gmail.com>
# Date 1316262652 -7200
# Node ID 8bb35163e8a10d008b9bc8ee0d063ce2b67f248e
# Parent  8a612563c04c633c675146dd3478f7ee10ec2733
gcc: add support for the PowerPC EABI

diff -r 8a612563c04c -r 8bb35163e8a1 config/arch/powerpc.in.2
--- a/config/arch/powerpc.in.2	Fri Sep 16 17:49:28 2011 +0200
+++ b/config/arch/powerpc.in.2	Sat Sep 17 14:30:52 2011 +0200
@@ -1,8 +1,32 @@
 # powerpc specific configuration file
 
-config ARCH_POWERPC_SPE
+config ARCH_powerpc_ABI
+    string
+    default ""     if ARCH_powerpc_ABI_DEFAULT
+    default "eabi" if ARCH_powerpc_ABI_EABI
+    default "spe"  if ARCH_powerpc_ABI_SPE
+
+choice
     bool
-    prompt "Enable SPE support"
+    prompt "ABI"
+    default ARCH_powerpc_ABI_DEFAULT
+
+config ARCH_powerpc_ABI_DEFAULT
+    bool
+    prompt "default"
+    help
+      The default ABI (System V.4). 
+
+config ARCH_powerpc_ABI_EABI
+    bool
+    prompt "EABI"
+    depends on BARE_METAL
+    help
+      The Embedded ABI (stack alignment of 8 bytes, etc).
+
+config ARCH_powerpc_ABI_SPE
+    bool
+    prompt "SPE"
     help
       Add support for the Signal Processing Engine.  This will set up
       the toolchain so that it supports the SPE ABI extensions. This
@@ -14,3 +38,6 @@
       will also automatically add "-mabi=spe -mspe" to your TARGET_CFLAGS,
       and "--enable-e500_double" to your CC_EXTRA_CONFIG_ARRAY, so you
       do not need to explicitly add them.
+
+endchoice
+
diff -r 8a612563c04c -r 8bb35163e8a1 scripts/build/arch/powerpc.sh
--- a/scripts/build/arch/powerpc.sh	Fri Sep 16 17:49:28 2011 +0200
+++ b/scripts/build/arch/powerpc.sh	Sat Sep 17 14:30:52 2011 +0200
@@ -6,14 +6,20 @@
         CT_TARGET_ARCH="powerpc64"
     fi
 
-    # Add spe in the tuple if needed
-    case "${CT_LIBC},${CT_ARCH_POWERPC_SPE}" in
-        glibc,|eglibc,)   CT_TARGET_SYS=gnu;;
-        glibc,y|eglibc,y) CT_TARGET_SYS=gnuspe;;
+    CT_TARGET_SYS="gnu"
+    case "${CT_ARCH_powerpc_ABI}" in
+        "") ;;
+        eabi) CT_TARGET_SYS="eabi";;
+        spe)
+            case "${CT_LIBC}" in
+                glibc|eglibc) CT_TARGET_SYS="gnuspe";;
+                *)            CT_TARGET_SYS="spe";
+            esac
+            ;;
     esac
 
     # Add extra flags for SPE if needed
-    if [ "${CT_ARCH_POWERPC_SPE}" = "y" ]; then
+    if [ "${CT_ARCH_powerpc_ABI_SPE}" = "y" ]; then
         CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe"
         CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double"
         CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double"

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]