[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 06/10] Make CFLAGS less painful
From: |
Robbie Harwood |
Subject: |
[PATCH v2 06/10] Make CFLAGS less painful |
Date: |
Wed, 1 Dec 2021 16:02:01 -0500 |
From: Peter Jones <pjones@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
[rharwood@redhat.com: make rpm gunk conditional]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
gnulib-tool | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gnulib-tool b/gnulib-tool
index 9c4a6c17e..24cdbe2da 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -3841,18 +3841,23 @@ func_emit_lib_Makefile_am ()
cppflags_part1=
fi
if $for_test; then
- cppflags_part2=" -DGNULIB_STRICT_CHECKING=1"
+ cppflags_part2=" \$(HOST_CPPFLAGS) -DGNULIB_STRICT_CHECKING=1
-D_GLIBCXX_ASSERTIONS "
else
- cppflags_part2=
+ cppflags_part2=" \$(HOST_CPPFLAGS) -D_GLIBCXX_ASSERTIONS "
+ fi
+ rpm_extra_cflags=
+ if test -f "/usr/lib/rpm/redhat/redhat-hardened-cc1" && test -f
"/usr/lib/rpm/redhat/redhat-annobin-cc1"; then
+ rpm_extra_cflags="-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1"
fi
if test -z "$makefile_name"; then
echo
echo "AM_CPPFLAGS =$cppflags_part1$cppflags_part2"
- echo "AM_CFLAGS ="
+ echo "AM_CFLAGS = \$(HOST_CFLAGS) -fexceptions -fstack-protector-strong
-fno-strict-aliasing $rpm_extra_cflags -Wp,-D_GLIBCXX_ASSERTIONS
-Wp,-DGNULIB_STRICT_CHECKING=1 -W -Wall -Wextra -Wno-undef
-Wno-missing-field-initializers -Wno-unused-parameter -Werror -Wno-error=vla
-Wno-error=type-limits -Werror=format-security -Werror=trampolines
-Wno-error=format-nonliteral -Wno-error=cast-align "
else
if test -n "$cppflags_part1$cppflags_part2"; then
echo
echo "AM_CPPFLAGS +=$cppflags_part1$cppflags_part2"
+ echo "AM_CFLAGS = \$(HOST_CFLAGS) -fexceptions -fstack-protector-strong
-fno-strict-aliasing $rpm_extra_cflags -Wp,-D_GLIBCXX_ASSERTIONS
-Wp,-DGNULIB_STRICT_CHECKING=1 -W -Wall -Wextra -Wno-undef
-Wno-missing-field-initializers -Wno-unused-parameter -Werror -Wno-error=vla
-Wno-error=type-limits -Werror=format-security -Werror=trampolines
-Wno-error=format-nonliteral -Wno-error=cast-align "
fi
fi
echo
--
2.33.0
- Re: [PATCH v2 02/10] gnulib/regexec: Fix possible null-dereference, (continued)
[PATCH v2 05/10] Make gnulib's regcomp not abort(), Robbie Harwood, 2021/12/01
[PATCH v2 06/10] Make CFLAGS less painful,
Robbie Harwood <=
[PATCH v2 07/10] Fix __argp_fmtstream_point()'s return type and comparisons with it, Robbie Harwood, 2021/12/01
[PATCH v2 08/10] Fix up a bunch of "gcc -Werror=sign-compare" complaints, Robbie Harwood, 2021/12/01
- Re: [PATCH v2 08/10] Fix up a bunch of "gcc -Werror=sign-compare" complaints, Paul Eggert, 2021/12/01
- Re: [PATCH v2 08/10] Fix up a bunch of "gcc -Werror=sign-compare" complaints, Robbie Harwood, 2021/12/07
- Re: [PATCH v2 08/10] Fix up a bunch of "gcc -Werror=sign-compare" complaints, Paul Eggert, 2021/12/07
- Re: [PATCH v2 08/10] Fix up a bunch of "gcc -Werror=sign-compare" complaints, Bruno Haible, 2021/12/08
- Re: [PATCH v2 08/10] Fix up a bunch of "gcc -Werror=sign-compare" complaints, Jim Meyering, 2021/12/08
- Re: [PATCH v2 08/10] Fix up a bunch of "gcc -Werror=sign-compare" complaints, Paul Eggert, 2021/12/08
- Re: [PATCH v2 08/10] Fix up a bunch of "gcc -Werror=sign-compare" complaints, Robbie Harwood, 2021/12/09
[PATCH v2 09/10] Paper over a stringop-overflow warning about wide char handling, Robbie Harwood, 2021/12/01