aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
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.ac
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.ac')
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7c9b57789e..5af742ce41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1536,7 +1536,7 @@ dnl If not, then don't use it.
dnl Note that _FORTIFY_SOURCE may have been set through FLAGS too.
dnl _FORTIFY_SOURCE value will be selectively disabled for function that can't
dnl support it
-no_fortify_source="-Wp,-U_FORTIFY_SOURCE"
+no_fortify_source="-U_FORTIFY_SOURCE"
fortify_source="${no_fortify_source}"
AC_CACHE_CHECK([for maximum supported _FORTIFY_SOURCE level],
@@ -1555,7 +1555,7 @@ AS_CASE([$enable_fortify_source],
[libc_cv_fortify_source=no])
AS_IF([test "$libc_cv_fortify_source" = yes],
- [fortify_source="${fortify_source},-D_FORTIFY_SOURCE=${enable_fortify_source}"]
+ [fortify_source="${fortify_source} -D_FORTIFY_SOURCE=${enable_fortify_source}"]
)
AC_SUBST(enable_fortify_source)