diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-09-26 07:13:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-09-26 12:55:51 +0000 |
commit | a1879bd58982c8ed4b39e08e17942462027ef447 (patch) | |
tree | a68063da2c9941223060eff709454462b72004e6 /main/gcc/gcc-as-needed-push-pop.patch | |
parent | f2204f50d09189657c86ab78592289d75aef21e1 (diff) | |
download | aports-a1879bd58982c8ed4b39e08e17942462027ef447.tar.bz2 aports-a1879bd58982c8ed4b39e08e17942462027ef447.tar.xz |
main/gcc: upgrade to 8.2.0
Diffstat (limited to 'main/gcc/gcc-as-needed-push-pop.patch')
-rw-r--r-- | main/gcc/gcc-as-needed-push-pop.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/main/gcc/gcc-as-needed-push-pop.patch b/main/gcc/gcc-as-needed-push-pop.patch new file mode 100644 index 0000000000..a5a4e9d3b4 --- /dev/null +++ b/main/gcc/gcc-as-needed-push-pop.patch @@ -0,0 +1,43 @@ +From: Jakub Jelinek <jakub@redhat.com> +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 <jakub@redhat.com> + + * 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) |