diff options
Diffstat (limited to 'cpukit/aclocal')
-rw-r--r-- | cpukit/aclocal/prog-cc.m4 | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cpukit/aclocal/prog-cc.m4 b/cpukit/aclocal/prog-cc.m4 index d839eda9f7..6de5b33d57 100644 --- a/cpukit/aclocal/prog-cc.m4 +++ b/cpukit/aclocal/prog-cc.m4 @@ -19,19 +19,17 @@ AC_PROG_CPP AC_DEFUN([RTEMS_PROG_CC_FOR_TARGET], [ +# Was CFLAGS set? +rtems_cv_CFLAGS_set="${CFLAGS+set}" dnl check target cc RTEMS_PROG_CC dnl check if the target compiler may use --pipe RTEMS_GCC_PIPE test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe" -AS_IF([test "$GCC" = yes],[ -RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall" -# FIXME: This should be removed in production releases -RTEMS_CFLAGS="$RTEMS_CFLAGS -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs" -m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"]) -]) -AC_SUBST(RTEMS_CFLAGS) +# Append warning flags if CFLAGS wasn't set. +AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set], +[CFLAGS="$CFLAGS -Wall -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs"]) RTEMS_CPPFLAGS="-I\$(top_builddir) -I\$(PROJECT_INCLUDE)" AC_SUBST(RTEMS_CPPFLAGS) |