]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc, qemuppc: Explicitly disable forcing SPE flags
authorKhem Raj <raj.khem@gmail.com>
Sat, 30 Jan 2016 06:28:37 +0000 (06:28 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 30 Jan 2016 11:40:41 +0000 (11:40 +0000)
G4 does not have SPE, so we make that explicit in the tune files and
since we emulate G4 when building Qemu, we ensure it for qemuppc as
well.

GCC config for powerpc-linux is made to include SPE by default which is
equivalent if the tripet was powerpc-linux*spe, this forces gcc to
configure assembler to enable -mspe by default, when we do that then the
kernel fails to compile with binutils 2.26, since newer assembler is
smart to detect the tlbia instructions are not compatible with SPE and
hence the kernel build breaks rightly. We configure the kernel for G4 as
well where it enables tlbia instrucitons rightly so because it thinks
its being configured for power4. So we keep the options but do not force
-mspe down to assembler as default.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/machine/include/tune-ppc7400.inc
meta/conf/machine/qemuppc.conf
meta/recipes-devtools/gcc/gcc-5.3/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch

index 8bfda56c255450b4b24c7020061ad647315d461e..425e8bd21524eed638e0ba9769cc9cb3f10f40b8 100644 (file)
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ppc7400"
 require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNEVALID[ppc7400] = "Enable ppc7400 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppc7400', ' -mcpu=7400', '', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppc7400', ' -mcpu=7400 -mno-spe', '', d)}"
 
 AVAILTUNES += "ppc7400"
 TUNE_FEATURES_tune-ppc7400 = "m32 fpu-hard ppc7400 altivec"
index 85cbbf798d5b54f11454fa080d897a98b2722bb2..bf0038ddba53d0d38cda21f260e7e4c6fc973a34 100644 (file)
@@ -5,6 +5,8 @@
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-ppc7400.inc
 
+TARGET_CC_KERNEL_ARCH = "-mno-spe"
+
 KERNEL_IMAGETYPE = "vmlinux"
 
 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
index e7ca360ae5512e8cbd1b83079d83e02eac2105dc..57051871b3ebaf77929750686aaaa73fb0b134c5 100644 (file)
@@ -19,11 +19,11 @@ Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
  gcc/config.gcc | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
 
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index dd0739d..3825bd5 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2343,7 +2343,14 @@ powerpc-*-rtems*)
+Index: gcc-5.3.0/gcc/config.gcc
+===================================================================
+--- gcc-5.3.0.orig/gcc/config.gcc
++++ gcc-5.3.0/gcc/config.gcc
+@@ -2346,7 +2346,14 @@ powerpc-*-rtems*)
        tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
        ;;
  powerpc*-*-linux*)
@@ -39,6 +39,14 @@ index dd0739d..3825bd5 100644
        extra_options="${extra_options} rs6000/sysv4.opt"
        tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
        extra_objs="$extra_objs rs6000-linux.o"
--- 
-2.6.3
-
+Index: gcc-5.3.0/gcc/config/rs6000/linuxspe.h
+===================================================================
+--- gcc-5.3.0.orig/gcc/config/rs6000/linuxspe.h
++++ gcc-5.3.0/gcc/config/rs6000/linuxspe.h
+@@ -27,6 +27,3 @@
+ #undef        TARGET_DEFAULT
+ #define TARGET_DEFAULT MASK_STRICT_ALIGN
+ #endif
+-
+-#undef  ASM_DEFAULT_SPEC
+-#define       ASM_DEFAULT_SPEC "-mppc -mspe -me500"