powerpc: add powerpc64 and powerpc64le support
authorCody P Schafer <cody@linux.vnet.ibm.com>
Tue, 13 May 2014 05:28:21 +0000 (22:28 -0700)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 26 May 2014 19:48:33 +0000 (21:48 +0200)
This enables powerpc64 and powerpc64le. Currently, le needs at least
glibc 2.19 and gcc 4.9.0. For gdb, 7.7.1 works (added in an earlier
patch).

[Peter: also disallow gcc 4.8 for ppc64le]
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile
arch/Config.in
arch/Config.in.powerpc
linux/Config.in
package/Makefile.in
package/gcc/Config.in.host
package/glibc/Config.in
package/libatomic_ops/Config.in
package/openssl/openssl.mk
package/systemd/Config.in
toolchain/toolchain-buildroot/Config.in

index 7363ee538f5d44ea9094c8a6a5a8d1469f6f1ad2..2ee5c81cd0373965b172d7d5f0e661e0dc84137a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ export HOSTARCH := $(shell uname -m | \
            -e s/sun4u/sparc64/ \
            -e s/arm.*/arm/ \
            -e s/sa110/arm/ \
-           -e s/ppc64/powerpc/ \
+           -e s/ppc64/powerpc64/ \
            -e s/ppc/powerpc/ \
            -e s/macppc/powerpc/\
            -e s/sh.*/sh/)
index 2114dd84236fa7c934c98aee6fa09e3a79425765..1f60f81e4b9e5118edb5c4f0d28ff745478406c2 100644 (file)
@@ -140,6 +140,16 @@ config BR2_powerpc
        bool "PowerPC"
        help
          PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
+         Big endian.
+         http://www.power.org/
+         http://en.wikipedia.org/wiki/Powerpc
+
+config BR2_powerpc64
+       bool "PowerPC64 (big endian)"
+       select BR2_ARCH_IS_64
+       help
+         PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
+         Big endian.
          http://www.power.org/
          http://en.wikipedia.org/wiki/Powerpc
 
@@ -148,6 +158,7 @@ config BR2_powerpc64le
        select BR2_ARCH_IS_64
        help
          PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
+         Little endian.
          http://www.power.org/
          http://en.wikipedia.org/wiki/Powerpc
 
@@ -329,7 +340,7 @@ if BR2_nios2
 source "arch/Config.in.nios2"
 endif
 
-if BR2_powerpc || BR2_powerpc64le
+if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
 source "arch/Config.in.powerpc"
 endif
 
index c8a21b5fcf00a729442b481b21acf6874fdc5b56..e444cb8e262b5b1836e897fefdedb70f48e56c97 100644 (file)
@@ -150,10 +150,11 @@ config BR2_POWERPC_SOFT_FLOAT
 
 config BR2_ARCH
        default "powerpc"       if BR2_powerpc
+       default "powerpc64"     if BR2_powerpc64
        default "powerpc64le"   if BR2_powerpc64le
 
 config BR2_ENDIAN
-       default "BIG"    if BR2_powerpc
+       default "BIG"    if BR2_powerpc || BR2_powerpc64
        default "LITTLE" if BR2_powerpc64le
 
 config BR2_GCC_TARGET_TUNE
index cc1127ade0f1236e2dc7a7b70d0def749f6b1087..9732bb95fed3ffefc19b7259f237c8e42982ff15 100644 (file)
@@ -184,7 +184,8 @@ config BR2_LINUX_KERNEL_BZIMAGE
 
 config BR2_LINUX_KERNEL_ZIMAGE
        bool "zImage"
-       depends on BR2_arm || BR2_armeb || BR2_powerpc || BR2_sparc || \
+       depends on BR2_arm || BR2_armeb || BR2_powerpc || \
+                  BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \
                   BR2_sh || BR2_sh64 || BR2_xtensa
 
 config BR2_LINUX_KERNEL_APPENDED_ZIMAGE
index 2fc3aa7e0fe93110538d27024f6080fd144c6d2c..0233506c79d75727994b2e19019ee4bc04e17d3f 100644 (file)
@@ -321,7 +321,7 @@ endif
 ifeq ($(BR2_m68k),y)
 BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=no
 endif
-ifeq ($(BR2_powerpc)$(BR2_ENDIAN),yBIG)
+ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
 BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=no
 endif
 
