2003-02-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* aclocal/gcc-isystem.m4: New.
	* aclocal/gcc-specs.m4: Remove.
	* aclocal/prog-cc.m4: Remove RTEMS_GCC_SPECS.
	Add RTEMS_GCC_ISYSTEM.
	Reformat setting up RTEMS_CPPFLAGS.
This commit is contained in:
Ralf Corsepius
2003-02-18 14:35:03 +00:00
parent f7276a9bdf
commit 6738c9dc6e
4 changed files with 42 additions and 26 deletions

View File

@@ -1,3 +1,11 @@
2003-02-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/gcc-isystem.m4: New.
* aclocal/gcc-specs.m4: Remove.
* aclocal/prog-cc.m4: Remove RTEMS_GCC_SPECS.
Add RTEMS_GCC_ISYSTEM.
Reformat setting up RTEMS_CPPFLAGS.
2003-02-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* automake/local.am: Introduce depend-gcc.

View File

@@ -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*
])])

View File

@@ -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*
])])

View File

@@ -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"
@@ -35,9 +35,12 @@ test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
if test "$GCC" = yes; then
RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall"
m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"])
RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"
else
RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)"
fi
AC_SUBST(RTEMS_CPPFLAGS)
AS_IF([test x"$rtems_cv_gcc_isystem" = x"yes"],[
RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"],[
RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)"
])
AC_SUBST(RTEMS_CPPFLAGS)
])