aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-09-10 09:22:17 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-10-01 08:44:40 -0300
commit127cefd84dc551a43d0ac58b4619503d04869042 (patch)
treecf6d1e255d280933a84dece69b4020843ce49f8d /configure
parent9dfea3de7f690bff70e3c6eb346b9ad082bb2e35 (diff)
downloadglibc-127cefd84dc551a43d0ac58b4619503d04869042.tar.xz
glibc-127cefd84dc551a43d0ac58b4619503d04869042.zip
Do not use -Wp to disable fortify (BZ 31928)
The -Wp does not work properly if the compiler is configured to enable fortify by default, since it bypasses the compiler driver (which defines the fortify flags in this case). This patch is similar to the one used on Ubuntu [1]. I checked with a build for x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, s390x-linux-gnu, and riscv64-linux-gnu with gcc-13 that enables the fortify by default. Co-authored-by: Matthias Klose <matthias.klose@canonical.com> [1] https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/tree/debian/patches/ubuntu/fix-fortify-source.patch Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure b/configure
index ec0b62db36..58bfb2917f 100755
--- a/configure
+++ b/configure
@@ -7718,7 +7718,7 @@ printf "%s\n" "#define HAVE_LIBCAP 1" >>confdefs.h
fi
-no_fortify_source="-Wp,-U_FORTIFY_SOURCE"
+no_fortify_source="-U_FORTIFY_SOURCE"
fortify_source="${no_fortify_source}"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for maximum supported _FORTIFY_SOURCE level" >&5
@@ -7773,7 +7773,7 @@ esac
if test "$libc_cv_fortify_source" = yes
then :
- fortify_source="${fortify_source},-D_FORTIFY_SOURCE=${enable_fortify_source}"
+ fortify_source="${fortify_source} -D_FORTIFY_SOURCE=${enable_fortify_source}"
fi