index ff2524809555738b01a0a83e48c10b6a7d281a01..fd2c5e8e98193dd417fb624ec6e41cb4101706b7 100644 (file)
@@ -20,14 +20,14 @@ choice
                bool "gcc 4.2.2-avr32-2.1.5"
 
        config BR2_GCC_VERSION_4_3_X
-               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a8 && !BR2_cortex_a9 && !BR2_cortex_a12 && !BR2_cortex_a15 && !BR2_x86_corei7 && !BR2_x86_atom && !BR2_x86_jaguar && !BR2_powerpc_e300c2 && !BR2_powerpc_e300c3 && !BR2_powerpc_e500mc && !BR2_powerpc_464 && !BR2_powerpc_464fp && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4
+               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a8 && !BR2_cortex_a9 && !BR2_cortex_a12 && !BR2_cortex_a15 && !BR2_x86_corei7 && !BR2_x86_atom && !BR2_x86_jaguar && !BR2_powerpc_e300c2 && !BR2_powerpc_e300c3 && !BR2_powerpc_e500mc && !BR2_powerpc_464 && !BR2_powerpc_464fp && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4 && !BR2_powerpc64le
                depends on !BR2_ARM_EABIHF
                bool "gcc 4.3.x"
                # musl patches only for gcc 4.7+
                depends on !BR2_TOOLCHAIN_BUILDROOT_MUSL
 
        config BR2_GCC_VERSION_4_4_X
-               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a12 && !BR2_cortex_a15 && !BR2_x86_corei7 && !BR2_x86_atom && !BR2_x86_jaguar && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4
+               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a12 && !BR2_cortex_a15 && !BR2_x86_corei7 && !BR2_x86_atom && !BR2_x86_jaguar && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4 && !BR2_powerpc64le
                bool "gcc 4.4.x"
                # ARM EABIhf support appeared in gcc 4.6
                depends on !BR2_ARM_EABIHF
@@ -37,7 +37,7 @@ choice
                depends on !BR2_TOOLCHAIN_BUILDROOT_MUSL
 
        config BR2_GCC_VERSION_4_5_X
-               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_cortex_a7 && !BR2_cortex_a12 && !BR2_cortex_a15 && !BR2_x86_corei7 && !BR2_x86_jaguar && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 && !BR2_pj4
+               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_cortex_a7 && !BR2_cortex_a12 && !BR2_cortex_a15 && !BR2_x86_corei7 && !BR2_x86_jaguar && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 && !BR2_pj4 && !BR2_powerpc64le
                select BR2_GCC_NEEDS_MPC
                # ARM EABIhf support appeared in gcc 4.6
                depends on !BR2_ARM_EABIHF
@@ -46,19 +46,19 @@ choice
                bool "gcc 4.5.x"
 
        config BR2_GCC_VERSION_4_6_X
-               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a7 && !BR2_cortex_a12 && !BR2_x86_jaguar && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
+               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a7 && !BR2_cortex_a12 && !BR2_x86_jaguar && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 && !BR2_powerpc64le
                select BR2_GCC_NEEDS_MPC
                # musl patches only for gcc 4.7+
                depends on !BR2_TOOLCHAIN_BUILDROOT_MUSL
                bool "gcc 4.6.x"
 
        config BR2_GCC_VERSION_4_7_X
-               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a12 && !BR2_x86_jaguar && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
+               depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a12 && !BR2_x86_jaguar && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 && !BR2_powerpc64le
                select BR2_GCC_NEEDS_MPC
                bool "gcc 4.7.x"
 
        config BR2_GCC_VERSION_4_8_X
-               depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a12 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8
+               depends on !BR2_microblaze && !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a12 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_powerpc64le
                select BR2_GCC_NEEDS_MPC
                bool "gcc 4.8.x"
 
index b69056576614b14b21cb86bb63527862b8954c66..d1ad3de47a09be2bcaf5b35d324f8f2d6469ad66 100644 (file)
@@ -2,20 +2,21 @@ if BR2_TOOLCHAIN_BUILDROOT_GLIBC
 
 choice
        prompt "glibc version"
