From 98183e57dffaa155fc207a28e1c788ff50dc2054 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 15 Jun 2017 18:30:29 +0100 Subject: gcc: Drop 5.4 series We now have gcc 6 and gcc 7 recipes, the gcc 5 series can be dropped as we're no longer going to support it for targets. Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-5.4.inc | 139 ---------- .../0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 --- .../gcc/gcc-5.4/0008-missing-execinfo_h.patch | 28 -- .../gcc/gcc-5.4/0009-c99-snprintf.patch | 28 -- .../0010-gcc-poison-system-directories.patch | 192 ------------- .../gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch | 39 --- .../0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 ----- .../gcc/gcc-5.4/0013-64-bit-multilib-hack.patch | 85 ------ .../gcc/gcc-5.4/0014-optional-libstdc.patch | 101 ------- ...0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 59 ---- .../gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch | 38 --- ...efaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 ------- .../gcc-5.4/0018-fortran-cross-compile-hack.patch | 46 --- .../gcc/gcc-5.4/0019-libgcc-sjlj-check.patch | 74 ----- .../gcc/gcc-5.4/0020-cpp-honor-sysroot.patch | 54 ---- .../gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch | 57 ---- ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 216 --------------- ...0023-gcc-Fix-argument-list-too-long-error.patch | 40 --- .../gcc/gcc-5.4/0024-Disable-sdt.patch | 113 -------- .../gcc/gcc-5.4/0025-libtool.patch | 42 --- ...4-pass-fix-v4bx-to-linker-to-support-EABI.patch | 43 --- ...tilib-config-files-from-B-instead-of-usin.patch | 102 ------- ...-libdir-from-.la-which-usually-points-to-.patch | 31 --- .../gcc/gcc-5.4/0029-export-CPP.patch | 53 ---- ...AltiVec-generation-on-powepc-linux-target.patch | 52 ---- ...-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch | 42 --- ...Ensure-target-gcc-headers-can-be-included.patch | 98 ------- ...-t-build-with-disable-dependency-tracking.patch | 54 ---- ...h-host-directory-during-relink-if-inst_pr.patch | 38 --- ...-link-the-plugins-with-libgomp-explicitly.patch | 83 ------ ...IBS_DIR-replacement-instead-of-hardcoding.patch | 27 -- .../0037-aarch64-Add-support-for-musl-ldso.patch | 26 -- .../gcc/gcc-5.4/0038-fix-g-sysroot.patch | 56 ---- ...ibcc1-fix-libcc1-s-install-path-and-rpath.patch | 54 ---- ...-handle-sysroot-support-for-nativesdk-gcc.patch | 213 -------------- ...et-sysroot-gcc-version-specific-dirs-with.patch | 102 ------- ...-various-_FOR_BUILD-and-related-variables.patch | 137 --------- .../gcc/gcc-5.4/0043-libstdc-Support-musl.patch | 44 --- ...l-as-a-musl-libc-specifier-and-the-necess.patch | 270 ------------------ .../gcc-5.4/0045-Support-for-arm-linux-musl.patch | 216 --------------- ...et-rid-of-ever-broken-fixincludes-on-musl.patch | 28 -- .../0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 -- .../gcc/gcc-5.4/0048-ssp_nonshared.patch | 29 -- ...-weak-reference-logic-in-gthr.h-for-os-ge.patch | 78 ------ ...050-powerpc-pass-secure-plt-to-the-linker.patch | 66 ----- ...ug-prefix-map-in-producer-string-by-Danie.patch | 31 --- .../gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch | 103 ------- ...arget-65358-Avoid-clobbering-partial-argu.patch | 307 --------------------- .../gcc-5.4/0054-support-ffile-prefix-map.patch | 284 ------------------- ...ug-prefix-map-to-replace-ffile-prefix-map.patch | 43 --- ...-provide-ssp-and-gcc_cv_target_dl_iterate.patch | 85 ------ .../gcc/gcc-5.4/0057-unwind-fix-for-musl.patch | 42 --- ...prefix-map-support-to-remap-relative-path.patch | 51 ---- .../gcc/gcc-5.4/0059-libgcc-use-ldflags.patch | 16 -- .../gcc/gcc-5.4/CVE-2016-6131.patch | 251 ----------------- .../recipes-devtools/gcc/gcc-cross-canadian_5.4.bb | 5 - meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb | 2 - meta/recipes-devtools/gcc/gcc-cross_5.4.bb | 3 - .../gcc/gcc-crosssdk-initial_5.4.bb | 3 - meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb | 2 - meta/recipes-devtools/gcc/gcc-runtime_5.4.bb | 7 - meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb | 2 - meta/recipes-devtools/gcc/gcc-source_5.4.bb | 4 - meta/recipes-devtools/gcc/gcc_5.4.bb | 9 - meta/recipes-devtools/gcc/libgcc-initial_5.4.bb | 2 - meta/recipes-devtools/gcc/libgcc_5.4.bb | 2 - meta/recipes-devtools/gcc/libgfortran_5.4.bb | 3 - 67 files changed, 4789 deletions(-) delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4.inc delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-cross_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-runtime_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-source_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/gcc_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/libgcc-initial_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/libgcc_5.4.bb delete mode 100644 meta/recipes-devtools/gcc/libgfortran_5.4.bb diff --git a/meta/recipes-devtools/gcc/gcc-5.4.inc b/meta/recipes-devtools/gcc/gcc-5.4.inc deleted file mode 100644 index 3f3edfbe33..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4.inc +++ /dev/null @@ -1,139 +0,0 @@ -require gcc-common.inc - -# Third digit in PV should be incremented after a minor release - -PV = "5.4.0" - -#SNAP = "5-20150405" - -# BINV should be incremented to a revision after a minor gcc release - -BINV = "5.4.0" - -FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-5.4:${FILE_DIRNAME}/gcc-5.4/backport:" - -DEPENDS =+ "mpfr gmp libmpc zlib" -NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native" - -LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" - -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ -" -#BASEURI = "http://www.netgull.com/gcc/snapshots/${SNAP}/gcc-${SNAP}.tar.bz2" -BASEURI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2" - -SRC_URI = "\ - ${BASEURI} \ - ${BACKPORTS} \ - file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ - file://0008-missing-execinfo_h.patch \ - file://0009-c99-snprintf.patch \ - file://0010-gcc-poison-system-directories.patch \ - file://0011-gcc-poison-dir-extend.patch \ - file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ - file://0013-64-bit-multilib-hack.patch \ - file://0014-optional-libstdc.patch \ - file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ - file://0016-COLLECT_GCC_OPTIONS.patch \ - file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ - file://0018-fortran-cross-compile-hack.patch \ - file://0019-libgcc-sjlj-check.patch \ - file://0020-cpp-honor-sysroot.patch \ - file://0021-MIPS64-Default-to-N64-ABI.patch \ - file://0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ - file://0023-gcc-Fix-argument-list-too-long-error.patch \ - file://0024-Disable-sdt.patch \ - file://0025-libtool.patch \ - file://0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ - file://0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ - file://0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ - file://0029-export-CPP.patch \ - file://0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \ - file://0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \ - file://0032-Ensure-target-gcc-headers-can-be-included.patch \ - file://0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \ - file://0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ - file://0035-Dont-link-the-plugins-with-libgomp-explicitly.patch \ - file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ - file://0037-aarch64-Add-support-for-musl-ldso.patch \ - file://0038-fix-g-sysroot.patch \ - file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ - file://0040-handle-sysroot-support-for-nativesdk-gcc.patch \ - file://0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ - file://0042-Fix-various-_FOR_BUILD-and-related-variables.patch \ - file://0043-libstdc-Support-musl.patch \ - file://0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch \ - file://0045-Support-for-arm-linux-musl.patch \ - file://0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch \ - file://0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ - file://0048-ssp_nonshared.patch \ - file://0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch \ - file://0050-powerpc-pass-secure-plt-to-the-linker.patch \ - file://0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \ - file://0052-nios2-use-ret-with-r31.patch \ - file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \ - file://0054-support-ffile-prefix-map.patch \ - file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ - file://0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch \ - file://0057-unwind-fix-for-musl.patch \ - file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \ - file://0059-libgcc-use-ldflags.patch \ - file://CVE-2016-6131.patch \ -" - -BACKPORTS = "" - -SRC_URI[md5sum] = "4c626ac2a83ef30dfb9260e6f59c2b30" -SRC_URI[sha256sum] = "608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a" - -UPSTREAM_CHECK_REGEX = "gcc-(?P5\.\d+\.\d+).tar" - -#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${SNAP}" -S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" -B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" - -# Language Overrides -FORTRAN = "" -JAVA = "" - -LTO = "--enable-lto" - -EXTRA_OECONF_BASE = "\ - ${LTO} \ - --enable-libssp \ - --enable-libitm \ - --disable-bootstrap \ - --disable-libmudflap \ - --with-system-zlib \ - --with-linker-hash-style=${LINKER_HASH_STYLE} \ - --enable-linker-build-id \ - --with-ppl=no \ - --with-cloog=no \ - --enable-checking=release \ - --enable-cheaders=c_global \ - --without-isl \ -" - -EXTRA_OECONF_INITIAL = "\ - --disable-libmudflap \ - --disable-libgomp \ - --disable-libitm \ - --disable-libquadmath \ - --with-system-zlib \ - --disable-lto \ - --disable-plugin \ - --enable-decimal-float=no \ - --without-isl \ - gcc_cv_libc_provides_ssp=yes \ -" - -EXTRA_OECONF_PATHS = "\ - --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ - --with-sysroot=/not/exist \ - --with-build-sysroot=${STAGING_DIR_TARGET} \ -" diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch deleted file mode 100644 index 1aead9691a..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 6029bb338305a5d1403ee23427ed8d58eae1ff53 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:37:11 +0400 -Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [embedded specific] ---- - configure | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index a3f66ba..1cba3a9 100755 ---- a/configure -+++ b/configure -@@ -7464,7 +7464,7 @@ fi - # for target_alias and gcc doesn't manage it consistently. - target_configargs="--cache-file=./config.cache ${target_configargs}" - --FLAGS_FOR_TARGET= -+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" - case " $target_configdirs " in - *" newlib "*) - case " $target_configargs " in -diff --git a/configure.ac b/configure.ac -index 987dfab..d3adb95 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3104,7 +3104,7 @@ fi - # for target_alias and gcc doesn't manage it consistently. - target_configargs="--cache-file=./config.cache ${target_configargs}" - --FLAGS_FOR_TARGET= -+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" - case " $target_configdirs " in - *" newlib "*) - case " $target_configargs " in --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch b/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch deleted file mode 100644 index 9f8793125e..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 9b7442069eb68a42d2437181c1b2e710dd077e8b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:48:10 +0400 -Subject: [PATCH 08/46] missing-execinfo_h - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - boehm-gc/include/gc.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h -index 6b38f2d..fca98ff 100644 ---- a/boehm-gc/include/gc.h -+++ b/boehm-gc/include/gc.h -@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb)); - #if defined(__linux__) || defined(__GLIBC__) - # include - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ -- && !defined(__ia64__) -+ && !defined(__ia64__) && !defined(__UCLIBC__) - # ifndef GC_HAVE_BUILTIN_BACKTRACE - # define GC_HAVE_BUILTIN_BACKTRACE - # endif --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch b/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch deleted file mode 100644 index 6b236c62c0..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch +++ /dev/null @@ -1,28 +0,0 @@ -From fde97f80d2d931ed3fa4a86294799366b2359331 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:49:03 +0400 -Subject: [PATCH 09/46] c99-snprintf - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libstdc++-v3/include/c_std/cstdio | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio -index 37f01ca..f00c06d 100644 ---- a/libstdc++-v3/include/c_std/cstdio -+++ b/libstdc++-v3/include/c_std/cstdio -@@ -144,7 +144,7 @@ namespace std - using ::vsprintf; - } // namespace std - --#if _GLIBCXX_USE_C99 -+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) - - #undef snprintf - #undef vfscanf --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch deleted file mode 100644 index 2da8877672..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch +++ /dev/null @@ -1,192 +0,0 @@ -From 7a90e62d557c78ae52006dff30c99006e10d9357 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:59:00 +0400 -Subject: [PATCH 10/46] gcc: poison-system-directories - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [distribution: codesourcery] ---- - gcc/common.opt | 4 ++++ - gcc/config.in | 6 ++++++ - gcc/configure | 16 ++++++++++++++++ - gcc/configure.ac | 10 ++++++++++ - gcc/doc/invoke.texi | 9 +++++++++ - gcc/gcc.c | 2 ++ - gcc/incpath.c | 19 +++++++++++++++++++ - 7 files changed, 66 insertions(+) - -diff --git a/gcc/common.opt b/gcc/common.opt -index 1218a71..bfba114 100644 ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -623,6 +623,10 @@ Wreturn-local-addr - Common Var(warn_return_local_addr) Init(1) Warning - Warn about returning a pointer/reference to a local or temporary variable. - -+Wpoison-system-directories -+Common Var(flag_poison_system_directories) Init(1) Warning -+Warn for -I and -L options using system directories if cross compiling -+ - Wshadow - Common Var(warn_shadow) Warning - Warn when one local variable shadows another -diff --git a/gcc/config.in b/gcc/config.in -index 5335258..f079826 100644 ---- a/gcc/config.in -+++ b/gcc/config.in -@@ -168,6 +168,12 @@ - #endif - - -+/* Define to warn for use of native system header directories */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_POISON_SYSTEM_DIRECTORIES -+#endif -+ -+ - /* Define if you want all operations on RTL (the basic data structure of the - optimizer and back end) to be checked for dynamic type safety at runtime. - This is quite expensive. */ -diff --git a/gcc/configure b/gcc/configure -index 3c92795..34371a3 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -933,6 +933,7 @@ with_system_zlib - enable_maintainer_mode - enable_link_mutex - enable_version_specific_runtime_libs -+enable_poison_system_directories - enable_plugin - enable_host_shared - enable_libquadmath_support -@@ -1670,6 +1671,8 @@ Optional Features: - --enable-version-specific-runtime-libs - specify that runtime libraries should be installed - in a compiler-specific directory -+ --enable-poison-system-directories -+ warn for use of native system header directories - --enable-plugin enable plugin support - --enable-host-shared build host code as shared libraries - --disable-libquadmath-support -@@ -28211,6 +28214,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : - fi - - -+# Check whether --enable-poison-system-directories was given. -+if test "${enable_poison_system_directories+set}" = set; then : -+ enableval=$enable_poison_system_directories; -+else -+ enable_poison_system_directories=no -+fi -+ -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ -+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h -+ -+fi -+ - # Substitute configuration variables - - -diff --git a/gcc/configure.ac b/gcc/configure.ac -index d414081..240d322 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5654,6 +5654,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, - [specify that runtime libraries should be - installed in a compiler-specific directory])]) - -+AC_ARG_ENABLE([poison-system-directories], -+ AS_HELP_STRING([--enable-poison-system-directories], -+ [warn for use of native system header directories]),, -+ [enable_poison_system_directories=no]) -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], -+ [1], -+ [Define to warn for use of native system header directories]) -+fi -+ - # Substitute configuration variables - AC_SUBST(subdirs) - AC_SUBST(srcdir) -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index d3be589..c81b55b 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -269,6 +269,7 @@ Objective-C and Objective-C++ Dialects}. - -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol - -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol - -Wpointer-arith -Wno-pointer-to-int-cast @gol -+-Wno-poison-system-directories @gol - -Wredundant-decls -Wno-return-local-addr @gol - -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol - -Wshift-count-negative -Wshift-count-overflow @gol -@@ -4433,6 +4434,14 @@ made up of data only and thus requires no special treatment. But, for - most targets, it is made up of code and thus requires the stack to be - made executable in order for the program to work properly. - -+@item -Wno-poison-system-directories -+@opindex Wno-poison-system-directories -+Do not warn for @option{-I} or @option{-L} options using system -+directories such as @file{/usr/include} when cross compiling. This -+option is intended for use in chroot environments when such -+directories contain the correct headers and libraries for the target -+system rather than the host. -+ - @item -Wfloat-equal - @opindex Wfloat-equal - @opindex Wno-float-equal -diff --git a/gcc/gcc.c b/gcc/gcc.c -index d956c36..675bcc1 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -835,6 +835,8 @@ proper position among the other output files. */ - "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ - "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ -+ %{Wno-poison-system-directories:--no-poison-system-directories}\ -+ %{Werror=poison-system-directories:--error-poison-system-directories}\ - %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ - " CHKP_SPEC " \ - %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ -diff --git a/gcc/incpath.c b/gcc/incpath.c -index 6c54ca6..cc0c921 100644 ---- a/gcc/incpath.c -+++ b/gcc/incpath.c -@@ -28,6 +28,7 @@ - #include "intl.h" - #include "incpath.h" - #include "cppdefault.h" -+#include "diagnostic-core.h" - - /* Microsoft Windows does not natively support inodes. - VMS has non-numeric inodes. */ -@@ -383,6 +384,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) - } - fprintf (stderr, _("End of search list.\n")); - } -+ -+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES -+ if (flag_poison_system_directories) -+ { -+ struct cpp_dir *p; -+ -+ for (p = heads[QUOTE]; p; p = p->next) -+ { -+ if ((!strncmp (p->name, "/usr/include", 12)) -+ || (!strncmp (p->name, "/usr/local/include", 18)) -+ || (!strncmp (p->name, "/usr/X11R6/include", 18))) -+ warning (OPT_Wpoison_system_directories, -+ "include location \"%s\" is unsafe for " -+ "cross-compilation", -+ p->name); -+ } -+ } -+#endif - } - - /* Use given -I paths for #include "..." but not #include <...>, and --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch b/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch deleted file mode 100644 index 511e69481b..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch +++ /dev/null @@ -1,39 +0,0 @@ -From db406054de6b0967cd76cbb998f05b0c5af0bd94 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:00:34 +0400 -Subject: [PATCH 11/46] gcc-poison-dir-extend - -Add /sw/include and /opt/include based on the original -zecke-no-host-includes.patch patch. The original patch checked for -/usr/include, /sw/include and /opt/include and then triggered a failure and -aborted. - -Instead, we add the two missing items to the current scan. If the user -wants this to be a failure, they can add "-Werror=poison-system-directories". - -Signed-off-by: Mark Hatle -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - gcc/incpath.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/gcc/incpath.c b/gcc/incpath.c -index cc0c921..0bc1f67 100644 ---- a/gcc/incpath.c -+++ b/gcc/incpath.c -@@ -394,7 +394,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) - { - if ((!strncmp (p->name, "/usr/include", 12)) - || (!strncmp (p->name, "/usr/local/include", 18)) -- || (!strncmp (p->name, "/usr/X11R6/include", 18))) -+ || (!strncmp (p->name, "/usr/X11R6/include", 18)) -+ || (!strncmp (p->name, "/sw/include", 11)) -+ || (!strncmp (p->name, "/opt/include", 12))) - warning (OPT_Wpoison_system_directories, - "include location \"%s\" is unsafe for " - "cross-compilation", --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch deleted file mode 100644 index 750bbc8238..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 278d293c4cee9482a23aa3443741861ff2f67212 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:08:31 +0400 -Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET - -Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. - -This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET. - -Other changes I had to do include: - -- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though. - -- passing the right CFLAGS to configure scripts as exported environment variables - -I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do. - -Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? - -Signed-off-by: Paolo Bonzini -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - configure | 32 ++++++++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - -diff --git a/configure b/configure -index 1cba3a9..9cae8da 100755 ---- a/configure -+++ b/configure -@@ -6733,6 +6733,38 @@ fi - - - -+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS -+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS -+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). -+# We want to ensure that TARGET libraries (which we know are built with -+# gcc) are built with "-O2 -g", so include those options when setting -+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. -+if test "x$CFLAGS_FOR_TARGET" = x; then -+ CFLAGS_FOR_TARGET=$CFLAGS -+ case " $CFLAGS " in -+ *" -O2 "*) ;; -+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; -+ esac -+ case " $CFLAGS " in -+ *" -g "* | *" -g3 "*) ;; -+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; -+ esac -+fi -+ -+ -+if test "x$CXXFLAGS_FOR_TARGET" = x; then -+ CXXFLAGS_FOR_TARGET=$CXXFLAGS -+ case " $CXXFLAGS " in -+ *" -O2 "*) ;; -+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; -+ esac -+ case " $CXXFLAGS " in -+ *" -g "* | *" -g3 "*) ;; -+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; -+ esac -+fi -+ -+ - # Handle --with-headers=XXX. If the value is not "yes", the contents of - # the named directory are copied to $(tooldir)/sys-include. - if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch b/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch deleted file mode 100644 index 45aaf4cc22..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch +++ /dev/null @@ -1,85 +0,0 @@ -From bdde4f5efa3c89ac7ee0bc05f322f27e3dabeab9 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:10:06 +0400 -Subject: [PATCH 13/46] 64-bit multilib hack. - -GCC has internal multilib handling code but it assumes a very specific rigid directory -layout. The build system implementation of multilib layout is very generic and allows -complete customisation of the library directories. - -This patch is a partial solution to allow any custom directories to be passed into gcc -and handled correctly. It forces gcc to use the base_libdir (which is the current -directory, "."). We need to do this for each multilib that is configured as we don't -know which compiler options may be being passed into the compiler. Since we have a compiler -per mulitlib at this point that isn't an issue. - -The one problem is the target compiler is only going to work for the default multlilib at -this point. Ideally we'd figure out which multilibs were being enabled with which paths -and be able to patch these entries with a complete set of correct paths but this we -don't have such code at this point. This is something the target gcc recipe should do -and override these platform defaults in its build config. - -RP 15/8/11 - -Signed-off-by: Khem Raj -Signed-off-by: Elvis Dowson - -Upstream-Status: Pending ---- - gcc/config/i386/t-linux64 | 6 ++---- - gcc/config/mips/t-linux64 | 10 +++------- - gcc/config/rs6000/t-linux64 | 5 ++--- - 3 files changed, 7 insertions(+), 14 deletions(-) - -diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 -index f6dbb78..d770da5 100644 ---- a/gcc/config/i386/t-linux64 -+++ b/gcc/config/i386/t-linux64 -@@ -32,7 +32,5 @@ - # - comma=, - MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) --MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) --MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) --MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) --MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) -+MULTILIB_DIRNAMES = . . -+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) -diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 -index 7e96406..b72dcb0 100644 ---- a/gcc/config/mips/t-linux64 -+++ b/gcc/config/mips/t-linux64 -@@ -17,10 +17,6 @@ - # . - - MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 --MULTILIB_DIRNAMES = n32 32 64 --MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) --MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) --MULTILIB_OSDIRNAMES = \ -- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ -- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ -- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) -+MULTILIB_DIRNAMES = . . . -+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) -+ -diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 -index b6b351d..1d5b37a 100644 ---- a/gcc/config/rs6000/t-linux64 -+++ b/gcc/config/rs6000/t-linux64 -@@ -26,10 +26,9 @@ - # MULTILIB_OSDIRNAMES according to what is found on the target. - - MULTILIB_OPTIONS := m64/m32 --MULTILIB_DIRNAMES := 64 32 -+MULTILIB_DIRNAMES := . . - MULTILIB_EXTRA_OPTS := --MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) --MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) -+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) - - rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c - $(COMPILE) $< --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch b/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch deleted file mode 100644 index 73741f83cc..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch +++ /dev/null @@ -1,101 +0,0 @@ -From a13763f8a1d413a432e7b40835a062f86208f29a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:12:56 +0400 -Subject: [PATCH 14/46] optional libstdc - -gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ -will not run correctly since by default the linker will try to link against libstdc++ -which shouldn't exist yet. We need an option to disable -lstdc++ -option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc -driver. This patch adds such an option which only disables the -lstdc++. - -A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to -do this officially, the likely answer is don't build libstdc++ separately. - -RP 29/6/10 - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [embedded specific] ---- - gcc/c-family/c.opt | 4 ++++ - gcc/cp/g++spec.c | 1 + - gcc/doc/invoke.texi | 8 +++++++- - gcc/gcc.c | 1 + - 4 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt -index 4162566..453ec8e 100644 ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1543,6 +1543,10 @@ nostdinc++ - C++ ObjC++ - Do not search standard system include directories for C++ - -+nostdlib++ -+Driver -+Do not link standard C++ runtime library -+ - o - C ObjC C++ ObjC++ Joined Separate - ; Documented in common.opt -diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c -index 6536d7e..f57a5d4 100644 ---- a/gcc/cp/g++spec.c -+++ b/gcc/cp/g++spec.c -@@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, - switch (decoded_options[i].opt_index) - { - case OPT_nostdlib: -+ case OPT_nostdlib__: - case OPT_nodefaultlibs: - library = -1; - break; -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index c81b55b..6d3f68c 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -195,6 +195,7 @@ in the following sections. - -fvisibility-inlines-hidden @gol - -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol - -fvtv-counts -fvtv-debug @gol -+-nostdlib++ @gol - -fvisibility-ms-compat @gol - -fext-numeric-literals @gol - -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol -@@ -488,7 +489,7 @@ Objective-C and Objective-C++ Dialects}. - -s -static -static-libgcc -static-libstdc++ @gol - -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol - -static-libmpx -static-libmpxwrappers @gol ---shared -shared-libgcc -symbolic @gol -+-shared -shared-libgcc -symbolic -nostdlib++ @gol - -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol - -u @var{symbol} -z @var{keyword}} - -@@ -11187,6 +11188,11 @@ These entries are usually resolved by entries in - libc. These entry points should be supplied through some other - mechanism when this option is specified. - -+@item -nostdlib++ -+@opindex nostdlib++ -+Do not use the standard system C++ runtime libraries when linking. -+Only the libraries you specify will be passed to the linker. -+ - @cindex @option{-lgcc}, use with @option{-nostdlib} - @cindex @option{-nostdlib} and unresolved references - @cindex unresolved references and @option{-nostdlib} -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 675bcc1..a37ec8b 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -845,6 +845,7 @@ proper position among the other output files. */ - %(mflib) " STACK_SPLIT_SPEC "\ - %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ - %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ -+ %{!nostdlib++:}\ - %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" - #endif - --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch deleted file mode 100644 index 1b62ef8065..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 4bd21a1d63cfb14e261d90adc0c5d4f9462dc555 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:14:20 +0400 -Subject: [PATCH 15/46] gcc: disable MASK_RELAX_PIC_CALLS bit - -The new feature added after 4.3.3 -"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html" -will cause cc1plus eat up all the system memory when build webkit-gtk. -The function mips_get_pic_call_symbol keeps on recursively calling itself. -Disable this feature to walk aside the bug. - -Signed-off-by: Dongxiao Xu -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [configuration] ---- - gcc/configure | 7 ------- - gcc/configure.ac | 7 ------- - 2 files changed, 14 deletions(-) - -diff --git a/gcc/configure b/gcc/configure -index 34371a3..8caecdc 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -26479,13 +26479,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; - rm -f conftest.* - fi - fi -- if test $gcc_cv_as_ld_jalr_reloc = yes; then -- if test x$target_cpu_default = x; then -- target_cpu_default=MASK_RELAX_PIC_CALLS -- else -- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" -- fi -- fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 - $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } - -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 240d322..57819ff 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -4384,13 +4384,6 @@ x: - rm -f conftest.* - fi - fi -- if test $gcc_cv_as_ld_jalr_reloc = yes; then -- if test x$target_cpu_default = x; then -- target_cpu_default=MASK_RELAX_PIC_CALLS -- else -- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" -- fi -- fi - AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc) - - AC_CACHE_CHECK([linker for .eh_frame personality relaxation], --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch b/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch deleted file mode 100644 index e6ae262e4b..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 92427ebb94dc66f8e64ebf3ffbcd6dd5ce0935c1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:16:28 +0400 -Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS - -This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to -invoke collect2. - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - gcc/gcc.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/gcc/gcc.c b/gcc/gcc.c -index a37ec8b..87b47c5 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -4352,6 +4352,15 @@ set_collect_gcc_options (void) - sizeof ("COLLECT_GCC_OPTIONS=") - 1); - - first_time = TRUE; -+#ifdef HAVE_LD_SYSROOT -+ if (target_system_root_changed && target_system_root) -+ { -+ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); -+ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); -+ obstack_grow (&collect_obstack, "'", 1); -+ first_time = FALSE; -+ } -+#endif - for (i = 0; (int) i < n_switches; i++) - { - const char *const *args; --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch deleted file mode 100644 index b89a27919e..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch +++ /dev/null @@ -1,96 +0,0 @@ -From b1f3118e439459c26a3e19c617b7b0c93745e77a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:17:25 +0400 -Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in - ${B} - -Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that -the source can be shared between gcc-cross-initial, -gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. - -Signed-off-by: Khem Raj - -Upstream-Status: Pending - -While compiling gcc-crosssdk-initial-x86_64 on some host, there is -occasionally failure that test the existance of default.h doesn't -work, the reason is tm_include_list='** defaults.h' rather than -tm_include_list='** ./defaults.h' - -So we add the test condition for this situation. -Signed-off-by: Hongxu Jia ---- - gcc/Makefile.in | 2 +- - gcc/configure | 4 ++-- - gcc/configure.ac | 4 ++-- - gcc/mkconfig.sh | 4 ++-- - 4 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 07c6f0a..e1e63e8 100644 ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -502,7 +502,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ - TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ - - xmake_file=@xmake_file@ --tmake_file=@tmake_file@ -+tmake_file=@tmake_file@ ./t-oe - TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ - TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ - TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ -diff --git a/gcc/configure b/gcc/configure -index 8caecdc..8ec3d40 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -11850,8 +11850,8 @@ for f in $tm_file; do - tm_include_list="${tm_include_list} $f" - ;; - defaults.h ) -- tm_file_list="${tm_file_list} \$(srcdir)/$f" -- tm_include_list="${tm_include_list} $f" -+ tm_file_list="${tm_file_list} ./$f" -+ tm_include_list="${tm_include_list} ./$f" - ;; - * ) - tm_file_list="${tm_file_list} \$(srcdir)/config/$f" -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 57819ff..643a47e 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -1832,8 +1832,8 @@ for f in $tm_file; do - tm_include_list="${tm_include_list} $f" - ;; - defaults.h ) -- tm_file_list="${tm_file_list} \$(srcdir)/$f" -- tm_include_list="${tm_include_list} $f" -+ tm_file_list="${tm_file_list} ./$f" -+ tm_include_list="${tm_include_list} ./$f" - ;; - * ) - tm_file_list="${tm_file_list} \$(srcdir)/config/$f" -diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh -index c32f087..6803ab9 100644 ---- a/gcc/mkconfig.sh -+++ b/gcc/mkconfig.sh -@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then - if [ $# -ge 1 ]; then - echo '#ifdef IN_GCC' >> ${output}T - for file in "$@"; do -- if test x"$file" = x"defaults.h"; then -+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then - postpone_defaults_h="yes" - else - echo "# include \"$file\"" >> ${output}T -@@ -109,7 +109,7 @@ esac - - # If we postponed including defaults.h, add the #include now. - if test x"$postpone_defaults_h" = x"yes"; then -- echo "# include \"defaults.h\"" >> ${output}T -+ echo "# include \"./defaults.h\"" >> ${output}T - fi - - # Add multiple inclusion protection guard, part two. --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch deleted file mode 100644 index e8ba325585..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d11c73c1295565ff3766ae04e2a410a89fc84dd5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:20:01 +0400 -Subject: [PATCH 18/46] fortran cross-compile hack. - -* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used -used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross -directory. - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [embedded specific] ---- - libgfortran/configure | 2 +- - libgfortran/configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libgfortran/configure b/libgfortran/configure -index bb3107b..5d47e65 100755 ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -12747,7 +12747,7 @@ esac - - # We need gfortran to compile parts of the library - #AC_PROG_FC(gfortran) --FC="$GFORTRAN" -+#FC="$GFORTRAN" - ac_ext=${ac_fc_srcext-f} - ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' - ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac -index adafb3f..b4ade28 100644 ---- a/libgfortran/configure.ac -+++ b/libgfortran/configure.ac -@@ -240,7 +240,7 @@ AC_SUBST(enable_static) - - # We need gfortran to compile parts of the library - #AC_PROG_FC(gfortran) --FC="$GFORTRAN" -+#FC="$GFORTRAN" - AC_PROG_FC(gfortran) - - # extra LD Flags which are required for targets --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch b/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch deleted file mode 100644 index 01a4d1fdab..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 7b40212ed6c0c9fe4efe51f31bccd3d9f892f238 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:20:50 +0400 -Subject: [PATCH 19/46] libgcc-sjlj-check - -ac_fn_c_try_compile doesnt seem to keep the intermediate files -which are needed for sjlj test to pass since it greps into the -generated file. So we run the compiler command using AC_TRY_COMMAND -which then generates the needed .s file - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - libgcc/configure | 10 ++++++---- - libgcc/configure.ac | 10 ++++------ - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/libgcc/configure b/libgcc/configure -index 203d384..6aef3e7 100644 ---- a/libgcc/configure -+++ b/libgcc/configure -@@ -4570,17 +4570,19 @@ void foo () - } - - _ACEOF --CFLAGS_hold=$CFLAGS --CFLAGS="--save-temps -fexceptions" - libgcc_cv_lib_sjlj_exceptions=unknown --if ac_fn_c_try_compile; then : -+if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; }; then - if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then - libgcc_cv_lib_sjlj_exceptions=yes - elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then - libgcc_cv_lib_sjlj_exceptions=no - fi - fi --CFLAGS=$CFLAGS_hold - rm -f conftest* - - fi -diff --git a/libgcc/configure.ac b/libgcc/configure.ac -index a10a952..cc324f3 100644 ---- a/libgcc/configure.ac -+++ b/libgcc/configure.ac -@@ -255,16 +255,14 @@ void foo () - bar(); - } - ])]) --CFLAGS_hold=$CFLAGS --CFLAGS="--save-temps -fexceptions" - libgcc_cv_lib_sjlj_exceptions=unknown --AS_IF([ac_fn_c_try_compile], -- [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then -+if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then -+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then - libgcc_cv_lib_sjlj_exceptions=yes - elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then - libgcc_cv_lib_sjlj_exceptions=no -- fi]) --CFLAGS=$CFLAGS_hold -+ fi -+fi - rm -f conftest* - ]) - --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch b/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch deleted file mode 100644 index 13f66d4136..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 5f9759a85fff3d78e3f71ae01c970b10d326c406 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:22:00 +0400 -Subject: [PATCH 20/46] cpp: honor sysroot. - -Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile -preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location -rather than the --sysroot option specified on the commandline. If access to that directory is -permission denied (unreadable), gcc will error. - -This happens when ccache is in use due to the fact it uses preprocessed source files. - -The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, --isystem, -isysroot happen and the correct sysroot is used. - -[YOCTO #2074] - -RP 2012/04/13 - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - gcc/cp/lang-specs.h | 2 +- - gcc/gcc.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h -index b0728f0..e69ee7d 100644 ---- a/gcc/cp/lang-specs.h -+++ b/gcc/cp/lang-specs.h -@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3. If not see - {".ii", "@c++-cpp-output", 0, 0, 0}, - {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1plus -fpreprocessed %i %(cc1_options) %2\ -+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 87b47c5..e6efae7 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -1142,7 +1142,7 @@ static const struct compiler default_compilers[] = - %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, - {".i", "@cpp-output", 0, 0, 0}, - {"@cpp-output", -- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {".s", "@assembler", 0, 0, 0}, - {"@assembler", - "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch b/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch deleted file mode 100644 index c7cffe417d..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 34d22ab6cfd2dfe6dd171c8d0b31cafcdeb86298 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:23:08 +0400 -Subject: [PATCH 21/46] MIPS64: Default to N64 ABI - -MIPS64 defaults to n32 ABI, this patch makes it -so that it defaults to N64 ABI - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [OE config specific] ---- - gcc/config.gcc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/gcc/config.gcc b/gcc/config.gcc -index c835734..dd0739d 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -2017,29 +2017,29 @@ mips*-*-linux*) # Linux MIPS, either endian. - default_mips_arch=mips32 - ;; - mips64el-st-linux-gnu) -- default_mips_abi=n32 -+ default_mips_abi=64 - tm_file="${tm_file} mips/st.h" - tmake_file="${tmake_file} mips/t-st" - enable_mips_multilibs="yes" - ;; - mips64octeon*-*-linux*) -- default_mips_abi=n32 -+ default_mips_abi=64 - tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\"" - target_cpu_default=MASK_SOFT_FLOAT_ABI - enable_mips_multilibs="yes" - ;; - mipsisa64r6*-*-linux*) -- default_mips_abi=n32 -+ default_mips_abi=64 - default_mips_arch=mips64r6 - enable_mips_multilibs="yes" - ;; - mipsisa64r2*-*-linux*) -- default_mips_abi=n32 -+ default_mips_abi=64 - default_mips_arch=mips64r2 - enable_mips_multilibs="yes" - ;; - mips64*-*-linux* | mipsisa64*-*-linux*) -- default_mips_abi=n32 -+ default_mips_abi=64 - enable_mips_multilibs="yes" - ;; - esac --- -2.6.3 - diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch deleted file mode 100644 index 6208351324..0000000000 --- a/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch +++ /dev/null @@ -1,216 +0,0 @@ -From f6b41b62ea62a0f1447d9fc235f7fd2bbf3fe7c2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 09:24:50 +0400 -Subject: [PATCH 22/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER - relative to SYSTEMLIBS_DIR - -This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER -relative to SYSTEMLIBS_DIR which can be set in generated headers -This breaks the assumption of hardcoded multilib in gcc -Change is only for the supported architectures in OE including -SH, sparc, alpha for possible future support (if any) - -Removes the do_headerfix task in metadata - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [OE configuration] ---- - gcc/config/alpha/linux-elf.h | 4 ++-- - gcc/config/arm/linux-eabi.h | 4 ++-- - gcc/config/arm/linux-elf.h | 2 +- - gcc/config/i386/linux.h | 2 +- - gcc/config/i386/linux64.h | 6 +++--- - gcc/config/linux.h | 8 ++++---- - gcc/config/mips/linux.h | 12 ++++++------ - gcc/config/rs6000/linux64.h | 10 +++++----- - gcc/config/sh/linux.h | 2 +- - gcc/config/sparc/linux.h | 2 +- - gcc/config/sparc/linux64.h | 4 ++-- - 11 files changed, 28 insertions(+), 28 deletions(-) - -diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h -index 2c70a2f..dd048db 100644 ---- a/gcc/config/alpha/linux-elf.h -+++ b/gcc/config/alpha/linux-elf.h -@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see - #define EXTRA_SPECS \ - { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" --#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" -+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" - #elif DEFAULT_LIBC == LIBC_GLIBC -diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h -index e9d65dc..cfdf3f0 100644 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -68,8 +68,8 @@ - GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ - - #undef GLIBC_DYNAMIC_LINKER --#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" --#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" -+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" -+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" - #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT - - #define GLIBC_DYNAMIC_LINKER \ -diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h -index 49ad954..a5ab559 100644 ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -62,7 +62,7 @@ - - #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ - %{static:-Bstatic} \ -diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h -index a100963..21ba2b2 100644 ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. If not see - . */ - - #define GNU_USER_LINK_EMULATION "elf_i386" --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" -diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h -index a27d3be..6185cce 100644 ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define GNU_USER_LINK_EMULATION64 "elf_x86_64" - #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" --#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" -+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" -diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index 857389a..22b9be5 100644 ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -73,10 +73,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - GLIBC_DYNAMIC_LINKER must be defined for each target using them, or - GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets - supporting both 32-bit and 64-bit compilation. */ --#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" - #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" -diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h -index 91df261..c306afb 100644 ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see - #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" - - #define GLIBC_DYNAMIC_LINKER32 \ -- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" - #define GLIBC_DYNAMIC_LINKER64 \ -- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" - #define GLIBC_DYNAMIC_LINKERN32 \ -- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" - - #undef UCLIBC_DYNAMIC_LINKER32 - #define UCLIBC_DYNAMIC_LINKER32 \ -- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" - #undef UCLIBC_DYNAMIC_LINKER64 - #define UCLIBC_DYNAMIC_LINKER64 \ -- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" -+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" - #define UCLIBC_DYNAMIC_LINKERN32 \ -- "%{mnan=2008:/lib32/ld-uCli