ld: Enable --warn-textrel by default for Linux/x86 targets

* configure.tgt (ac_default_ld_textrel_check): Set to if unset
	for Linux/x86 targets.
This commit is contained in:
H.J. Lu 2020-05-28 04:27:08 -07:00
parent b32632c499
commit fa6ecf9405
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2020-05-28 H.J. Lu <hongjiu.lu@intel.com>
* configure.tgt (ac_default_ld_textrel_check): Set to if unset
for Linux/x86 targets.
2020-05-28 H.J. Lu <hongjiu.lu@intel.com>
PR ld/20824

View File

@ -1116,11 +1116,14 @@ frv-*-* | hppa*-*-* | ia64-*-* | mips*-*-*)
;;
esac
# Enable -z separate-code by default for Linux/x86.
# Enable -z separate-code and --warn-textrel by default for Linux/x86.
case "${target}" in
i[3-7]86-*-linux-* | x86_64-*-linux-*)
if test ${ac_default_ld_z_separate_code} = unset; then
ac_default_ld_z_separate_code=1
fi
if test ${ac_default_ld_textrel_check} = unset; then
ac_default_ld_textrel_check=yes
fi
;;
esac