diff options
| author | Paul Eggert | 2012-04-09 00:45:59 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-04-09 00:45:59 -0700 |
| commit | b8df54ffbefc5ddf40ddcda68a2a682769c5833d (patch) | |
| tree | 95b4e71a64030550e3c1719575121e773167d53a /lib-src/Makefile.in | |
| parent | cb3c2e3eca8bf31ac861739272ba1e182f4ec295 (diff) | |
| download | emacs-b8df54ffbefc5ddf40ddcda68a2a682769c5833d.tar.gz emacs-b8df54ffbefc5ddf40ddcda68a2a682769c5833d.zip | |
configure: new option --enable-gcc-warnings
I have been using this change for many months in my private copy
of Emacs, and have used it to find several bugs. It's mature
enough to publish now.
* Makefile.in (GNULIB_MODULES): Add warnings, manywarnings.
* configure.in: Support --enable-gcc-warnings, in the style of
other GNU packages such as coreutils.
(C_WARNINGS_SWITCH): Remove, replacing with...
(WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable.
(PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I,
when including system files with GCC.
* etc/NEWS: Mention --enable-gcc-warnings.
* lib/Makefile.am (AM_CFLAGS): New macro.
* m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
* lib-src/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(BASE_CFLAGS): Use new macros rather than old.
* lwlib/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* oldXMenu/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* src/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* src/process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
* src/regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
-Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
-Wunused-result, -Wunused-variable. This should go away once
the Emacs and Gnulib regex code is merged.
(xmalloc, xrealloc): Now static.
Diffstat (limited to 'lib-src/Makefile.in')
| -rw-r--r-- | lib-src/Makefile.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index cc1757e4e3b..6732030a648 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -36,8 +36,9 @@ configuration=@configuration@ | |||
| 36 | EXEEXT=@EXEEXT@ | 36 | EXEEXT=@EXEEXT@ |
| 37 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ | 37 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ |
| 38 | C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ | 38 | C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ |
| 39 | C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ | ||
| 40 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ | 39 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ |
| 40 | WARN_CFLAGS = @WARN_CFLAGS@ | ||
| 41 | WERROR_CFLAGS = @WERROR_CFLAGS@ | ||
| 41 | 42 | ||
| 42 | # Program name transformation. | 43 | # Program name transformation. |
| 43 | TRANSFORM = @program_transform_name@ | 44 | TRANSFORM = @program_transform_name@ |
| @@ -167,7 +168,8 @@ LIBS_SYSTEM = @LIBS_SYSTEM@ | |||
| 167 | # Those files shared with other GNU utilities need HAVE_CONFIG_H | 168 | # Those files shared with other GNU utilities need HAVE_CONFIG_H |
| 168 | # defined before they know they can take advantage of the information | 169 | # defined before they know they can take advantage of the information |
| 169 | # in ../src/config.h. | 170 | # in ../src/config.h. |
| 170 | BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) ${C_WARNINGS_SWITCH} \ | 171 | BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ |
| 172 | $(WARN_CFLAGS) $(WERROR_CFLAGS) \ | ||
| 171 | -DHAVE_CONFIG_H -I. -I../src -I../lib \ | 173 | -DHAVE_CONFIG_H -I. -I../src -I../lib \ |
| 172 | -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib | 174 | -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib |
| 173 | 175 | ||