kumquat-buildroot/board/qemu/ppc-mpc8544ds/patches/linux/0001-powerpc-Fix-mcpu-options-for-SPE-only-compiler.patch
Geoffrey Le Gourriérec 742f37de8d configs/qemu_*: bump kernel version to 5.10.7
Bump most QEMU defconfigs (every one that was previously on 5.4.y)
to latest longterm kernel 5.10.7.

Please note the following exceptions/modifications:
- board/qemu/qemu_s390x_defconfig: ignored (already up to date)
- board/qemu/sh4*-r2d:
    - Remove the remaining kernel patch [1] provided by Alan Modra
      fixing rodata alignment, carried here by Romain Naour [2] to
      fix an issue preventing kernel from booting with binutils 2.23.
      Patch is present in upstream Linux now.
    - Fix compile-time error regarding 64-bit time data structures
      from kernel headers when building with uclibc. Previous fix [3]
      existed upstream; but see details below.
    - board/qemu/ppc-mpc8544ds: Updated kernel patch
- board/qemu/arm-versatile: Updated kernel patch
- board/qemu/mips*r6*: Updated kernel patch

Tested on all configs/qemu* configurations. [4]

[1] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html
[2] https://git.busybox.net/buildroot/commit/?id=a2331c8a61bdd71c47492efc818fb0458a349219
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc94cf2092c7c1267fa2deb8388d624f50eba808
[4] https://gitlab.com/clumsyape/buildroot/-/pipelines/244024195

Signed-off-by: Geoffrey Le Gourriérec <geoffrey.legourrierec@gmail.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-01-21 22:36:12 +01:00

54 lines
1.7 KiB
Diff

From a0919e3177295f4aaa9006915adcddc31788d809 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Wed, 26 Dec 2018 00:00:40 +0000
Subject: [PATCH] powerpc: Fix -mcpu= options for SPE-only compiler
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>
[Romain: Patch from Debian repository:
https://salsa.debian.org/kernel-team/linux/-/blob/buster/debian/patches/bugfix/powerpc/powerpc-fix-mcpu-options-for-spe-only-compiler.patch]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
arch/powerpc/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 5c8c06215dd4..e3dbea6d7ae0 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 ?=
@@ -164,6 +164,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
@@ -175,6 +176,7 @@ endif
else
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
endif
+endif
ifdef CONFIG_FUNCTION_TRACER
CC_FLAGS_FTRACE := -pg
--
2.17.1