From b9b3a5c5c7f36ec5f1f9451cd5f60c784b500300 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 23 Oct 2009 14:58:16 +0000 Subject: Remove RTEMS_CFLAGS. Rework CFLAGS setup. --- cpukit/aclocal/prog-cc.m4 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'cpukit/aclocal') 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) -- cgit v1.2.3