public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Mircea Gherzan <mgherzan@gmail.com>
To: crossgcc@sourceware.org
Subject: [PATCH] gcc: add support for the PowerPC EABI
Date: Fri, 16 Sep 2011 00:20:00 -0000	[thread overview]
Message-ID: <ddb7a1b016c824a0ddaf.1316132342@beast3.kawo1.RWTH-Aachen.DE> (raw)

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

diff -r eda6ef5a2532 -r ddb7a1b016c8 config/arch/powerpc.in.2
--- a/config/arch/powerpc.in.2	Mon Sep 12 12:54:45 2011 +0200
+++ b/config/arch/powerpc.in.2	Fri Sep 16 02:18:13 2011 +0200
@@ -1,8 +1,31 @@
 # 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"
+    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 +37,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 eda6ef5a2532 -r ddb7a1b016c8 scripts/build/arch/powerpc.sh
--- a/scripts/build/arch/powerpc.sh	Mon Sep 12 12:54:45 2011 +0200
+++ b/scripts/build/arch/powerpc.sh	Fri Sep 16 02:18:13 2011 +0200
@@ -6,14 +6,23 @@
         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

             reply	other threads:[~2011-09-16  0:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16  0:20 Mircea Gherzan [this message]
2011-09-16 12:27 ` Yann E. MORIN
2011-09-19 15:40   ` Mircea Gherzan
2011-09-19 15:50     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ddb7a1b016c824a0ddaf.1316132342@beast3.kawo1.RWTH-Aachen.DE \
    --to=mgherzan@gmail.com \
    --cc=crossgcc@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).