From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 3B22E3857B9E for ; Thu, 23 Jun 2022 08:12:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B22E3857B9E Received: by mail-wr1-x435.google.com with SMTP id n1so26525004wrg.12 for ; Thu, 23 Jun 2022 01:12:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to; bh=e542Wnjlh/vHFh+YFFGTBfipyTpNw/QcKqFmYjksh8I=; b=gHvEmcDLjkTamLo5n3J6XYA55fwJat9tyOjYMe5XT1f9BF6nSc34A1LvFQ5DbsUn+q ArL6R96EwT9QmpDK4epQo/7AOqgx3ePxTJS88xn1ZN9KYdyVw/Wqr9rL1QnGvwtP6K6H NXfwlIfq4oy686wZ7xNvz/45KcfM8aHWfecdfUK1P7fTU3OD/i8MuS8/TUjJdhoFsF3H UZPSbkxHYzszdyRkFX5T2nuQPzaFK79Obri9ENOXd8pMZRS1+yr1d5odjaSM5khoDwwC KMbV9MDDH/bP+gfkOhP5gvz7kT9xflXbzOaaArxQxWlUwOC0DE7YTD2dnJyx4FNXdCoW /PBg== X-Gm-Message-State: AJIora92FFo2GZ2QRQruYYzh6NiOhfVgd4qygHNGn6dpBKOt1GofnV51 1p5ZmQJekokE96gqNBqH0HOnSQ== X-Google-Smtp-Source: AGRyM1vW5YtEzr1CkA4xeq46V9lpReqgSS48LGVcfhHKEz2buDh2WvuqYt9SET2ujcK92cNa5sf5RA== X-Received: by 2002:adf:d22b:0:b0:21b:90be:2dc8 with SMTP id k11-20020adfd22b000000b0021b90be2dc8mr6869385wrh.423.1655971972710; Thu, 23 Jun 2022 01:12:52 -0700 (PDT) Received: from ?IPV6:2a01:e0a:419:6410:f13b:9058:aec2:4112? ([2a01:e0a:419:6410:f13b:9058:aec2:4112]) by smtp.gmail.com with ESMTPSA id p14-20020a5d48ce000000b0021020517639sm21278708wrs.102.2022.06.23.01.12.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jun 2022 01:12:52 -0700 (PDT) Message-ID: <327e0a95-9d5f-74a6-3d2b-63a004921906@linaro.org> Date: Thu, 23 Jun 2022 10:12:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [TCWG CI] Regression caused by binutils: Default to disabling the linker warnings about execstack and RWX segments if the target is the HPPA architecture. Content-Language: en-US To: Nick Clifton , gcc-regression@gcc.gnu.org Cc: ci_notify@linaro.org, Maxim Kuvyrkov References: <1734457576.4622.1655819631276@jenkins.jenkins> From: Laurent Alfonsi In-Reply-To: <1734457576.4622.1655819631276@jenkins.jenkins> X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HTML_MESSAGE, KAM_LOTSOFHASH, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-regression@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-regression mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2022 08:13:02 -0000 Nick, All, It seems there's an issue in email emission. Sorry about the empty email. I am fixing this By this time, here is the regression detected by our CI. Let me know if this build failure seems not relevant to you. Thanks Regards, ------------------------8<------------------------8<------------------------8<------------------------ [TCWG CI] Regression caused by binutils: Default to disabling the linker warnings about execstack and RWX segments if the target is the HPPA architecture.: commit acd65fa610df09a0954b8fecdadf546215263c5d Author: Nick Clifton Default to disabling the linker warnings about execstack and RWX segments if the target is the HPPA architecture. Results regressed to # reset_artifacts: -10 # true: 0 # First few build errors in logs: # 00:00:51 make[1]: *** [Makefile:8480: all-ld] Error 2 # 00:01:10 make: *** [Makefile:1004: all] Error 2 from # reset_artifacts: -10 # true: 0 # build_abe binutils: 1 # build_abe gcc: 2 # build_abe linux: 4 # build_abe glibc: 5 # build_abe gdb: 6 THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT. This commit has regressed these CI configurations: - tcwg_gnu_native_build/master-aarch64 First_bad build:https://ci.linaro.org/job/tcwg_gnu_native_build-bisect-master-aarch64/12/artifact/artifacts/build-acd65fa610df09a0954b8fecdadf546215263c5d/ Last_good build:https://ci.linaro.org/job/tcwg_gnu_native_build-bisect-master-aarch64/12/artifact/artifacts/build-7b97003ccdf8b6000b090c65f7493ff85dad1085/ Baseline build:https://ci.linaro.org/job/tcwg_gnu_native_build-bisect-master-aarch64/12/artifact/artifacts/build-baseline/ Even more details:https://ci.linaro.org/job/tcwg_gnu_native_build-bisect-master-aarch64/12/artifact/artifacts/ Reproduce builds: mkdir investigate-binutils-acd65fa610df09a0954b8fecdadf546215263c5d cd investigate-binutils-acd65fa610df09a0954b8fecdadf546215263c5d # Fetch scripts git clonehttps://git.linaro.org/toolchain/jenkins-scripts # Fetch manifests and test.sh script mkdir -p artifacts/manifests curl -o artifacts/manifests/build-baseline.shhttps://ci.linaro.org/job/tcwg_gnu_native_build-bisect-master-aarch64/12/artifact/artifacts/manifests/build-baseline.sh --fail curl -o artifacts/manifests/build-parameters.shhttps://ci.linaro.org/job/tcwg_gnu_native_build-bisect-master-aarch64/12/artifact/artifacts/manifests/build-parameters.sh --fail curl -o artifacts/test.shhttps://ci.linaro.org/job/tcwg_gnu_native_build-bisect-master-aarch64/12/artifact/artifacts/test.sh --fail chmod +x artifacts/test.sh # Reproduce the baseline build (build all pre-requisites) ./jenkins-scripts/tcwg_gnu-build.sh @@ artifacts/manifests/build-baseline.sh # Save baseline build state (which is then restored in artifacts/test.sh) mkdir -p ./bisect rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /binutils/ ./ ./bisect/baseline/ cd binutils # Reproduce first_bad build git checkout --detach acd65fa610df09a0954b8fecdadf546215263c5d ../artifacts/test.sh # Reproduce last_good build git checkout --detach 7b97003ccdf8b6000b090c65f7493ff85dad1085 ../artifacts/test.sh cd .. Full commit (up to 1000 lines): commit acd65fa610df09a0954b8fecdadf546215263c5d Author: Nick Clifton Date: Tue Jun 21 11:22:38 2022 +0100 Default to disabling the linker warnings about execstack and RWX segments if the target is the HPPA architecture. PR 29263 * configure.ac (ac_default_ld_warn_execstack): Default to 'no' for HPPA targets. (ac_default_ld_warn_rwx_segments): Likewise. * configure: Regenerate. * testsuite/ld-elf/elf.exp: Add the --warn-execstack command line option to the command line when running execstack tests for the HPPA target. --- ld/ChangeLog | 11 +++ ld/configure | 235 ++++++++++++++++++++++++-------------------- ld/configure.ac | 14 ++- ld/testsuite/ld-elf/elf.exp | 13 ++- 4 files changed, 164 insertions(+), 109 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index bcc1b3b7b56..37680ccc09a 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2022-06-21 Nick Clifton + + PR 29263 + * configure.ac (ac_default_ld_warn_execstack): Default to 'no' for + HPPA targets. + (ac_default_ld_warn_rwx_segments): Likewise. + * configure: Regenerate. + * testsuite/ld-elf/elf.exp: Add the --warn-execstack command line + option to the command line when running execstack tests for the + HPPA target. + 2022-05-12 Alan Modra PR 29006 diff --git a/ld/configure b/ld/configure index 80db525f930..6e2c21e8ba9 100755 --- a/ld/configure +++ b/ld/configure @@ -727,7 +727,6 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -744,6 +743,9 @@ AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V +CSCOPE +ETAGS +CTAGS am__untar am__tar AMTAR @@ -816,7 +818,8 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -2859,7 +2862,7 @@ test -n "$target_alias" && program_prefix=${target_alias}- -am__api_version='1.15' +am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3035,12 +3038,7 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -3375,8 +3373,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -3395,6 +3393,20 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi + + # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile @@ -3427,7 +3439,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly:. +that behaves properly:. If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -4352,45 +4364,45 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -11491,7 +11503,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11494 "configure" +#line 11506 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11597,7 +11609,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11600 "configure" +#line 11612 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15461,7 +15473,12 @@ fi # By default warn when an executable stack is created due to object files # requesting such, not when the user specifies -z execstack. -ac_default_ld_warn_execstack=2 +case "${target}" in + # The HPPA port needs to support older kernels that use executable stacks + # for signals and syscalls. + hppa*-*-*) ac_default_ld_warn_execstack=0 ;; + *) ac_default_ld_warn_execstack=2 ;; + esac # Check whether --enable-warn-execstack was given. if test "${enable_warn_execstack+set}" = set; then : enableval=$enable_warn_execstack; case "${enableval}" in @@ -17272,7 +17289,12 @@ _ACEOF if test "${ac_default_ld_warn_rwx_segments}" = unset; then - ac_default_ld_warn_rwx_segments=1 + case "${target}" in + # The HPPA's PLT section uses a constructed trampoline, hence it needs to + # have a RWX segment. + hppa*-*-*) ac_default_ld_warn_rwx_segments=0 ;; + *) ac_default_ld_warn_rwx_segments=1 ;; + esac fi cat >>confdefs.h <<_ACEOF @@ -18118,7 +18140,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -19102,29 +19124,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -19142,53 +19170,50 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)$/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) diff --git a/ld/configure.ac b/ld/configure.ac index 4331d6b1302..d587c46cc51 100644 --- a/ld/configure.ac +++ b/ld/configure.ac @@ -206,7 +206,12 @@ esac]) # By default warn when an executable stack is created due to object files # requesting such, not when the user specifies -z execstack. -ac_default_ld_warn_execstack=2 +[case "${target}" in + # The HPPA port needs to support older kernels that use executable stacks + # for signals and syscalls. + hppa*-*-*) ac_default_ld_warn_execstack=0 ;; + *) ac_default_ld_warn_execstack=2 ;; + esac] AC_ARG_ENABLE(warn-execstack, AS_HELP_STRING([--enable-warn-execstack], [enable warnings when creating an executable stack]), @@ -564,7 +569,12 @@ 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 + [case "${target}" in + # The HPPA's PLT section uses a constructed trampoline, hence it needs to + # have a RWX segment. + hppa*-*-*) ac_default_ld_warn_rwx_segments=0 ;; + *) ac_default_ld_warn_rwx_segments=1 ;; + esac] 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 abc35f80778..c73c2a81545 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -236,10 +236,19 @@ if { [istarget *-*-*linux*] proc prune_warnings_extra { text } { return $text } - + + # 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*-*-*"] } { + set extra_link_opts "--warn-execstack --warn-rwx-segments" + } else { + set extra_link_opts "" + } + run_ld_link_tests [list \ [list "PR ld/29072 (warn about an executable .note.GNU-stack)" \ - "-e 0" \ + "-e 0 $extra_link_opts" \ "" \ "" \ {pr29072-a.s} \