From 309a9dc8dba6e248091b45297ef2d95fd9fd1be8 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 28 Feb 2003 06:50:36 +0000 Subject: Merger from rtems-4-6-branch. --- cpukit/aclocal/env-rtemsbsp.m4 | 3 --- cpukit/aclocal/env-rtemscpu.m4 | 3 --- cpukit/aclocal/gcc-isystem.m4 | 25 +++++++++++++++++++++++++ cpukit/aclocal/gcc-specs.m4 | 20 -------------------- cpukit/aclocal/prog-cc.m4 | 11 +++++++++-- 5 files changed, 34 insertions(+), 28 deletions(-) create mode 100644 cpukit/aclocal/gcc-isystem.m4 delete mode 100644 cpukit/aclocal/gcc-specs.m4 diff --git a/cpukit/aclocal/env-rtemsbsp.m4 b/cpukit/aclocal/env-rtemsbsp.m4 index f453586cdc..ae1a6f72d3 100644 --- a/cpukit/aclocal/env-rtemsbsp.m4 +++ b/cpukit/aclocal/env-rtemsbsp.m4 @@ -34,9 +34,6 @@ AC_SUBST(project_libdir) RTEMS_ROOT="$PROJECT_ROOT/c/$RTEMS_BSP" AC_SUBST(RTEMS_ROOT) -GCC_SPECS="-isystem \$(PROJECT_INCLUDE)" -AC_SUBST(GCC_SPECS) - RTEMS_ENABLE_BARE AC_SUBST(BARE_CPU_MODEL) AC_SUBST(BARE_CPU_CFLAGS) diff --git a/cpukit/aclocal/env-rtemscpu.m4 b/cpukit/aclocal/env-rtemscpu.m4 index b33fdbdd3c..0ea77438b6 100644 --- a/cpukit/aclocal/env-rtemscpu.m4 +++ b/cpukit/aclocal/env-rtemscpu.m4 @@ -13,9 +13,6 @@ if test x"$multilib" = x"yes"; then [MULTISUBDIR="/$with_multisubdir"]) AC_SUBST(MULTISUBDIR) - GCC_SPECS="-isystem \$(PROJECT_INCLUDE)" - AC_SUBST(GCC_SPECS) - PROJECT_INCLUDE="\$(PROJECT_ROOT)/lib/include" AC_SUBST(PROJECT_INCLUDE) diff --git a/cpukit/aclocal/gcc-isystem.m4 b/cpukit/aclocal/gcc-isystem.m4 new file mode 100644 index 0000000000..c230508208 --- /dev/null +++ b/cpukit/aclocal/gcc-isystem.m4 @@ -0,0 +1,25 @@ +dnl +dnl $Id$ +dnl +dnl Check whether the gcc accepts -isystem +dnl + +AC_DEFUN(RTEMS_GCC_ISYSTEM, +[AC_REQUIRE([RTEMS_PROG_CC]) +AC_CACHE_CHECK(whether $CC accepts -isystem,rtems_cv_gcc_isystem, +[ +rtems_cv_gcc_isystem=no +if test x"$GCC" = x"yes"; then +cat << EOF > conftest.h +int conftest123(); +EOF +cat << EOF > conftest.c +#include +int conftest123() {} +EOF + if test -z "`${CC} -isystem./ -c conftest.c 2>&1`";then + rtems_cv_gcc_isystem=yes + fi +fi +rm -f conftest* +])]) diff --git a/cpukit/aclocal/gcc-specs.m4 b/cpukit/aclocal/gcc-specs.m4 deleted file mode 100644 index ca0271424f..0000000000 --- a/cpukit/aclocal/gcc-specs.m4 +++ /dev/null @@ -1,20 +0,0 @@ -dnl -dnl $Id$ -dnl -dnl Check whether the target compiler accepts -specs -dnl - -AC_DEFUN(RTEMS_GCC_SPECS, -[AC_REQUIRE([RTEMS_PROG_CC]) -AC_CACHE_CHECK(whether $CC accepts -specs,rtems_cv_gcc_specs, -[ -rtems_cv_gcc_specs=no -if test x"$GCC" = x"yes"; then - touch confspec - echo 'void f(){}' >conftest.c - if test -z "`${CC} -specs confspec -c conftest.c 2>&1`";then - rtems_cv_gcc_specs=yes - fi -fi -rm -f confspec conftest* -])]) diff --git a/cpukit/aclocal/prog-cc.m4 b/cpukit/aclocal/prog-cc.m4 index 4ed2f5730c..117229bbe4 100644 --- a/cpukit/aclocal/prog-cc.m4 +++ b/cpukit/aclocal/prog-cc.m4 @@ -26,8 +26,8 @@ AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET, [ dnl check target cc RTEMS_PROG_CC -dnl check if the compiler supports --specs -RTEMS_GCC_SPECS +dnl check if the compiler supports -isystem +RTEMS_GCC_ISYSTEM dnl check if the target compiler may use --pipe RTEMS_GCC_PIPE test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe" @@ -36,4 +36,11 @@ if test "$GCC" = yes; then RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall" m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"]) fi + +AS_IF([test x"$rtems_cv_gcc_isystem" = x"yes"],[ + RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"],[ + RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)" +]) +AC_SUBST(RTEMS_CPPFLAGS) + ]) -- cgit v1.2.3