Commit fefedb94 by Jakub Jelinek Committed by Jakub Jelinek

configure.ac (LD_AS_NEEDED_OPTION, [...]): Use --push-state --as-needed and…

configure.ac (LD_AS_NEEDED_OPTION, [...]): Use --push-state --as-needed and --pop-state instead of --as-needed and...

	* 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.

From-SVN: r259803
parent 58b40a67
2018-05-01 Jakub Jelinek <jakub@redhat.com> 2018-05-01 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.
PR web/85578 PR web/85578
* doc/install.texi2html: Replace _002d with - and _002a with * in * doc/install.texi2html: Replace _002d with - and _002a with * in
generated html files using sed. generated html files using sed.
......
...@@ -28733,11 +28733,25 @@ if test $in_tree_ld = yes ; then ...@@ -28733,11 +28733,25 @@ 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 \ 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 && test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_as_needed=yes 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 fi
elif test x$gcc_cv_ld != x; then elif test x$gcc_cv_ld != x; then
# Check if linker supports --as-needed and --no-as-needed options # Check if linker supports --as-needed and --no-as-needed options
if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then
gcc_cv_ld_as_needed=yes gcc_cv_ld_as_needed=yes
if $gcc_cv_ld --help 2>&1 | grep push-state > /dev/null \
&& $gcc_cv_ld --help 2>&1 | grep pop-state > /dev/null \
&& echo "$ld_ver" | grep GNU > /dev/null \
&& test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -ge 28; then
# Use these options only when both ld.bfd and ld.gold support
# --push-state/--pop-state, which unfortunately wasn't added
# at the same time.
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 case "$target:$gnu_ld" in
*-*-solaris2*:no) *-*-solaris2*:no)
......
...@@ -5517,11 +5517,25 @@ if test $in_tree_ld = yes ; then ...@@ -5517,11 +5517,25 @@ 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 \ 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 && test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_as_needed=yes 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 fi
elif test x$gcc_cv_ld != x; then elif test x$gcc_cv_ld != x; then
# Check if linker supports --as-needed and --no-as-needed options # Check if linker supports --as-needed and --no-as-needed options
if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then
gcc_cv_ld_as_needed=yes gcc_cv_ld_as_needed=yes
if $gcc_cv_ld --help 2>&1 | grep push-state > /dev/null \
&& $gcc_cv_ld --help 2>&1 | grep pop-state > /dev/null \
&& echo "$ld_ver" | grep GNU > /dev/null \
&& test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -ge 28; then
# Use these options only when both ld.bfd and ld.gold support
# --push-state/--pop-state, which unfortunately wasn't added
# at the same time.
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 case "$target:$gnu_ld" in
*-*-solaris2*:no) *-*-solaris2*:no)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment