aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-05-28 04:27:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-05-28 04:27:30 -0700
commitfa6ecf940581b4be26165351bb0473427d31c7d8 (patch)
tree705792f0d0fbe8534cf0cffa895bba8d0313f5b3 /ld
parentb32632c49968cd03e952f9b63b32d9e9f1ddaf53 (diff)
downloadgdb-fa6ecf940581b4be26165351bb0473427d31c7d8.zip
gdb-fa6ecf940581b4be26165351bb0473427d31c7d8.tar.gz
gdb-fa6ecf940581b4be26165351bb0473427d31c7d8.tar.bz2
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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/configure.tgt5
2 files changed, 9 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index aac749c..01a281c 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,10 @@
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
* NEWS: Mention --enable-textrel-check=[no|yes|warning|error].
* configure.ac: Add --enable-textrel-check=[no|yes|warning|error].
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 0b6ee8b..c166da8 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -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