From: Dave Hart Date: Sun, 25 Jun 2023 23:18:48 +0000 (+0000) Subject: Remove -Wformat-security when removing -Wformat to avoid gcc 12 error. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a06d78b87a06a8b569adb82de155147211f02a9f;p=thirdparty%2Fntp.git Remove -Wformat-security when removing -Wformat to avoid gcc 12 error. bk: 6498cb58mKml5wrBBItyKrrxTpEp5w --- diff --git a/ChangeLog b/ChangeLog index 93cdab8b9..0ec8b6cc1 100644 --- 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. + --- (4.2.8p17) 2023/06/06 Released by Harlan Stenn diff --git a/configure.ac b/configure.ac index c2dce35e8..3f53382de 100644 --- a/configure.ac +++ b/configure.ac @@ -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. diff --git a/sntp/configure.ac b/sntp/configure.ac index 43c2ad6c5..5ed410b47 100644 --- a/sntp/configure.ac +++ b/sntp/configure.ac @@ -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. diff --git a/sntp/m4/ntp_compiler.m4 b/sntp/m4/ntp_compiler.m4 index ddce106fe..0d857bbcc 100644 --- a/sntp/m4/ntp_compiler.m4 +++ b/sntp/m4/ntp_compiler.m4 @@ -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"