mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
build: work with new glibc when not optimizing
Starting with glibc 2.15, the system headers refuse to compile unconditional use of FORTIFY_SOURCE if optimization is disabled but -Werror is in effect. * configure.ac (FORTIFY_SOURCE): Make conditional.
This commit is contained in:
1 parent
1e4300e926
commit
314457b2ae
1 file changed
+7
-2
+7
-2
@@ -162,8 +162,13 @@ if test "$gl_gcc_warnings" = yes; then
|
||||
AC_SUBST([WARN_CFLAGS])
|
||||
|
||||
AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
|
||||
AC_DEFINE([_FORTIFY_SOURCE], [2],
|
||||
[enable compile-time and run-time bounds-checking, and some warnings])
|
||||
AH_VERBATIM([FORTIFY_SOURCE],
|
||||
[/* Enable compile-time and run-time bounds-checking, and some warnings,
|
||||
without upsetting glibc 2.15+. */
|
||||
#if defined __OPTIMIZE__ && __OPTIMIZE__
|
||||
# define _FORTIFY_SOURCE 2
|
||||
#endif
|
||||
])
|
||||
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
|
||||
|
||||
# We use a slightly smaller set of warning options for lib/.
|
||||
|
||||
Reference in new issue
Block a user