pidgin/pidgin

Stop removing -Wall from CFLAGS
release-2.x.y
2 months ago, Elliott Sales de Andrade
e1d146d0b604
Parents 488055ab5531
Children ec304a0b25b3
Stop removing -Wall from CFLAGS

We really shouldn't override what the user has set externally. While it's true
that `-Wall` is set in `DEBUG_CFLAGS` later, dropping it from `CFLAGS` breaks
Perl detection somehow. Instead of going through the work to figure out how to
fix that, just stop modifying `CFLAGS` from the beginning.

Testing Done:
Compiled on Rawhide with the attached patch.

Bugs closed: PIDGIN-16593

Reviewed at https://reviews.imfreedom.org/r/2946/
  • +4 -5
    configure.ac
  • --- a/configure.ac Wed Jan 31 00:51:25 2024 -0600
    +++ b/configure.ac Wed Jan 31 01:30:28 2024 -0600
    @@ -1267,7 +1267,8 @@
    dnl We enable -Wall later.
    dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
    dnl This leads to warnings we don't want.
    - CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
    + starting_CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
    + orig_CFLAGS="$CFLAGS"
    dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
    dnl
    @@ -1301,18 +1302,16 @@
    "-Wpointer-arith" \
    "-Wundef" \
    ; do
    - orig_CFLAGS="$CFLAGS"
    - CFLAGS="$CFLAGS $newflag"
    + CFLAGS="$starting_CFLAGS $newflag"
    AC_MSG_CHECKING(for $newflag option to gcc)
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [
    AC_MSG_RESULT(yes)
    - CFLAGS="$orig_CFLAGS"
    DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
    ], [
    AC_MSG_RESULT(no)
    - CFLAGS="$orig_CFLAGS"
    ])
    done
    + CFLAGS="$orig_CFLAGS"
    if test "x$enable_fortify" = "xyes"; then
    AC_MSG_CHECKING(for FORTIFY_SOURCE support)