From 010e6251d4338e37676934347110435584025728 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Mon, 5 Oct 2015 13:58:01 -0700 Subject: [PATCH] fix kernel build when using gcc > 4.9 --- .../4.1.10/linux-004-fix-build-with-gcc-5.patch | 16 ++++++++++++++++ .../patches/linux/004-fix-build-with-gcc-5.patch | 16 ++++++++++++++++ .../linux/linux-004-fix-build-with-gcc-5.patch | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 packages/linux/patches/4.1.10/linux-004-fix-build-with-gcc-5.patch create mode 100644 projects/WeTek_Play/patches/linux/004-fix-build-with-gcc-5.patch create mode 100644 projects/imx6/patches/linux/linux-004-fix-build-with-gcc-5.patch diff --git a/packages/linux/patches/4.1.10/linux-004-fix-build-with-gcc-5.patch b/packages/linux/patches/4.1.10/linux-004-fix-build-with-gcc-5.patch new file mode 100644 index 0000000000..bc256d1538 --- /dev/null +++ b/packages/linux/patches/4.1.10/linux-004-fix-build-with-gcc-5.patch @@ -0,0 +1,16 @@ +# see https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383 +# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932 + +diff -Naur linux-4.1.10.orig/arch/arm/Makefile linux-4.1.10/arch/arm/Makefile +--- linux-4.1.10.orig/arch/arm/Makefile 2015-10-03 04:49:38.000000000 -0700 ++++ linux-4.1.10/arch/arm/Makefile 2015-10-05 13:43:26.066966475 -0700 +@@ -118,7 +118,8 @@ + endif + + # Need -Uarm for gcc < 3.x +-KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm ++# Maybe we need -fno-ipa-sra for gcc > 4.9.x ++KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm -fno-ipa-sra + KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float + + CHECKFLAGS += -D__arm__ diff --git a/projects/WeTek_Play/patches/linux/004-fix-build-with-gcc-5.patch b/projects/WeTek_Play/patches/linux/004-fix-build-with-gcc-5.patch new file mode 100644 index 0000000000..d4969f2b67 --- /dev/null +++ b/projects/WeTek_Play/patches/linux/004-fix-build-with-gcc-5.patch @@ -0,0 +1,16 @@ +# see https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383 +# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932 + +diff -Naur linux-amlogic-3.10-753dc30.orig/arch/arm/Makefile linux-amlogic-3.10-753dc30/arch/arm/Makefile +--- linux-amlogic-3.10-753dc30.orig/arch/arm/Makefile 2015-09-30 12:37:18.000000000 -0700 ++++ linux-amlogic-3.10-753dc30/arch/arm/Makefile 2015-10-05 13:39:01.341686718 -0700 +@@ -116,7 +116,8 @@ + endif + + # Need -Uarm for gcc < 3.x +-KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm ++# Maybe we need -fno-ipa-sra for gcc > 4.9.x ++KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm -fno-ipa-sra + KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float + + CHECKFLAGS += -D__arm__ diff --git a/projects/imx6/patches/linux/linux-004-fix-build-with-gcc-5.patch b/projects/imx6/patches/linux/linux-004-fix-build-with-gcc-5.patch new file mode 100644 index 0000000000..89800d7bca --- /dev/null +++ b/projects/imx6/patches/linux/linux-004-fix-build-with-gcc-5.patch @@ -0,0 +1,16 @@ +# see https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383 +# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932 + +diff -Naur linux-cuboxi-3.14-ea83bda.orig/arch/arm/Makefile linux-cuboxi-3.14-ea83bda/arch/arm/Makefile +--- linux-cuboxi-3.14-ea83bda.orig/arch/arm/Makefile 2015-05-06 10:05:43.000000000 -0700 ++++ linux-cuboxi-3.14-ea83bda/arch/arm/Makefile 2015-10-05 13:51:43.641612713 -0700 +@@ -120,7 +120,8 @@ + endif + + # Need -Uarm for gcc < 3.x +-KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm ++# Maybe we need -fno-ipa-sra for gcc > 4.9.x ++KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm -fno-ipa-sra + KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float + + CHECKFLAGS += -D__arm__