This is an automated email from the ASF dual-hosted git repository.

avamingli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit e3e971d98885ccb6d45e4d6c930fd4a5bc0a1054
Author: Chen Mulong <[email protected]>
AuthorDate: Mon Dec 19 09:53:10 2022 +0800

    Clean up compilation warnings coming from PL/Perl with clang-12~ (#14657)
    
    clang-12 has introduced -Wcompound-token-split-by-macro, that is causing
    a large amount of warnings when building PL/Perl because of its
    interactions with upstream Perl.  This commit adds one -Wno to CFLAGS at
    ./configure time if the flag is supported by the compiler to silence all
    those warnings.
    
    Upstream perl has fixed this issue, but it is going to take some time
    before this is spread across the buildfarm, and we have noticed that
    some animals would be useful with an extra -Werror to help with the
    detection of incorrect placeholders (see b0cf544), dangomushi being
    one.
    
    Reviewed-by: Tom Lane
    Discussion: https://postgr.es/m/YYr3qYa/[email protected]
    Backpatch-through: 10
    (cherry picked from commit 9ff47ea414c4e6ace347fc4e59866e38b9bbceaf)
    
    Co-authored-by: Michael Paquier <[email protected]>
---
 configure    | 3 ++-
 configure.ac | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index e7f74042f6..6a7e4103ee 100755
--- a/configure
+++ b/configure
@@ -6693,7 +6693,8 @@ fi
     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
   fi
   # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
-  # of warnings when building plperl because of usages in the Perl headers.
+  # of warnings when building plperl because of Perl.  Like previously, test
+  # for the positive form and add the negative form
   NOT_THE_CFLAGS=""
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports 
-Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, 
for NOT_THE_CFLAGS... " >&6; }
diff --git a/configure.ac b/configure.ac
index 80fc20d451..aee14b35da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -606,7 +606,8 @@ if test "$GCC" = yes -a "$ICC" = no; then
     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
   fi
   # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
-  # of warnings when building plperl because of usages in the Perl headers.
+  # of warnings when building plperl because of Perl.  Like previously, test
+  # for the positive form and add the negative form
   NOT_THE_CFLAGS=""
   PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wcompound-token-split-by-macro])
   if test -n "$NOT_THE_CFLAGS"; then


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to