summaryrefslogtreecommitdiffstats
path: root/c/src/aclocal
diff options
context:
space:
mode:
authorJacob Hansen <jacob.hansen@gaisler.com>2018-02-07 13:35:33 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2018-09-20 12:48:32 +0200
commit5cbc9c59229ab1778c4ba8027cbc853bd12f7bba (patch)
tree1df71d88e89290ed473390ed875d762bf7843617 /c/src/aclocal
parentleon: remove warning missing string.h (diff)
downloadrtems-5cbc9c59229ab1778c4ba8027cbc853bd12f7bba.tar.bz2
clang: Keep -qrtems and -B for compilers without -specs support
This is needed for building rtems correctly with Clang. Note that this change does not mean rtems can build correctly with mainline clang. However the change allows building rtems with a Clang toolchain that has a rtems frontend similar that of GCC's builtin rtems specs.
Diffstat (limited to 'c/src/aclocal')
-rw-r--r--c/src/aclocal/prog-cc.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/c/src/aclocal/prog-cc.m4 b/c/src/aclocal/prog-cc.m4
index 54f3a086ce..39bec6914a 100644
--- a/c/src/aclocal/prog-cc.m4
+++ b/c/src/aclocal/prog-cc.m4
@@ -28,10 +28,12 @@ test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
dnl check if the compiler supports --specs
RTEMS_GCC_SPECS
-AS_IF([test x"$rtems_cv_gcc_specs" = xyes],[
+dnl Compilers that does not support --specs (Clang) still needs -B and -qrtems
GCCSPECS="-B\$(RTEMS_SOURCE_ROOT)/bsps/\$(RTEMS_CPU)/\$(RTEMS_BSP_FAMILY)/start"
-GCCSPECS="${GCCSPECS} -specs bsp_specs -qrtems"])
+AS_IF([test x"$rtems_cv_gcc_specs" = xyes],[
+GCCSPECS="${GCCSPECS} -specs bsp_specs"])
AC_SUBST(GCCSPECS)
+GCCSPECS="${GCCSPECS} -qrtems"
AS_IF([test "$GCC" = yes],[
RTEMS_RELLDFLAGS="-qnolinkcmds -nostdlib -r"