]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Remove -Wformat-security when removing -Wformat to avoid gcc 12 error.
authorDave Hart <hart@ntp.org>
Sun, 25 Jun 2023 23:18:48 +0000 (23:18 +0000)
committerDave Hart <hart@ntp.org>
Sun, 25 Jun 2023 23:18:48 +0000 (23:18 +0000)
bk: 6498cb58mKml5wrBBItyKrrxTpEp5w

ChangeLog
configure.ac
sntp/configure.ac
sntp/m4/ntp_compiler.m4

index 93cdab8b94eb430d9e1cf091711f64b15317250a..0ec8b6cc1c445080c81b327d74b3cd2d1b75f2dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+---
+* [Bug 3841] 4.2.8p17 build break w/ gcc 12 -Wformat-security without -Wformat
+             Need to remove --Wformat-security when removing -Wformat to
+             silence numerous libopts warnings.  <hart@ntp.org>
+
 ---
 (4.2.8p17) 2023/06/06 Released by Harlan Stenn <stenn@ntp.org>
 
index c2dce35e800d16b11dbad7158e5c068588750b78..3f53382de07c159473bae50235d13599e6486036 100644 (file)
@@ -35,7 +35,7 @@ AC_PRESERVE_HELP_ORDER
 # the date YYYYMMDD optionally with -HHMM if there is more than one
 # bump in a day.
 
-ntp_configure_cache_version=20230326
+ntp_configure_cache_version=20230625
 
 # When the cache version of config.cache and configure do not
 # match, NTP_CACHEVERSION will flush the cache.
index 43c2ad6c5828b35cd56804a52b41b15eb0b6c5f3..5ed410b47d4bcd829d8b228fe75bc43ba010c5b6 100644 (file)
@@ -33,7 +33,7 @@ AC_LANG([C])
 # the date YYYYMMDD optionally with -HHMM if there is more than one
 # bump in a day.
 
-sntp_configure_cache_version=20120806
+sntp_configure_cache_version=20230625
 
 # When the version of config.cache and configure do not
 # match, NTP_CACHEVERSION will flush the cache.
index ddce106fe5229e8393dbff5856795a02c439957d..0d857bbcc062220c47d78bf5b297a65188946f14 100644 (file)
@@ -106,11 +106,10 @@ case "$GCC" in
     #
     # libopts specifically builds a string with embedded NULs.
     # This causes a bunch of distracting warnings due to -Wformat.
-    # Let's see if we can figure out how to disable these.
     #
-    CFLAGS="$SAVED_CFLAGS -Wno-format"
+    CFLAGS="$SAVED_CFLAGS -Wno-format -Wno-format-security"
     AC_CACHE_CHECK(
-       [if $CC can handle -Wno-format], 
+       [if $CC can handle -Wno-format -Wno-format-security], 
        [ntp_cv_gcc_Wno_format],
        [
            AC_COMPILE_IFELSE(
@@ -120,13 +119,9 @@ case "$GCC" in
            )
        ]
     )
-
     case "$ntp_cv_gcc_Wno_format" in
      yes)
-       CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
-       ;;
-     no)
-       ;;
+       CC_NOFORMAT="$CC_NOFORMAT -Wno-format -Wno-format-security"
     esac
 
     CFLAGS="$SAVED_CFLAGS"