diff --git a/cross/gcc-aarch64/0003-gcc-poison-system-directories.patch b/cross/gcc-aarch64/0003-gcc-poison-system-directories.patch index 05138976c..0d6d964d3 100644 --- a/cross/gcc-aarch64/0003-gcc-poison-system-directories.patch +++ b/cross/gcc-aarch64/0003-gcc-poison-system-directories.patch @@ -141,14 +141,14 @@ diff --git a/gcc/gcc.c b/gcc/gcc.c index a716f708259..02b3cd39fc2 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -1037,6 +1037,8 @@ proper position among the other output files. */ - "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ +@@ -1061,6 +1060,8 @@ + "-z relro -z now " \ "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ + %{Wno-poison-system-directories:--no-poison-system-directories} \ + %{Werror=poison-system-directories:--error-poison-system-directories} \ - %{static|no-pie|static-pie:} %{L*} %(mfwrap) %(link_libgcc) " \ - VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ + %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ diff --git a/gcc/incpath.c b/gcc/incpath.c index b11c6a57939..e3b7a21966f 100644 diff --git a/cross/gcc-aarch64/0012-static-pie.patch b/cross/gcc-aarch64/0012-static-pie.patch index 03a4f68f6..d7cfcb781 100644 --- a/cross/gcc-aarch64/0012-static-pie.patch +++ b/cross/gcc-aarch64/0012-static-pie.patch @@ -38,7 +38,7 @@ diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h index 8620de3e42d..235328a2642 100644 --- a/gcc/config/gnu-user.h +++ b/gcc/config/gnu-user.h -@@ -52,13 +52,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -51,13 +51,12 @@ #define GNU_USER_TARGET_STARTFILE_SPEC \ "%{shared:; \ pg|p|profile:%{static-pie:grcrt1.o%s;:gcrt1.o%s}; \ @@ -46,8 +46,8 @@ index 8620de3e42d..235328a2642 100644 - static-pie:rcrt1.o%s; \ + static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \ " PIE_SPEC ":Scrt1.o%s; \ - :crt1.o%s} \ - crti.o%s \ + :crt1.o%s} " \ + GNU_USER_TARGET_CRTI " \ - %{static:crtbeginT.o%s; \ - shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ + %{shared|" PIE_SPEC ":crtbeginS.o%s; \ @@ -55,16 +55,16 @@ index 8620de3e42d..235328a2642 100644 :crtbegin.o%s} \ %{fvtable-verify=none:%s; \ fvtable-verify=preinit:vtv_start_preinit.o%s; \ -@@ -92,8 +91,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -76,8 +75,7 @@ "%{fvtable-verify=none:%s; \ fvtable-verify=preinit:vtv_end_preinit.o%s; \ fvtable-verify=std:vtv_end.o%s} \ - %{static:crtend.o%s; \ - shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ + %{shared|" PIE_SPEC ":crtendS.o%s; \ - :crtend.o%s} \ - crtn.o%s \ - " CRTOFFLOADEND + :crtend.o%s} " \ + GNU_USER_TARGET_CRTN " " \ + CRTOFFLOADEND @@ -133,7 +131,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC @@ -74,37 +74,6 @@ index 8620de3e42d..235328a2642 100644 #endif #undef LINK_GCC_C_SEQUENCE_SPEC -diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h -index bb19d0dcd41..bb2a2324eb0 100644 ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -763,12 +763,12 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - #define STARTFILE_LINUX_SPEC \ - "%{shared:; \ - pg|p|profile:gcrt1.o%s; \ -- static:crt1.o%s; \ -- static-pie|" PIE_SPEC ":Scrt1.o%s; \ -+ static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \ -+ " PIE_SPEC ":Scrt1.o%s; \ - :crt1.o%s} \ - %{mnewlib:ecrti.o%s;:crti.o%s} \ -- %{static:crtbeginT.o%s; \ -- shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ -+ %{shared|" PIE_SPEC ":crtbeginS.o%s; \ -+ static:crtbeginT.o%s; \ - :crtbegin.o%s} \ - %{fvtable-verify=none:%s; \ - fvtable-verify=preinit:vtv_start_preinit.o%s; \ -@@ -781,8 +781,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - "%{fvtable-verify=none:%s; \ - fvtable-verify=preinit:vtv_end_preinit.o%s; \ - fvtable-verify=std:vtv_end.o%s} \ -- %{static:crtend.o%s; \ -- shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ -+ %{shared|" PIE_SPEC ":crtendS.o%s; \ - :crtend.o%s} \ - %{mnewlib:ecrtn.o%s;:crtn.o%s} \ - " CRTOFFLOADEND diff --git a/gcc/gcc.c b/gcc/gcc.c index eb1610ba8b0..87560afb03c 100644 --- a/gcc/gcc.c diff --git a/cross/gcc-aarch64/0016-invalid_tls_model.patch b/cross/gcc-aarch64/0016-invalid_tls_model.patch deleted file mode 100644 index 93dd7ddcd..000000000 --- a/cross/gcc-aarch64/0016-invalid_tls_model.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- ./libgomp/configure.tgt.orig 2018-09-25 13:44:16.654561098 -0400 -+++ ./libgomp/configure.tgt 2018-09-25 13:44:50.452688100 -0400 -@@ -10,23 +10,6 @@ - # XCFLAGS Add extra compile flags to use. - # XLDFLAGS Add extra link flags to use. - --# Optimize TLS usage by avoiding the overhead of dynamic allocation. --if test $gcc_cv_have_tls = yes ; then -- case "${target}" in -- -- *-*-k*bsd*-gnu*) -- ;; -- -- *-*-linux* | *-*-gnu*) -- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec" -- ;; -- -- *-*-rtems*) -- XCFLAGS="${XCFLAGS} -ftls-model=local-exec" -- ;; -- esac --fi -- - # Since we require POSIX threads, assume a POSIX system by default. - config_path="posix" diff --git a/cross/gcc-aarch64/005_all_default-as-needed.patch b/cross/gcc-aarch64/005_all_default-as-needed.patch index 00852197f..2eced0f06 100644 --- a/cross/gcc-aarch64/005_all_default-as-needed.patch +++ b/cross/gcc-aarch64/005_all_default-as-needed.patch @@ -234,11 +234,11 @@ Index: b/gcc/config/riscv/linux.h =================================================================== --- a/gcc/config/riscv/linux.h +++ b/gcc/config/riscv/linux.h -@@ -50,6 +50,7 @@ - #define CPP_SPEC "%{pthread:-D_REENTRANT}" +@@ -58,6 +58,7 @@ + "%{mabi=ilp32:_ilp32}" #define LINK_SPEC "\ +-as-needed \ - -melf" XLEN_SPEC "lriscv \ + -melf" XLEN_SPEC "lriscv" LD_EMUL_SUFFIX " \ %{mno-relax:--no-relax} \ %{shared} \ diff --git a/cross/gcc-aarch64/APKBUILD b/cross/gcc-aarch64/APKBUILD index a1b904c34..66835a3bd 100644 --- a/cross/gcc-aarch64/APKBUILD +++ b/cross/gcc-aarch64/APKBUILD @@ -23,7 +23,7 @@ CBUILDROOT="/" _cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET" pkgname="gcc-aarch64" -pkgver=8.3.0 +pkgver=9.2.0 [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" [ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" @@ -163,7 +163,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg 003_all_default-fortify-source.patch 005_all_default-as-needed.patch gcc-as-needed-gold.patch - gcc-as-needed-push-pop.patch 011_all_default-warn-format-security.patch 012_all_default-warn-trampolines.patch 013_all_default-ssp-fix.patch @@ -194,7 +193,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg 320-libffi-gnulinux.patch gcc-pure64-mips.patch - 0016-invalid_tls_model.patch " # gcc-4.8-build-args.patch @@ -573,12 +571,11 @@ gnat() { mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ } -sha512sums="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802 gcc-8.3.0.tar.xz +sha512sums="a12dff52af876aee0fd89a8d09cdc455f35ec46845e154023202392adc164848faf8ee881b59b681b696e27c69fd143a214014db4214db62f9891a1c8365c040 gcc-9.2.0.tar.xz e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch -02b725b220e540077efef741e9d457f9e004fe53ae642a138e214875d076a60f7c2f27de0ed9a4225db2030fc9c3d2c5b0414c895b9eec0f5f48fad70e2fb029 005_all_default-as-needed.patch +5e4794d1caddb1050d8935ae5a53ba275b653ad2c9954df89a8c47ac694e6139011829f440eb7e5b24fd57ea25daf25ac83f317871841a78ffb74d167d6f8bf9 005_all_default-as-needed.patch 6c9a5068f6eea8a85d297a3555b1d2333ffd4b9ddbfb7560a3e643f8577603871ca123373ef7f96e894225291d88f7bf575c7f8386bcfdd1dabcd7ba12598b65 gcc-as-needed-gold.patch -ab0df1862f1b645634e79b8101326ce53215eba39861a455cd145b81b5267a6a61bc6e76b32d53887a0a48873f7efc23e2c52cc04400c6afd89822f245cdbc77 gcc-as-needed-push-pop.patch e026bf9f73ee254528423c6cabdfd7794960c567161581b7d4b7c61c45027e12a6efef79662d4288b9cbaecb4798f01af6a5b4a13b766c2d501444ac1846fd43 011_all_default-warn-format-security.patch 37de4cc9061bfe1963e6e6570e1a6bbfd58204bf90e0eef819882599a9a80ea28f3eb815c20c1f173dc25d4bd9971b7c7f7f9512d6f8f91f04de1e1175114d4d 012_all_default-warn-trampolines.patch 38a0fedeac3eebe4a6a957792ba520225cf42663c96a171cd168fdb6c91ffa9a56b80351f8238c5d03b78d3ae2a6539a54481fe4848b4a395e2c87f2ff7adc08 013_all_default-ssp-fix.patch @@ -587,21 +584,20 @@ d35a3ac7e13a4446921a90e1ff3eec1079840c845f9d523c868e24ae21f94cf69ba041de5341ebef 0a0bc72b9366158f5d23fff1928e756fdd212433bac6ab1f00d632f241382820db8db5d475ddf11ea020eaf7e2e71b12fb9b1c3c870cf84adf6c2b16f15aabca 051_all_libiberty-pic.patch e7a2eb1b1870e199d6fd753d065781575656fa12baa264f96c5d179689d88c31b8a3f92a5dae96088c05e96aa2bda138364ad7dbcc79e1819a102f192cbb7bab 053_all_libitm-no-fortify-source.patch 4a328d1e1a56c20166307edcfa322068915784d9c08025b7f81cf69714da48fc266b6d34f77b9135c2f10da830d9df408276a1b78d1fd218637c2823506593c2 090_all_pr55930-dependency-tracking.patch -3842bd2be3e53db34e59bfb2bd438b244fc3712055058b9e232e33345f0fab216256b79e364fbac335972dc599a1d74393704f0cd595f3f076dcc10883c85b28 0003-gcc-poison-system-directories.patch +707b30c141778fbcb1e37ebb42873cd7971de232a1298f78bbd834fa74d411b7b49cecfe4f247316d7c785da792f95f26ea6d824cd322a8f87b29537af3f77f3 0003-gcc-poison-system-directories.patch d1c2d7ff7f673375dc7cd84ae9d8515853b5af6390c70bb763412c012101344e4ee1ce155151ce3fb6ba2b80af7ed42d697dbe1bf6fd6e7b2b9087a378c47c37 203-libgcc_s.patch 98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch 6d84354e6df96d5ea244eb3bb5f044781796b88040b11c78fb6ee509e5aac19d46e0e92ca836e98e6495d9751f52439833b748efc419e4f5d5301fb549c4dcc9 0002-posix_memalign.patch 7f434a7350c9b06d0ae7cc18a569d813238483afa34b0801d112844a0dfe6164ae36b0416955fd4da7a8caa54672247f319a8ec7ce4b6a97a5f4e17ec083112a 0008-s390x-muslldso.patch 66085c5555e6b91b6874d1782d5a1dc0ab1792889f9400f48cde9483f82b51b9e3a5de1efbba21a19fc5e664334f2188d0c2bc988d42335efa26118b3c85cc7f 0010-ldbl128-config.patch -45d5bc11a89e5af77503ca06eec52d6d84e6fea0be021aaee1bcc39f8dd3c7b4baa4200cfa2b0688faa0f207d005db89c029eff32f362207aa3d2365b2f2363e 0012-static-pie.patch +d91c5eba37166cf34ca38e03808e3960c091b3627008a0c68c127cdf52e3827f8cfbe478ababe64c3cbb4d5eb8ed6230a21a74b6908549e05e08646de09df37c 0012-static-pie.patch d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch 600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch 35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch -50537add461714f44dc6a778e0c6d0e15d6a782591c8aff38d1fb559191ddac2b5ee14a43a3005b389fdf98d2e7468ff4e64c88ba024cf94f9fe0d9854b9e9c8 ada-musl.patch +cceeac95f47ea8664e1c16c5ebecb472b5aaa56040e943c1b97c7873b50e3a2bf972d9f743d342a2444a3bb711a0720d2446fded43892c5e05bdeefd478b0cd1 ada-musl.patch a1f7750bc7b8b7d916a5dee34fcc736bd4fb249c96538b547d495794e6cfd49356aa3974506a15074b4cb58edd5d7e2868607c902dd003e8c464d5066fd4a575 libgnarl-musl.patch f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45b58ba8764ab1eb575d4eb6d6dfc550a87a183f8b94e76181 320-libffi-gnulinux.patch -86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch -8039d4081b77332694bc10f898d5e4da0ece4ce7b0e219fedb2aab965126b6b0537d03ba8652341c9c35af07eef33e96b42cc02388f36d8027b9475d44f6b420 0016-invalid_tls_model.patch" +86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch" diff --git a/cross/gcc-aarch64/ada-musl.patch b/cross/gcc-aarch64/ada-musl.patch index 7a86ae4af..1487f4a57 100644 --- a/cross/gcc-aarch64/ada-musl.patch +++ b/cross/gcc-aarch64/ada-musl.patch @@ -124,29 +124,9 @@ index 0d12f7e..a063b47 100644 #endif #if defined (_WIN32) -diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c -index 7025f57..207b50d 100644 ---- a/gcc/ada/terminals.c -+++ b/gcc/ada/terminals.c -@@ -1108,13 +1108,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns) - #include - #include - --/* On some system termio is either absent or including it will disable termios -- (HP-UX) */ --#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \ -- && !defined (__rtems__) && !defined (__QNXNTO__) --# include --#endif -- - #include - #include - #include -diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in -index ebb955e..08cfbee 100644 ---- a/gcc/ada/gcc-interface/Makefile.in -+++ b/gcc/ada/gcc-interface/Makefile.in -@@ -1028,7 +1028,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),) +--- a/gcc/ada/Makefile.rtl 2019-05-14 21:18:45.217455681 +0200 ++++ b/gcc/ada/Makefile.rtl 2019-05-14 21:21:30.686464218 +0200 +@@ -1521,7 +1521,7 @@ s-tpopsp.adb -Subject: [PATCH] Use --push-state --as-needed and --pop-state instead of --as-needed and --no-as-needed for libgcc - -As discussed, using --as-needed and --no-as-needed is dangerous, because -it results in --no-as-needed even for libraries after -lgcc_s, even when the -default is --as-needed or --as-needed has been specified earlier on the -command line. - -If the linker supports --push-state/--pop-state, we should IMHO use it. - -2018-04-11 Jakub Jelinek - - * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use - --push-state --as-needed and --pop-state instead of --as-needed and - --no-as-needed if ld supports it. - * configure: Regenerated. - -Index: b/gcc/configure.ac -=================================================================== ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5518,11 +5518,21 @@ if test $in_tree_ld = yes ; then - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ - && test $in_tree_ld_is_elf = yes; then - gcc_cv_ld_as_needed=yes -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 28; then -+ gcc_cv_ld_as_needed_option='--push-state --as-needed' -+ gcc_cv_ld_no_as_needed_option='--pop-state' -+ fi - fi - elif test x$gcc_cv_ld != x; then - # Check if linker supports --as-needed and --no-as-needed options - if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then - gcc_cv_ld_as_needed=yes -+ if $gcc_cv_ld --help 2>&1 | grep push-state > /dev/null; then -+ if $gcc_cv_ld --help 2>&1 | grep pop-state > /dev/null; then -+ gcc_cv_ld_as_needed_option='--push-state --as-needed' -+ gcc_cv_ld_no_as_needed_option='--pop-state' -+ fi -+ fi - fi - case "$target:$gnu_ld" in - *-*-solaris2*:no) diff --git a/cross/gcc-armhf/0003-gcc-poison-system-directories.patch b/cross/gcc-armhf/0003-gcc-poison-system-directories.patch index 05138976c..0d6d964d3 100644 --- a/cross/gcc-armhf/0003-gcc-poison-system-directories.patch +++ b/cross/gcc-armhf/0003-gcc-poison-system-directories.patch @@ -141,14 +141,14 @@ diff --git a/gcc/gcc.c b/gcc/gcc.c index a716f708259..02b3cd39fc2 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -1037,6 +1037,8 @@ proper position among the other output files. */ - "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ +@@ -1061,6 +1060,8 @@ + "-z relro -z now " \ "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ + %{Wno-poison-system-directories:--no-poison-system-directories} \ + %{Werror=poison-system-directories:--error-poison-system-directories} \ - %{static|no-pie|static-pie:} %{L*} %(mfwrap) %(link_libgcc) " \ - VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ + %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ diff --git a/gcc/incpath.c b/gcc/incpath.c index b11c6a57939..e3b7a21966f 100644 diff --git a/cross/gcc-armhf/0012-static-pie.patch b/cross/gcc-armhf/0012-static-pie.patch index 03a4f68f6..d7cfcb781 100644 --- a/cross/gcc-armhf/0012-static-pie.patch +++ b/cross/gcc-armhf/0012-static-pie.patch @@ -38,7 +38,7 @@ diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h index 8620de3e42d..235328a2642 100644 --- a/gcc/config/gnu-user.h +++ b/gcc/config/gnu-user.h -@@ -52,13 +52,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -51,13 +51,12 @@ #define GNU_USER_TARGET_STARTFILE_SPEC \ "%{shared:; \ pg|p|profile:%{static-pie:grcrt1.o%s;:gcrt1.o%s}; \ @@ -46,8 +46,8 @@ index 8620de3e42d..235328a2642 100644 - static-pie:rcrt1.o%s; \ + static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \ " PIE_SPEC ":Scrt1.o%s; \ - :crt1.o%s} \ - crti.o%s \ + :crt1.o%s} " \ + GNU_USER_TARGET_CRTI " \ - %{static:crtbeginT.o%s; \ - shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ + %{shared|" PIE_SPEC ":crtbeginS.o%s; \ @@ -55,16 +55,16 @@ index 8620de3e42d..235328a2642 100644 :crtbegin.o%s} \ %{fvtable-verify=none:%s; \ fvtable-verify=preinit:vtv_start_preinit.o%s; \ -@@ -92,8 +91,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -76,8 +75,7 @@ "%{fvtable-verify=none:%s; \ fvtable-verify=preinit:vtv_end_preinit.o%s; \ fvtable-verify=std:vtv_end.o%s} \ - %{static:crtend.o%s; \ - shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ + %{shared|" PIE_SPEC ":crtendS.o%s; \ - :crtend.o%s} \ - crtn.o%s \ - " CRTOFFLOADEND + :crtend.o%s} " \ + GNU_USER_TARGET_CRTN " " \ + CRTOFFLOADEND @@ -133,7 +131,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC @@ -74,37 +74,6 @@ index 8620de3e42d..235328a2642 100644 #endif #undef LINK_GCC_C_SEQUENCE_SPEC -diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h -index bb19d0dcd41..bb2a2324eb0 100644 ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -763,12 +763,12 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - #define STARTFILE_LINUX_SPEC \ - "%{shared:; \ - pg|p|profile:gcrt1.o%s; \ -- static:crt1.o%s; \ -- static-pie|" PIE_SPEC ":Scrt1.o%s; \ -+ static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \ -+ " PIE_SPEC ":Scrt1.o%s; \ - :crt1.o%s} \ - %{mnewlib:ecrti.o%s;:crti.o%s} \ -- %{static:crtbeginT.o%s; \ -- shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ -+ %{shared|" PIE_SPEC ":crtbeginS.o%s; \ -+ static:crtbeginT.o%s; \ - :crtbegin.o%s} \ - %{fvtable-verify=none:%s; \ - fvtable-verify=preinit:vtv_start_preinit.o%s; \ -@@ -781,8 +781,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - "%{fvtable-verify=none:%s; \ - fvtable-verify=preinit:vtv_end_preinit.o%s; \ - fvtable-verify=std:vtv_end.o%s} \ -- %{static:crtend.o%s; \ -- shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ -+ %{shared|" PIE_SPEC ":crtendS.o%s; \ - :crtend.o%s} \ - %{mnewlib:ecrtn.o%s;:crtn.o%s} \ - " CRTOFFLOADEND diff --git a/gcc/gcc.c b/gcc/gcc.c index eb1610ba8b0..87560afb03c 100644 --- a/gcc/gcc.c diff --git a/cross/gcc-armhf/0016-invalid_tls_model.patch b/cross/gcc-armhf/0016-invalid_tls_model.patch deleted file mode 100644 index 93dd7ddcd..000000000 --- a/cross/gcc-armhf/0016-invalid_tls_model.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- ./libgomp/configure.tgt.orig 2018-09-25 13:44:16.654561098 -0400 -+++ ./libgomp/configure.tgt 2018-09-25 13:44:50.452688100 -0400 -@@ -10,23 +10,6 @@ - # XCFLAGS Add extra compile flags to use. - # XLDFLAGS Add extra link flags to use. - --# Optimize TLS usage by avoiding the overhead of dynamic allocation. --if test $gcc_cv_have_tls = yes ; then -- case "${target}" in -- -- *-*-k*bsd*-gnu*) -- ;; -- -- *-*-linux* | *-*-gnu*) -- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec" -- ;; -- -- *-*-rtems*) -- XCFLAGS="${XCFLAGS} -ftls-model=local-exec" -- ;; -- esac --fi -- - # Since we require POSIX threads, assume a POSIX system by default. - config_path="posix" diff --git a/cross/gcc-armhf/005_all_default-as-needed.patch b/cross/gcc-armhf/005_all_default-as-needed.patch index 00852197f..2eced0f06 100644 --- a/cross/gcc-armhf/005_all_default-as-needed.patch +++ b/cross/gcc-armhf/005_all_default-as-needed.patch @@ -234,11 +234,11 @@ Index: b/gcc/config/riscv/linux.h =================================================================== --- a/gcc/config/riscv/linux.h +++ b/gcc/config/riscv/linux.h -@@ -50,6 +50,7 @@ - #define CPP_SPEC "%{pthread:-D_REENTRANT}" +@@ -58,6 +58,7 @@ + "%{mabi=ilp32:_ilp32}" #define LINK_SPEC "\ +-as-needed \ - -melf" XLEN_SPEC "lriscv \ + -melf" XLEN_SPEC "lriscv" LD_EMUL_SUFFIX " \ %{mno-relax:--no-relax} \ %{shared} \ diff --git a/cross/gcc-armhf/APKBUILD b/cross/gcc-armhf/APKBUILD index d5da0acf1..04259ec72 100644 --- a/cross/gcc-armhf/APKBUILD +++ b/cross/gcc-armhf/APKBUILD @@ -23,7 +23,7 @@ CBUILDROOT="/" _cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET" pkgname="gcc-armhf" -pkgver=8.3.0 +pkgver=9.2.0 [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" [ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" @@ -163,7 +163,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg 003_all_default-fortify-source.patch 005_all_default-as-needed.patch gcc-as-needed-gold.patch - gcc-as-needed-push-pop.patch 011_all_default-warn-format-security.patch 012_all_default-warn-trampolines.patch 013_all_default-ssp-fix.patch @@ -194,7 +193,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg 320-libffi-gnulinux.patch gcc-pure64-mips.patch - 0016-invalid_tls_model.patch " # gcc-4.8-build-args.patch @@ -573,12 +571,11 @@ gnat() { mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ } -sha512sums="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802 gcc-8.3.0.tar.xz +sha512sums="a12dff52af876aee0fd89a8d09cdc455f35ec46845e154023202392adc164848faf8ee881b59b681b696e27c69fd143a214014db4214db62f9891a1c8365c040 gcc-9.2.0.tar.xz e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch -02b725b220e540077efef741e9d457f9e004fe53ae642a138e214875d076a60f7c2f27de0ed9a4225db2030fc9c3d2c5b0414c895b9eec0f5f48fad70e2fb029 005_all_default-as-needed.patch +5e4794d1caddb1050d8935ae5a53ba275b653ad2c9954df89a8c47ac694e6139011829f440eb7e5b24fd57ea25daf25ac83f317871841a78ffb74d167d6f8bf9 005_all_default-as-needed.patch 6c9a5068f6eea8a85d297a3555b1d2333ffd4b9ddbfb7560a3e643f8577603871ca123373ef7f96e894225291d88f7bf575c7f8386bcfdd1dabcd7ba12598b65 gcc-as-needed-gold.patch -ab0df1862f1b645634e79b8101326ce53215eba39861a455cd145b81b5267a6a61bc6e76b32d53887a0a48873f7efc23e2c52cc04400c6afd89822f245cdbc77 gcc-as-needed-push-pop.patch e026bf9f73ee254528423c6cabdfd7794960c567161581b7d4b7c61c45027e12a6efef79662d4288b9cbaecb4798f01af6a5b4a13b766c2d501444ac1846fd43 011_all_default-warn-format-security.patch 37de4cc9061bfe1963e6e6570e1a6bbfd58204bf90e0eef819882599a9a80ea28f3eb815c20c1f173dc25d4bd9971b7c7f7f9512d6f8f91f04de1e1175114d4d 012_all_default-warn-trampolines.patch 38a0fedeac3eebe4a6a957792ba520225cf42663c96a171cd168fdb6c91ffa9a56b80351f8238c5d03b78d3ae2a6539a54481fe4848b4a395e2c87f2ff7adc08 013_all_default-ssp-fix.patch @@ -587,21 +584,20 @@ d35a3ac7e13a4446921a90e1ff3eec1079840c845f9d523c868e24ae21f94cf69ba041de5341ebef 0a0bc72b9366158f5d23fff1928e756fdd212433bac6ab1f00d632f241382820db8db5d475ddf11ea020eaf7e2e71b12fb9b1c3c870cf84adf6c2b16f15aabca 051_all_libiberty-pic.patch e7a2eb1b1870e199d6fd753d065781575656fa12baa264f96c5d179689d88c31b8a3f92a5dae96088c05e96aa2bda138364ad7dbcc79e1819a102f192cbb7bab 053_all_libitm-no-fortify-source.patch 4a328d1e1a56c20166307edcfa322068915784d9c08025b7f81cf69714da48fc266b6d34f77b9135c2f10da830d9df408276a1b78d1fd218637c2823506593c2 090_all_pr55930-dependency-tracking.patch -3842bd2be3e53db34e59bfb2bd438b244fc3712055058b9e232e33345f0fab216256b79e364fbac335972dc599a1d74393704f0cd595f3f076dcc10883c85b28 0003-gcc-poison-system-directories.patch +707b30c141778fbcb1e37ebb42873cd7971de232a1298f78bbd834fa74d411b7b49cecfe4f247316d7c785da792f95f26ea6d824cd322a8f87b29537af3f77f3 0003-gcc-poison-system-directories.patch d1c2d7ff7f673375dc7cd84ae9d8515853b5af6390c70bb763412c012101344e4ee1ce155151ce3fb6ba2b80af7ed42d697dbe1bf6fd6e7b2b9087a378c47c37 203-libgcc_s.patch 98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch 6d84354e6df96d5ea244eb3bb5f044781796b88040b11c78fb6ee509e5aac19d46e0e92ca836e98e6495d9751f52439833b748efc419e4f5d5301fb549c4dcc9 0002-posix_memalign.patch 7f434a7350c9b06d0ae7cc18a569d813238483afa34b0801d112844a0dfe6164ae36b0416955fd4da7a8caa54672247f319a8ec7ce4b6a97a5f4e17ec083112a 0008-s390x-muslldso.patch 66085c5555e6b91b6874d1782d5a1dc0ab1792889f9400f48cde9483f82b51b9e3a5de1efbba21a19fc5e664334f2188d0c2bc988d42335efa26118b3c85cc7f 0010-ldbl128-config.patch -45d5bc11a89e5af77503ca06eec52d6d84e6fea0be021aaee1bcc39f8dd3c7b4baa4200cfa2b0688faa0f207d005db89c029eff32f362207aa3d2365b2f2363e 0012-static-pie.patch +d91c5eba37166cf34ca38e03808e3960c091b3627008a0c68c127cdf52e3827f8cfbe478ababe64c3cbb4d5eb8ed6230a21a74b6908549e05e08646de09df37c 0012-static-pie.patch d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch 600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch 35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch -50537add461714f44dc6a778e0c6d0e15d6a782591c8aff38d1fb559191ddac2b5ee14a43a3005b389fdf98d2e7468ff4e64c88ba024cf94f9fe0d9854b9e9c8 ada-musl.patch +cceeac95f47ea8664e1c16c5ebecb472b5aaa56040e943c1b97c7873b50e3a2bf972d9f743d342a2444a3bb711a0720d2446fded43892c5e05bdeefd478b0cd1 ada-musl.patch a1f7750bc7b8b7d916a5dee34fcc736bd4fb249c96538b547d495794e6cfd49356aa3974506a15074b4cb58edd5d7e2868607c902dd003e8c464d5066fd4a575 libgnarl-musl.patch f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45b58ba8764ab1eb575d4eb6d6dfc550a87a183f8b94e76181 320-libffi-gnulinux.patch -86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch -8039d4081b77332694bc10f898d5e4da0ece4ce7b0e219fedb2aab965126b6b0537d03ba8652341c9c35af07eef33e96b42cc02388f36d8027b9475d44f6b420 0016-invalid_tls_model.patch" +86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch" diff --git a/cross/gcc-armhf/ada-musl.patch b/cross/gcc-armhf/ada-musl.patch index 7a86ae4af..1487f4a57 100644 --- a/cross/gcc-armhf/ada-musl.patch +++ b/cross/gcc-armhf/ada-musl.patch @@ -124,29 +124,9 @@ index 0d12f7e..a063b47 100644 #endif #if defined (_WIN32) -diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c -index 7025f57..207b50d 100644 ---- a/gcc/ada/terminals.c -+++ b/gcc/ada/terminals.c -@@ -1108,13 +1108,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns) - #include - #include - --/* On some system termio is either absent or including it will disable termios -- (HP-UX) */ --#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \ -- && !defined (__rtems__) && !defined (__QNXNTO__) --# include --#endif -- - #include - #include - #include -diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in -index ebb955e..08cfbee 100644 ---- a/gcc/ada/gcc-interface/Makefile.in -+++ b/gcc/ada/gcc-interface/Makefile.in -@@ -1028,7 +1028,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),) +--- a/gcc/ada/Makefile.rtl 2019-05-14 21:18:45.217455681 +0200 ++++ b/gcc/ada/Makefile.rtl 2019-05-14 21:21:30.686464218 +0200 +@@ -1521,7 +1521,7 @@ s-tpopsp.adb -Subject: [PATCH] Use --push-state --as-needed and --pop-state instead of --as-needed and --no-as-needed for libgcc - -As discussed, using --as-needed and --no-as-needed is dangerous, because -it results in --no-as-needed even for libraries after -lgcc_s, even when the -default is --as-needed or --as-needed has been specified earlier on the -command line. - -If the linker supports --push-state/--pop-state, we should IMHO use it. - -2018-04-11 Jakub Jelinek - - * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use - --push-state --as-needed and --pop-state instead of --as-needed and - --no-as-needed if ld supports it. - * configure: Regenerated. - -Index: b/gcc/configure.ac -=================================================================== ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5518,11 +5518,21 @@ if test $in_tree_ld = yes ; then - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ - && test $in_tree_ld_is_elf = yes; then - gcc_cv_ld_as_needed=yes -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 28; then -+ gcc_cv_ld_as_needed_option='--push-state --as-needed' -+ gcc_cv_ld_no_as_needed_option='--pop-state' -+ fi - fi - elif test x$gcc_cv_ld != x; then - # Check if linker supports --as-needed and --no-as-needed options - if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then - gcc_cv_ld_as_needed=yes -+ if $gcc_cv_ld --help 2>&1 | grep push-state > /dev/null; then -+ if $gcc_cv_ld --help 2>&1 | grep pop-state > /dev/null; then -+ gcc_cv_ld_as_needed_option='--push-state --as-needed' -+ gcc_cv_ld_no_as_needed_option='--pop-state' -+ fi -+ fi - fi - case "$target:$gnu_ld" in - *-*-solaris2*:no) diff --git a/cross/gcc-armv7/0003-gcc-poison-system-directories.patch b/cross/gcc-armv7/0003-gcc-poison-system-directories.patch index 05138976c..0d6d964d3 100644 --- a/cross/gcc-armv7/0003-gcc-poison-system-directories.patch +++ b/cross/gcc-armv7/0003-gcc-poison-system-directories.patch @@ -141,14 +141,14 @@ diff --git a/gcc/gcc.c b/gcc/gcc.c index a716f708259..02b3cd39fc2 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -1037,6 +1037,8 @@ proper position among the other output files. */ - "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ +@@ -1061,6 +1060,8 @@ + "-z relro -z now " \ "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ + %{Wno-poison-system-directories:--no-poison-system-directories} \ + %{Werror=poison-system-directories:--error-poison-system-directories} \ - %{static|no-pie|static-pie:} %{L*} %(mfwrap) %(link_libgcc) " \ - VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ + %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ diff --git a/gcc/incpath.c b/gcc/incpath.c index b11c6a57939..e3b7a21966f 100644 diff --git a/cross/gcc-armv7/0012-static-pie.patch b/cross/gcc-armv7/0012-static-pie.patch index 03a4f68f6..d7cfcb781 100644 --- a/cross/gcc-armv7/0012-static-pie.patch +++ b/cross/gcc-armv7/0012-static-pie.patch @@ -38,7 +38,7 @@ diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h index 8620de3e42d..235328a2642 100644 --- a/gcc/config/gnu-user.h +++ b/gcc/config/gnu-user.h -@@ -52,13 +52,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -51,13 +51,12 @@ #define GNU_USER_TARGET_STARTFILE_SPEC \ "%{shared:; \ pg|p|profile:%{static-pie:grcrt1.o%s;:gcrt1.o%s}; \ @@ -46,8 +46,8 @@ index 8620de3e42d..235328a2642 100644 - static-pie:rcrt1.o%s; \ + static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \ " PIE_SPEC ":Scrt1.o%s; \ - :crt1.o%s} \ - crti.o%s \ + :crt1.o%s} " \ + GNU_USER_TARGET_CRTI " \ - %{static:crtbeginT.o%s; \ - shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ + %{shared|" PIE_SPEC ":crtbeginS.o%s; \ @@ -55,16 +55,16 @@ index 8620de3e42d..235328a2642 100644 :crtbegin.o%s} \ %{fvtable-verify=none:%s; \ fvtable-verify=preinit:vtv_start_preinit.o%s; \ -@@ -92,8 +91,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -76,8 +75,7 @@ "%{fvtable-verify=none:%s; \ fvtable-verify=preinit:vtv_end_preinit.o%s; \ fvtable-verify=std:vtv_end.o%s} \ - %{static:crtend.o%s; \ - shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ + %{shared|" PIE_SPEC ":crtendS.o%s; \ - :crtend.o%s} \ - crtn.o%s \ - " CRTOFFLOADEND + :crtend.o%s} " \ + GNU_USER_TARGET_CRTN " " \ + CRTOFFLOADEND @@ -133,7 +131,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC @@ -74,37 +74,6 @@ index 8620de3e42d..235328a2642 100644 #endif #undef LINK_GCC_C_SEQUENCE_SPEC -diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h -index bb19d0dcd41..bb2a2324eb0 100644 ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -763,12 +763,12 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - #define STARTFILE_LINUX_SPEC \ - "%{shared:; \ - pg|p|profile:gcrt1.o%s; \ -- static:crt1.o%s; \ -- static-pie|" PIE_SPEC ":Scrt1.o%s; \ -+ static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \ -+ " PIE_SPEC ":Scrt1.o%s; \ - :crt1.o%s} \ - %{mnewlib:ecrti.o%s;:crti.o%s} \ -- %{static:crtbeginT.o%s; \ -- shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ -+ %{shared|" PIE_SPEC ":crtbeginS.o%s; \ -+ static:crtbeginT.o%s; \ - :crtbegin.o%s} \ - %{fvtable-verify=none:%s; \ - fvtable-verify=preinit:vtv_start_preinit.o%s; \ -@@ -781,8 +781,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) - "%{fvtable-verify=none:%s; \ - fvtable-verify=preinit:vtv_end_preinit.o%s; \ - fvtable-verify=std:vtv_end.o%s} \ -- %{static:crtend.o%s; \ -- shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ -+ %{shared|" PIE_SPEC ":crtendS.o%s; \ - :crtend.o%s} \ - %{mnewlib:ecrtn.o%s;:crtn.o%s} \ - " CRTOFFLOADEND diff --git a/gcc/gcc.c b/gcc/gcc.c index eb1610ba8b0..87560afb03c 100644 --- a/gcc/gcc.c diff --git a/cross/gcc-armv7/0016-invalid_tls_model.patch b/cross/gcc-armv7/0016-invalid_tls_model.patch deleted file mode 100644 index 93dd7ddcd..000000000 --- a/cross/gcc-armv7/0016-invalid_tls_model.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- ./libgomp/configure.tgt.orig 2018-09-25 13:44:16.654561098 -0400 -+++ ./libgomp/configure.tgt 2018-09-25 13:44:50.452688100 -0400 -@@ -10,23 +10,6 @@ - # XCFLAGS Add extra compile flags to use. - # XLDFLAGS Add extra link flags to use. - --# Optimize TLS usage by avoiding the overhead of dynamic allocation. --if test $gcc_cv_have_tls = yes ; then -- case "${target}" in -- -- *-*-k*bsd*-gnu*) -- ;; -- -- *-*-linux* | *-*-gnu*) -- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec" -- ;; -- -- *-*-rtems*) -- XCFLAGS="${XCFLAGS} -ftls-model=local-exec" -- ;; -- esac --fi -- - # Since we require POSIX threads, assume a POSIX system by default. - config_path="posix" diff --git a/cross/gcc-armv7/005_all_default-as-needed.patch b/cross/gcc-armv7/005_all_default-as-needed.patch index 00852197f..2eced0f06 100644 --- a/cross/gcc-armv7/005_all_default-as-needed.patch +++ b/cross/gcc-armv7/005_all_default-as-needed.patch @@ -234,11 +234,11 @@ Index: b/gcc/config/riscv/linux.h =================================================================== --- a/gcc/config/riscv/linux.h +++ b/gcc/config/riscv/linux.h -@@ -50,6 +50,7 @@ - #define CPP_SPEC "%{pthread:-D_REENTRANT}" +@@ -58,6 +58,7 @@ + "%{mabi=ilp32:_ilp32}" #define LINK_SPEC "\ +-as-needed \ - -melf" XLEN_SPEC "lriscv \ + -melf" XLEN_SPEC "lriscv" LD_EMUL_SUFFIX " \ %{mno-relax:--no-relax} \ %{shared} \ diff --git a/cross/gcc-armv7/APKBUILD b/cross/gcc-armv7/APKBUILD index 82fdf684f..92ff0b179 100644 --- a/cross/gcc-armv7/APKBUILD +++ b/cross/gcc-armv7/APKBUILD @@ -23,7 +23,7 @@ CBUILDROOT="/" _cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET" pkgname="gcc-armv7" -pkgver=8.3.0 +pkgver=9.2.0 [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" [ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" @@ -163,7 +163,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg 003_all_default-fortify-source.patch 005_all_default-as-needed.patch gcc-as-needed-gold.patch - gcc-as-needed-push-pop.patch 011_all_default-warn-format-security.patch 012_all_default-warn-trampolines.patch 013_all_default-ssp-fix.patch @@ -194,7 +193,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg 320-libffi-gnulinux.patch gcc-pure64-mips.patch - 0016-invalid_tls_model.patch " # gcc-4.8-build-args.patch @@ -573,12 +571,11 @@ gnat() { mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ } -sha512sums="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802 gcc-8.3.0.tar.xz +sha512sums="a12dff52af876aee0fd89a8d09cdc455f35ec46845e154023202392adc164848faf8ee881b59b681b696e27c69fd143a214014db4214db62f9891a1c8365c040 gcc-9.2.0.tar.xz e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch -02b725b220e540077efef741e9d457f9e004fe53ae642a138e214875d076a60f7c2f27de0ed9a4225db2030fc9c3d2c5b0414c895b9eec0f5f48fad70e2fb029 005_all_default-as-needed.patch +5e4794d1caddb1050d8935ae5a53ba275b653ad2c9954df89a8c47ac694e6139011829f440eb7e5b24fd57ea25daf25ac83f317871841a78ffb74d167d6f8bf9 005_all_default-as-needed.patch 6c9a5068f6eea8a85d297a3555b1d2333ffd4b9ddbfb7560a3e643f8577603871ca123373ef7f96e894225291d88f7bf575c7f8386bcfdd1dabcd7ba12598b65 gcc-as-needed-gold.patch -ab0df1862f1b645634e79b8101326ce53215eba39861a455cd145b81b5267a6a61bc6e76b32d53887a0a48873f7efc23e2c52cc04400c6afd89822f245cdbc77 gcc-as-needed-push-pop.patch e026bf9f73ee254528423c6cabdfd7794960c567161581b7d4b7c61c45027e12a6efef79662d4288b9cbaecb4798f01af6a5b4a13b766c2d501444ac1846fd43 011_all_default-warn-format-security.patch 37de4cc9061bfe1963e6e6570e1a6bbfd58204bf90e0eef819882599a9a80ea28f3eb815c20c1f173dc25d4bd9971b7c7f7f9512d6f8f91f04de1e1175114d4d 012_all_default-warn-trampolines.patch 38a0fedeac3eebe4a6a957792ba520225cf42663c96a171cd168fdb6c91ffa9a56b80351f8238c5d03b78d3ae2a6539a54481fe4848b4a395e2c87f2ff7adc08 013_all_default-ssp-fix.patch @@ -587,21 +584,20 @@ d35a3ac7e13a4446921a90e1ff3eec1079840c845f9d523c868e24ae21f94cf69ba041de5341ebef 0a0bc72b9366158f5d23fff1928e756fdd212433bac6ab1f00d632f241382820db8db5d475ddf11ea020eaf7e2e71b12fb9b1c3c870cf84adf6c2b16f15aabca 051_all_libiberty-pic.patch e7a2eb1b1870e199d6fd753d065781575656fa12baa264f96c5d179689d88c31b8a3f92a5dae96088c05e96aa2bda138364ad7dbcc79e1819a102f192cbb7bab 053_all_libitm-no-fortify-source.patch 4a328d1e1a56c20166307edcfa322068915784d9c08025b7f81cf69714da48fc266b6d34f77b9135c2f10da830d9df408276a1b78d1fd218637c2823506593c2 090_all_pr55930-dependency-tracking.patch -3842bd2be3e53db34e59bfb2bd438b244fc3712055058b9e232e33345f0fab216256b79e364fbac335972dc599a1d74393704f0cd595f3f076dcc10883c85b28 0003-gcc-poison-system-directories.patch +707b30c141778fbcb1e37ebb42873cd7971de232a1298f78bbd834fa74d411b7b49cecfe4f247316d7c785da792f95f26ea6d824cd322a8f87b29537af3f77f3 0003-gcc-poison-system-directories.patch d1c2d7ff7f673375dc7cd84ae9d8515853b5af6390c70bb763412c012101344e4ee1ce155151ce3fb6ba2b80af7ed42d697dbe1bf6fd6e7b2b9087a378c47c37 203-libgcc_s.patch 98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch 6d84354e6df96d5ea244eb3bb5f044781796b88040b11c78fb6ee509e5aac19d46e0e92ca836e98e6495d9751f52439833b748efc419e4f5d5301fb549c4dcc9 0002-posix_memalign.patch 7f434a7350c9b06d0ae7cc18a569d813238483afa34b0801d112844a0dfe6164ae36b0416955fd4da7a8caa54672247f319a8ec7ce4b6a97a5f4e17ec083112a 0008-s390x-muslldso.patch 66085c5555e6b91b6874d1782d5a1dc0ab1792889f9400f48cde9483f82b51b9e3a5de1efbba21a19fc5e664334f2188d0c2bc988d42335efa26118b3c85cc7f 0010-ldbl128-config.patch -45d5bc11a89e5af77503ca06eec52d6d84e6fea0be021aaee1bcc39f8dd3c7b4baa4200cfa2b0688faa0f207d005db89c029eff32f362207aa3d2365b2f2363e 0012-static-pie.patch +d91c5eba37166cf34ca38e03808e3960c091b3627008a0c68c127cdf52e3827f8cfbe478ababe64c3cbb4d5eb8ed6230a21a74b6908549e05e08646de09df37c 0012-static-pie.patch d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch 600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch 35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch -50537add461714f44dc6a778e0c6d0e15d6a782591c8aff38d1fb559191ddac2b5ee14a43a3005b389fdf98d2e7468ff4e64c88ba024cf94f9fe0d9854b9e9c8 ada-musl.patch +cceeac95f47ea8664e1c16c5ebecb472b5aaa56040e943c1b97c7873b50e3a2bf972d9f743d342a2444a3bb711a0720d2446fded43892c5e05bdeefd478b0cd1 ada-musl.patch a1f7750bc7b8b7d916a5dee34fcc736bd4fb249c96538b547d495794e6cfd49356aa3974506a15074b4cb58edd5d7e2868607c902dd003e8c464d5066fd4a575 libgnarl-musl.patch f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45b58ba8764ab1eb575d4eb6d6dfc550a87a183f8b94e76181 320-libffi-gnulinux.patch -86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch -8039d4081b77332694bc10f898d5e4da0ece4ce7b0e219fedb2aab965126b6b0537d03ba8652341c9c35af07eef33e96b42cc02388f36d8027b9475d44f6b420 0016-invalid_tls_model.patch" +86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch" diff --git a/cross/gcc-armv7/ada-musl.patch b/cross/gcc-armv7/ada-musl.patch index 7a86ae4af..1487f4a57 100644 --- a/cross/gcc-armv7/ada-musl.patch +++ b/cross/gcc-armv7/ada-musl.patch @@ -124,29 +124,9 @@ index 0d12f7e..a063b47 100644 #endif #if defined (_WIN32) -diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c -index 7025f57..207b50d 100644 ---- a/gcc/ada/terminals.c -+++ b/gcc/ada/terminals.c -@@ -1108,13 +1108,6 @@ __gnat_setup_winsize (void *desc, int rows, int columns) - #include - #include - --/* On some system termio is either absent or including it will disable termios -- (HP-UX) */ --#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \ -- && !defined (__rtems__) && !defined (__QNXNTO__) --# include --#endif -- - #include - #include - #include -diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in -index ebb955e..08cfbee 100644 ---- a/gcc/ada/gcc-interface/Makefile.in -+++ b/gcc/ada/gcc-interface/Makefile.in -@@ -1028,7 +1028,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),) +--- a/gcc/ada/Makefile.rtl 2019-05-14 21:18:45.217455681 +0200 ++++ b/gcc/ada/Makefile.rtl 2019-05-14 21:21:30.686464218 +0200 +@@ -1521,7 +1521,7 @@ s-tpopsp.adb -Subject: [PATCH] Use --push-state --as-needed and --pop-state instead of --as-needed and --no-as-needed for libgcc - -As discussed, using --as-needed and --no-as-needed is dangerous, because -it results in --no-as-needed even for libraries after -lgcc_s, even when the -default is --as-needed or --as-needed has been specified earlier on the -command line. - -If the linker supports --push-state/--pop-state, we should IMHO use it. - -2018-04-11 Jakub Jelinek - - * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use - --push-state --as-needed and --pop-state instead of --as-needed and - --no-as-needed if ld supports it. - * configure: Regenerated. - -Index: b/gcc/configure.ac -=================================================================== ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5518,11 +5518,21 @@ if test $in_tree_ld = yes ; then - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ - && test $in_tree_ld_is_elf = yes; then - gcc_cv_ld_as_needed=yes -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 28; then -+ gcc_cv_ld_as_needed_option='--push-state --as-needed' -+ gcc_cv_ld_no_as_needed_option='--pop-state' -+ fi - fi - elif test x$gcc_cv_ld != x; then - # Check if linker supports --as-needed and --no-as-needed options - if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then - gcc_cv_ld_as_needed=yes -+ if $gcc_cv_ld --help 2>&1 | grep push-state > /dev/null; then -+ if $gcc_cv_ld --help 2>&1 | grep pop-state > /dev/null; then -+ gcc_cv_ld_as_needed_option='--push-state --as-needed' -+ gcc_cv_ld_no_as_needed_option='--pop-state' -+ fi -+ fi - fi - case "$target:$gnu_ld" in - *-*-solaris2*:no)