summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2003-02-28 06:50:36 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2003-02-28 06:50:36 +0000
commit309a9dc8dba6e248091b45297ef2d95fd9fd1be8 (patch)
tree7e14080e34f09d926ca649f587b75ddaffa99da2
parent2003-02-26 RTEMS (diff)
downloadrtems-309a9dc8dba6e248091b45297ef2d95fd9fd1be8.tar.bz2
Merger from rtems-4-6-branch.
-rw-r--r--cpukit/aclocal/env-rtemsbsp.m43
-rw-r--r--cpukit/aclocal/env-rtemscpu.m43
-rw-r--r--cpukit/aclocal/gcc-isystem.m425
-rw-r--r--cpukit/aclocal/gcc-specs.m420
-rw-r--r--cpukit/aclocal/prog-cc.m411
5 files changed, 34 insertions, 28 deletions
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 <conftest.h>
+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)
+
])