Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #62852

[PATCH] powerpc: Fix -mcpu= options for SPE-only compiler

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.debian.kernel
Subject [PATCH] powerpc: Fix -mcpu= options for SPE-only compiler
Date 2018-12-26 15:20 +0100
Message-ID <x9icp-3CE-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

GCC for Debian's "powerpcspe" architecture only supports 32-bit
SPE targets, and using -mcpu=powerpc or -mcpu=powerpc64 is a fatal
error.

* Change the test for a biarch compiler to pass both the -m32 and -m64
  options, so that it doesn't catch 32-bit-only compilers
* Add an ifdef CONFIG_PPC64 around the 64-bit CPU option definitions

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 arch/powerpc/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 488c9edffa58..c2e815863500 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -12,7 +12,7 @@
 # Rewritten by Cort Dougan and Paul Mackerras
 #
 
-HAS_BIARCH	:= $(call cc-option-yn, -m32)
+HAS_BIARCH	:= $(call cc-option-yn, -m32 -m64)
 
 # Set default 32 bits cross compilers for vdso and boot wrapper
 CROSS32_COMPILE ?=
@@ -166,6 +166,7 @@ CFLAGS-$(CONFIG_PPC32)	+= $(call cc-option, $(MULTIPLEWORD))
 
 CFLAGS-$(CONFIG_PPC32)	+= $(call cc-option,-mno-readonly-in-sdata)
 
+ifdef CONFIG_PPC64
 ifdef CONFIG_PPC_BOOK3S_64
 ifdef CONFIG_CPU_LITTLE_ENDIAN
 CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
@@ -177,6 +178,7 @@ endif
 else
 CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
 endif
+endif
 
 ifdef CONFIG_FUNCTION_TRACER
 CC_FLAGS_FTRACE := -pg

Back to linux.debian.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] powerpc: Fix -mcpu= options for SPE-only compiler Ben Hutchings <ben@decadent.org.uk> - 2018-12-26 15:20 +0100
  Re: [PATCH] powerpc: Fix -mcpu= options for SPE-only compiler Segher Boessenkool <segher@kernel.crashing.org> - 2018-12-27 02:20 +0100
    Re: [PATCH] powerpc: Fix -mcpu= options for SPE-only compiler Ben Hutchings <ben@decadent.org.uk> - 2018-12-27 03:40 +0100
      Re: [PATCH] powerpc: Fix -mcpu= options for SPE-only compiler Segher Boessenkool <segher@kernel.crashing.org> - 2018-12-29 16:40 +0100

csiph-web