summaryrefslogtreecommitdiffstats
path: root/aclocal/gcc-specs.m4
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--aclocal/gcc-specs.m414
1 files changed, 8 insertions, 6 deletions
diff --git a/aclocal/gcc-specs.m4 b/aclocal/gcc-specs.m4
index 017ca40745..a422717d8a 100644
--- a/aclocal/gcc-specs.m4
+++ b/aclocal/gcc-specs.m4
@@ -9,12 +9,14 @@ dnl
AC_DEFUN(RTEMS_GCC_SPECS,
[AC_REQUIRE([RTEMS_PROG_CC])
AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
-[touch confspec
-echo 'void f(){}' >conftest.c
-if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
- rtems_cv_gcc_specs=yes
-else
- rtems_cv_gcc_specs=no
+[
+rtems_cv_gcc_specs=no
+if test "$rtems_cv_prog_gcc" = "yes"; then
+ touch confspec
+ echo 'void f(){}' >conftest.c
+ if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
+ rtems_cv_gcc_specs=yes
+ fi
fi
rm -f confspec conftest*
])])