...
 
Commits (1)
From: Finn Thain <fthain@telegraphics.com.au>
Date: Fri, 21 Dec 2018 17:21:43 +1100 (AEDT)
Subject: Build with -ffreestanding on m68k to avoid
risky optimizations involving libc
Origin: https://marc.info/?l=linux-m68k&m=154537329920545&w=2
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index 997c9f20ea0f..c318afd15e33 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -58,1 +58,1 @@ cpuflags-$(CONFIG_M5206e) := $(call cc-option,-mcpu=5206e,-m5200)
cpuflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200)
KBUILD_AFLAGS += $(cpuflags-y)
-KBUILD_CFLAGS += $(cpuflags-y) -pipe
+KBUILD_CFLAGS += $(cpuflags-y)
ifdef CONFIG_MMU
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
@@ -69,2 +69,2 @@ KBUILD_CFLAGS += -D__uClinux__
KBUILD_AFLAGS += -D__uClinux__
endif
+KBUILD_CFLAGS += -pipe -ffreestanding
+
KBUILD_LDFLAGS := -m m68kelf
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
......@@ -77,6 +77,7 @@ bugfix/arm/arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch
bugfix/powerpc/powerpc-boot-fix-missing-crc32poly.h-when-building-with-kernel_xz.patch
bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch
bugfix/x86/x86-32-disable-3dnow-in-generic-config.patch
bugfix/m68k/m68k-build-with-ffreestanding.patch
# Arch features
features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
......