-       default BR2_GLIBC_VERSION_2_19 if BR2_powerpc64le
        default BR2_GLIBC_VERSION_2_18
        # Architectures supported in mainline glibc
        depends on BR2_arm         || BR2_armeb    || BR2_aarch64 || \
                   BR2_i386        || BR2_mips     || BR2_mipsel  || \
                   BR2_mips64      || BR2_mips64el || BR2_powerpc || \
-                  BR2_powerpc64le || BR2_sh       || BR2_sh64    || \
-                  BR2_sparc       || BR2_x86_64   || BR2_microblaze
+                  BR2_powerpc64   || BR2_powerpc64le || BR2_sh   || \
+                  BR2_sh64        || BR2_sparc    || BR2_x86_64  || \\
+                  BR2_microblaze
 
 config BR2_GLIBC_VERSION_2_18
-       bool "2.18"
+       bool "2.18"
+       depends on !BR2_powerpc64le
 
 config BR2_GLIBC_VERSION_2_19
-       bool "2.19"
+       bool "2.19"
 
 endchoice
 
index f0a55a49dc4f96f37c9cf8e943056c92ac88a28d..fe1efd4f2a70a237f691bb750dde1e71e1bc9686 100644 (file)
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS
        bool
-       default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64
+       default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64
 
 config BR2_PACKAGE_LIBATOMIC_OPS
        bool "libatomic_ops"
index 52abb46dafa3b857e5b354473b6105e31871c58e..87bc2efcd499ebbb2d61fd9e2b754722c7bc2334 100644 (file)
@@ -42,6 +42,12 @@ ifeq ($(BR2_powerpc_401)$(BR2_powerpc_403)$(BR2_powerpc_405)$(BR2_powerpc_405fp)
        OPENSSL_TARGET_ARCH = ppc
 endif
 endif
+ifeq ($(ARCH),powerpc64)
+       OPENSSL_TARGET_ARCH = ppc64
+endif
+ifeq ($(ARCH),powerpc64le)
+       OPENSSL_TARGET_ARCH = ppc64le
+endif
 ifeq ($(ARCH),x86_64)
        OPENSSL_TARGET_ARCH = x86_64
 endif
index f10637af707c35499590708199cd5c48a39f8b4e..25665339d6608c33d75e9d7c518bde10b2468bda 100644 (file)
@@ -2,7 +2,8 @@ config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
        bool
        # see src/shared/architecture.h
        default y if BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || \
-               BR2_mipsel || BR2_powerpc || BR2_sh4 || BR2_sh4eb || \
+               BR2_mipsel || BR2_powerpc || BR2_powerpc64 || \
+               BR2_powerpc64le || BR2_sh4 || BR2_sh4eb || \
                BR2_sh4a || BR2_sh4aeb || BR2_sparc || BR2_x86_64 || \
                BR2_aarch64 || BR2_m68k
 
index e19de4c331f49354d8f1ed91e4030f68fd708f9b..0a96e757b42efc347d9fa6fe3d74cb76646b2a03 100644 (file)
@@ -45,7 +45,7 @@ config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
                   BR2_i386   || BR2_mips     || BR2_mipsel  || \
                   BR2_mips64 || BR2_mips64el || BR2_powerpc || \
                   BR2_sh     || BR2_sh64     || BR2_sparc   || \
-                  BR2_x86_64 || BR2_microblaze
+                  BR2_x86_64 || BR2_microblaze || BR2_powerpc64
        depends on BR2_USE_MMU
        depends on !BR2_PREFER_STATIC_LIB
        select BR2_TOOLCHAIN_USES_GLIBC
@@ -62,8 +62,9 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
        depends on BR2_arm         || BR2_armeb    || BR2_aarch64 || \
                   BR2_i386        || BR2_mips     || BR2_mipsel  || \
                   BR2_mips64      || BR2_mips64el || BR2_powerpc || \
-                  BR2_powerpc64le || BR2_sh       || BR2_sh64    || \
-                  BR2_sparc       || BR2_x86_64   || BR2_microblaze
+                  BR2_powerpc64   || BR2_powerpc64le || BR2_sh   || \
+                  BR2_sh64        || BR2_sparc    || BR2_x86_64  || \
+                  BR2_microblaze
        depends on BR2_USE_MMU
        depends on !BR2_PREFER_STATIC_LIB
        select BR2_TOOLCHAIN_USES_GLIBC