diff mbox

powerpc: add powerpc64le support

Message ID 64bfbbced9dd8f62e0d6.1399801945@gun
State Accepted
Commit eb13867a034c
Headers show

Commit Message

Cody P Schafer May 11, 2014, 9:52 a.m. UTC
# HG changeset patch
# User Cody P Schafer <dev@codyps.com>
# Date 1399801832 25200
#      Sun May 11 02:50:32 2014 -0700
# Node ID 64bfbbced9dd8f62e0d64936c54b46653a87dd12
# Parent  53aa6fe55269fd11e7cee8ad6d13cb5ee0a7c3de
powerpc: add powerpc64le support

Technically, I don't forbid powerpcle support either, but I'm not sure that
there is any library/compiler support for that at the moment (though the hw
technically makes it possible).

powerpc64le needs glibc 2.19 and gcc 4.9. I haven't looked into the support
tools, but at least gdb 7.5 is too old (7.7.1 definitely has support).

Also make powerpc64 non-experimental. It's practically old at this point.

Signed-of-by: Cody P Schafer <dev@codyps.com>


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

Comments

Yann E. MORIN May 11, 2014, 9:43 p.m. UTC | #1
Cody, All,

On 2014-05-11 02:52 -0700, Cody P Schafer spake thusly:
> # HG changeset patch
> # User Cody P Schafer <dev@codyps.com>
> # Date 1399801832 25200
> #      Sun May 11 02:50:32 2014 -0700
> # Node ID 64bfbbced9dd8f62e0d64936c54b46653a87dd12
> # Parent  53aa6fe55269fd11e7cee8ad6d13cb5ee0a7c3de
> powerpc: add powerpc64le support
> 
> Technically, I don't forbid powerpcle support either, but I'm not sure that
> there is any library/compiler support for that at the moment (though the hw
> technically makes it possible).
> 
> powerpc64le needs glibc 2.19 and gcc 4.9. I haven't looked into the support
> tools, but at least gdb 7.5 is too old (7.7.1 definitely has support).
> 
> Also make powerpc64 non-experimental. It's practically old at this point.

That's not PPC64 that is experimental; it is the support thereof in
crosstool-NG that is experimental. If it works for you, I am happy to
remove it, of course! :-)

> Signed-of-by: Cody P Schafer <dev@codyps.com>
> 
> diff --git a/config/arch/powerpc.in b/config/arch/powerpc.in
> --- a/config/arch/powerpc.in
> +++ b/config/arch/powerpc.in
> @@ -1,8 +1,10 @@
>  # powerpc specific configuration file
>  
>  ## select ARCH_SUPPORTS_32
> -## select ARCH_SUPPORTS_64 if EXPERIMENTAL
> +## select ARCH_SUPPORTS_64
>  ## select ARCH_DEFAULT_32
> +## select ARCH_SUPPORTS_BOTH_ENDIAN
> +## select ARCH_DEFAULT_BE
>  ## select ARCH_USE_MMU
>  ## select ARCH_SUPPORTS_WITH_ABI
>  ## select ARCH_SUPPORTS_WITH_CPU
> diff --git a/scripts/build/arch/powerpc.sh b/scripts/build/arch/powerpc.sh
> --- a/scripts/build/arch/powerpc.sh
> +++ b/scripts/build/arch/powerpc.sh
> @@ -3,9 +3,19 @@
>  CT_DoArchTupleValues () {
>      # The architecture part of the tuple, override only for 64-bit
>      if [ "${CT_ARCH_64}" = "y" ]; then
> -        CT_TARGET_ARCH="powerpc64${CT_ARCH_SUFFIX}"
> +        _64="64"
> +    else
> +        _64=""

You forgot to declare that variable. Fixed.

>      fi
>  
> +    if [ "${CT_ARCH_ENDIAN}" = big ] ; then
> +        _le=""
> +    else
> +        _le="le"

We already have ${target_endian_el} for that. We're missing
${target_endian_le} which I've added and used. Fixed.

Thanks!

Regards,
Yann E. MORIN.

> +    fi
> +
> +    CT_TARGET_ARCH="powerpc${_64}${_le}${CT_ARCH_SUFFIX}"
> +
>      # Only override values when ABI is not the default
>      case "${CT_ARCH_powerpc_ABI}" in
>          eabi)
> 
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
Yann E. MORIN May 11, 2014, 10:19 p.m. UTC | #2
Cody, All,

Your patch:
    arch/powerpc: add powerpc64le support

has been applied as: #eb13867a034c
    http://crosstool-ng.org/hg/crosstool-ng/rev/eb13867a034c

Thank you!

Regards,
Yann E. MORIN.



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

Patch

diff --git a/config/arch/powerpc.in b/config/arch/powerpc.in
--- a/config/arch/powerpc.in
+++ b/config/arch/powerpc.in
@@ -1,8 +1,10 @@ 
 # powerpc specific configuration file
 
 ## select ARCH_SUPPORTS_32
-## select ARCH_SUPPORTS_64 if EXPERIMENTAL
+## select ARCH_SUPPORTS_64
 ## select ARCH_DEFAULT_32
+## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_DEFAULT_BE
 ## select ARCH_USE_MMU
 ## select ARCH_SUPPORTS_WITH_ABI
 ## select ARCH_SUPPORTS_WITH_CPU
diff --git a/scripts/build/arch/powerpc.sh b/scripts/build/arch/powerpc.sh
--- a/scripts/build/arch/powerpc.sh
+++ b/scripts/build/arch/powerpc.sh
@@ -3,9 +3,19 @@ 
 CT_DoArchTupleValues () {
     # The architecture part of the tuple, override only for 64-bit
     if [ "${CT_ARCH_64}" = "y" ]; then
-        CT_TARGET_ARCH="powerpc64${CT_ARCH_SUFFIX}"
+        _64="64"
+    else
+        _64=""
     fi
 
+    if [ "${CT_ARCH_ENDIAN}" = big ] ; then
+        _le=""
+    else
+        _le="le"
+    fi
+
+    CT_TARGET_ARCH="powerpc${_64}${_le}${CT_ARCH_SUFFIX}"
+
     # Only override values when ABI is not the default
     case "${CT_ARCH_powerpc_ABI}" in
         eabi)