From: Adhemerval Zanella Date: Fri, 9 Feb 2024 16:36:22 +0000 (-0300) Subject: x86_64: Fix mark-plt configure test X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f2979cfdecb33dd47383baf41e5f6059f379035;p=thirdparty%2Fglibc.git x86_64: Fix mark-plt configure test The configure check might ignore if compiler driver warns that the option is no support, so force fatal warnings. If fixes the elf/tst-plt-rewrite regressions when ld.lld is used. --- diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure index 32324f62da..b4d8bf1370 100644 --- a/sysdeps/x86_64/configure +++ b/sysdeps/x86_64/configure @@ -67,7 +67,7 @@ cat > conftest.c <&5 @@ -76,7 +76,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then - if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,mark-plt -nostdlib \ + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,mark-plt, -Wl,--fatal-warnings -nostdlib \ -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ | grep "warning: -z mark-plt ignored" > /dev/null 2>&1; then true diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac index a00958e219..c4ef4319e4 100644 --- a/sysdeps/x86_64/configure.ac +++ b/sysdeps/x86_64/configure.ac @@ -13,7 +13,7 @@ LIBC_TRY_CC_AND_TEST_CC_OPTION([for -mprefer-vector-width=128], LIBC_CONFIG_VAR([config-cflags-mprefer-vector-width], [$libc_cv_cc_mprefer_vector_width]) -LIBC_LINKER_FEATURE([-z mark-plt], [-Wl,-z,mark-plt], +LIBC_LINKER_FEATURE([-z mark-plt], [-Wl,-z,mark-plt -Wl,--fatal-warnings], [libc_cv_z_mark_plt=yes], [libc_cv_z_mark_plt=no]) LIBC_CONFIG_VAR([have-z-mark-plt], [$libc_cv_z_mark_plt])