[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a86c25c91f3 11/13: Prefer -I to -isystem
From: |
Paul Eggert |
Subject: |
master a86c25c91f3 11/13: Prefer -I to -isystem |
Date: |
Tue, 16 Jul 2024 18:37:45 -0400 (EDT) |
branch: master
commit a86c25c91f39a25a93d18c9267e024822c1bc43e
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Prefer -I to -isystem
* configure.ac: Simplify configuration by using -I instead of
-isystem, as -isystem is no longer helpful for suppressing
diagnostics (and likely has not been helpful for years).
Do not suppress -Wsystem-headers, as Gnulib no longer enables it.
---
configure.ac | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3198ecd629b..144f0bd9fc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1759,11 +1759,8 @@ if test "$enable_check_lisp_object_type" = yes; then
fi
WERROR_CFLAGS=
-# When compiling with GCC, prefer -isystem to -I when including system
-# include files, to avoid generating useless diagnostics for the files.
AS_IF([test $gl_gcc_warnings = no],
[
- isystem='-I'
AS_IF([test "$emacs_cv_clang" = yes],
[
# Turn off some warnings if supported.
@@ -1773,8 +1770,6 @@ AS_IF([test $gl_gcc_warnings = no],
gl_WARN_ADD([-Wno-unknown-pragmas])
])
],[
- isystem='-isystem '
-
# This, $nw, is the list of warnings we disable.
nw=
@@ -1797,7 +1792,6 @@ AS_IF([test $gl_gcc_warnings = no],
nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers.
nw="$nw -Wduplicated-branches" # Too many false alarms
nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 110333
- nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Woverlength-strings" # Not a problem these days
nw="$nw -Wvla" # Emacs uses <vla.h>.
nw="$nw -Wunused-const-variable=2" # lisp.h declares const objects.
@@ -1915,9 +1909,6 @@ AC_SUBST([GNULIB_WARN_CFLAGS])
edit_cflags="
s,///*,/,g
- s/^/ /
- s/ -I/ $isystem/g
- s/^ //
"
AC_ARG_ENABLE([link-time-optimization],
@@ -2825,7 +2816,7 @@ fi
AC_SUBST([LD_SWITCH_X_SITE_RPATH])
if test "${x_includes}" != NONE && test -n "${x_includes}"; then
- C_SWITCH_X_SITE=$isystem`AS_ECHO(["$x_includes"]) | sed -e "s/:/ $isystem/g"`
+ C_SWITCH_X_SITE=-I`AS_ECHO(["$x_includes"]) | sed -e "s/:/ -I/g"`
fi
if test x"${x_includes}" = x; then
@@ -2891,8 +2882,8 @@ if test "${with_ns}" != no; then
GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
- CPPFLAGS="$CPPFLAGS -isystem ${GNUSTEP_SYSTEM_HEADERS}
${GNUSTEP_LOCAL_HEADERS}"
- CFLAGS="$CFLAGS -isystem ${GNUSTEP_SYSTEM_HEADERS}
${GNUSTEP_LOCAL_HEADERS}"
+ CPPFLAGS="$CPPFLAGS -I ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
+ CFLAGS="$CFLAGS -I ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}
${GNUSTEP_LOCAL_LIBRARIES}"
LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1.
@@ -5796,13 +5787,13 @@ if test "${with_xml2}" != "no"; then
xcsdkdir="" ;;
esac
fi
- CPPFLAGS="$CPPFLAGS -isystem${xcsdkdir}/usr/include/libxml2"
+ CPPFLAGS="$CPPFLAGS -I${xcsdkdir}/usr/include/libxml2"
AC_CHECK_HEADER([libxml/HTMLparser.h],
[AC_CHECK_DECL([HTML_PARSE_RECOVER], [HAVE_LIBXML2=yes], [],
[#include <libxml/HTMLparser.h>])])
CPPFLAGS="$SAVE_CPPFLAGS"
if test "${HAVE_LIBXML2}" = "yes"; then
- LIBXML2_CFLAGS="-isystem${xcsdkdir}/usr/include/libxml2"
+ LIBXML2_CFLAGS="-I${xcsdkdir}/usr/include/libxml2"
LIBXML2_LIBS="-lxml2"
fi
fi
- master updated (fd8bdedde96 -> 7cda30602fc), Paul Eggert, 2024/07/16
- master b4050ab75e8 05/13: Fix get_conversion_field --with-wide-wint overflow, Paul Eggert, 2024/07/16
- master f5dbdedcc53 01/13: Update from Gnulib by running admin/merge-gnulib, Paul Eggert, 2024/07/16
- master a53fd69fe21 07/13: Fix buffer size problem in print_bool_vector, Paul Eggert, 2024/07/16
- master 2067c255e67 02/13: Use Gnulib workaround for Android strnlen bug, Paul Eggert, 2024/07/16
- master 7cda30602fc 13/13: Check for more ‘find’ failures and port ‘find’, Paul Eggert, 2024/07/16
- master e1089cc9b6d 10/13: Simplify time form analysis, Paul Eggert, 2024/07/16
- master 51d096ec07d 08/13: Make ztrillion static, Paul Eggert, 2024/07/16
- master a4bafce01e6 04/13: Pacify -Wmissing-variable-declarations for lisp_malloc_user, Paul Eggert, 2024/07/16
- master 31517e81d0d 03/13: Pacify 32-bit GCC 14.1.1 in timer_check_2, Paul Eggert, 2024/07/16
- master a86c25c91f3 11/13: Prefer -I to -isystem,
Paul Eggert <=
- master b77abd2bfeb 06/13: alloc.c: ckd_add, not by-hand checks, Paul Eggert, 2024/07/16
- master d10c1796c99 09/13: Test !FASTER_TIMEFNS with builtin resolutions, Paul Eggert, 2024/07/16
- master a826296cff6 12/13: Quote BIN_DESTDIR better, Paul Eggert, 2024/07/16