From: Alan Modra Date: Mon, 27 Jun 2022 11:09:09 +0000 (+0930) Subject: Re: Disable execstack and rwx segments warnings for MIPS targets. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8bddb52eb97bbfd70f95447810f69c803b01e7b7;p=binutils-gdb.git Re: Disable execstack and rwx segments warnings for MIPS targets. PR 29263 * configure.ac: Fix typo. * testsuite/ld-elf/elf.exp: Add mips to targets that need --warn-execstack to pass first pr29072 test. --- diff --git a/ld/configure.ac b/ld/configure.ac index a54a2801889..4331d6b1302 100644 --- a/ld/configure.ac +++ b/ld/configure.ac @@ -564,7 +564,7 @@ AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_EXECSTACK, [Define to 1 if you want to enable --warn-execstack in ELF linker by default.]) if test "${ac_default_ld_warn_rwx_segments}" = unset; then - ac_default_ld_warn_rwx_segments=1 ;; + ac_default_ld_warn_rwx_segments=1 fi AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_RWX_SEGMENTS, $ac_default_ld_warn_rwx_segments, diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index 473349dd0b2..10c635e9593 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -238,8 +238,8 @@ if { [istarget *-*-*linux*] # The HPPA target disables the warnings by default since it needs an # executable stack to support older kernels and an RWX segment to - # support its PLT. - if { [istarget "hppa*-*-*"] } { + # support its PLT. MIPS also turns off exec stack warnings. + if { [istarget "hppa*-*-*"] || [istarget mips*-*-*] } { set extra_link_opts "--warn-execstack --warn-rwx-segments" } else { set extra_link_opts ""