Skip to contentSkip to conversation

Improve build environment isolation

PATCH New Vincent Sanders 1 participant 1 message Mar 13, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Improve build environment isolation

Increasingly distributions are setting default build environments to have LDFLAGS with hardening options. There seems to be an assumption with those options that LDFLAGS are passed to the compiler frontend rather than used directly with ld (which the kernel build process assumes)

To prevent build failures in such environments this patch changes the ARM architecture Makefile to override the LDFLAGS from the environment similar to the behaviour on other common architectures e.g. x86

--

arch/arm/Makefile +3 -0
index 1683bfb..0a05c44 100644
@@ -10,6 +10,9 @@
 #
 # Copyright (C) 1995-2001 by Russell King
 
+# Ensure linker flags are correct
+LDFLAGS		:=
+
 LDFLAGS_vmlinux	:=-p --no-undefined -X
 ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
 LDFLAGS_vmlinux	+= --be8