kernel: prevent -f*-sections from leaking into the boot zImage wrapper on arm
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-3.8 / 220-gc_sections.patch
index 89dc863e455d63b3cfc4065164995def09d785b0..66312952d6f3a0e4234b4a69f32e34ba5506f142 100644 (file)
                __pv_table_end = .;
        }
        .init.data : {
                __pv_table_end = .;
        }
        .init.data : {
+--- a/arch/arm/boot/compressed/Makefile
++++ b/arch/arm/boot/compressed/Makefile
+@@ -119,6 +119,7 @@ ifeq ($(CONFIG_FUNCTION_TRACER),y)
+ ORIG_CFLAGS := $(KBUILD_CFLAGS)
+ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
+ endif
++KBUILD_CFLAGS_KERNEL := $(patsubst -f%-sections,,$(KBUILD_CFLAGS_KERNEL))
+ ccflags-y := -fpic -fno-builtin -I$(obj)
+ asflags-y := -Wa,-march=all -DZIMAGE