From 95ac24897d991281ddc37eb74401ccd26c599651 Mon Sep 17 00:00:00 2001 From: gixxpunk Date: Tue, 27 Feb 2018 19:58:52 +0100 Subject: [PATCH] - fix build with host gcc7 --- ...m.c-mark-__aeabi_unwind_cpp_pr0-WEAK.patch | 25 ------------------- ...of-check-for-empty-string-in-ubsan.c.patch | 11 ++++++++ make/crosstool.mk | 3 ++- 3 files changed, 13 insertions(+), 26 deletions(-) delete mode 100644 archive-patches/crosstool-ng/gcc/102-arm-unwind-arm.c-mark-__aeabi_unwind_cpp_pr0-WEAK.patch create mode 100644 archive-patches/crosstool-ng/gcc/999-gcc-6.3-backport-fix-of-check-for-empty-string-in-ubsan.c.patch diff --git a/archive-patches/crosstool-ng/gcc/102-arm-unwind-arm.c-mark-__aeabi_unwind_cpp_pr0-WEAK.patch b/archive-patches/crosstool-ng/gcc/102-arm-unwind-arm.c-mark-__aeabi_unwind_cpp_pr0-WEAK.patch deleted file mode 100644 index 3522ed4a..00000000 --- a/archive-patches/crosstool-ng/gcc/102-arm-unwind-arm.c-mark-__aeabi_unwind_cpp_pr0-WEAK.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1820fedfe68182ea1fcdd8e5242da2fd0860efd3 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Tue, 22 Jul 2014 15:30:17 -0400 -Subject: [PATCH] arm/unwind-arm.c: mark __aeabi_unwind_cpp_pr0 WEAK - ---- - libgcc/config/arm/unwind-arm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgcc/config/arm/unwind-arm.c b/libgcc/config/arm/unwind-arm.c -index ee23963..cda3388 100644 ---- a/libgcc/config/arm/unwind-arm.c -+++ b/libgcc/config/arm/unwind-arm.c -@@ -144,7 +144,7 @@ restore_non_core_regs (phase1_vrs * vrs) - - /* ABI defined personality routines. */ - extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr0 (_Unwind_State, -- _Unwind_Control_Block *, _Unwind_Context *);// __attribute__((weak)); -+ _Unwind_Control_Block *, _Unwind_Context *) __attribute__((weak)); - extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr1 (_Unwind_State, - _Unwind_Control_Block *, _Unwind_Context *) __attribute__((weak)); - extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr2 (_Unwind_State, --- -2.0.1 - diff --git a/archive-patches/crosstool-ng/gcc/999-gcc-6.3-backport-fix-of-check-for-empty-string-in-ubsan.c.patch b/archive-patches/crosstool-ng/gcc/999-gcc-6.3-backport-fix-of-check-for-empty-string-in-ubsan.c.patch new file mode 100644 index 00000000..72d86c14 --- /dev/null +++ b/archive-patches/crosstool-ng/gcc/999-gcc-6.3-backport-fix-of-check-for-empty-string-in-ubsan.c.patch @@ -0,0 +1,11 @@ +--- a/gcc/ubsan.c ++++ b/gcc/ubsan.c +@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc) + + expanded_location xloc = expand_location (loc); + if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0 +- || xloc.file == '\0' || xloc.file[0] == '\xff' ++ || xloc.file[0] == '\0' || xloc.file[0] == '\xff' + || xloc.file[1] == '\xff') + return false; + diff --git a/make/crosstool.mk b/make/crosstool.mk index efb2439e..20bd1dac 100644 --- a/make/crosstool.mk +++ b/make/crosstool.mk @@ -63,7 +63,7 @@ crosstool-arm-hd2: CROSS_DIR-check $(ARCHIVE)/gcc-linaro-$(GCC_VER).tar.xz $(SOU git clone https://github.com/crosstool-ng/crosstool-ng && \ cd crosstool-ng && \ git checkout 1dbb06f2 && \ - cp -a $(PATCHES)/crosstool-ng/gcc/* $(BUILD_TMP)/crosstool-ng/patches/gcc/linaro-4.9-2017.01 && \ + cp -a $(PATCHES)/crosstool-ng/gcc/* $(BUILD_TMP)/crosstool-ng/patches/gcc/linaro-6.3-2017.02 && \ unset CONFIG_SITE LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE && \ cd $(BUILD_TMP)/crosstool-ng && \ mkdir -p $(BUILD_TMP)/crosstool-ng/targets/src/ && \ @@ -96,6 +96,7 @@ crosstool-arm-hd51: CROSS_DIR-check git clone https://github.com/crosstool-ng/crosstool-ng && \ cd crosstool-ng && \ git checkout 1dbb06f2 && \ + cp -a $(PATCHES)/crosstool-ng/gcc/* $(BUILD_TMP)/crosstool-ng/patches/gcc/linaro-6.3-2017.02 && \ unset CONFIG_SITE LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE && \ cd $(BUILD_TMP)/crosstool-ng && \ mkdir -p $(BUILD_TMP)/crosstool-ng/targets/src/ && \