From fa6ecf940581b4be26165351bb0473427d31c7d8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 28 May 2020 04:27:08 -0700 Subject: [PATCH] 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. --- ld/ChangeLog | 5 +++++ ld/configure.tgt | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index aac749cadaa..01a281c968f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-05-28 H.J. Lu + + * configure.tgt (ac_default_ld_textrel_check): Set to if unset + for Linux/x86 targets. + 2020-05-28 H.J. Lu PR ld/20824 diff --git a/ld/configure.tgt b/ld/configure.tgt index 0b6ee8bc874..c166da885b6 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 -- 2.30.2