From 5cbc9c59229ab1778c4ba8027cbc853bd12f7bba Mon Sep 17 00:00:00 2001 From: Jacob Hansen Date: Wed, 7 Feb 2018 13:35:33 +0200 Subject: 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. --- c/src/aclocal/prog-cc.m4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'c') 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" -- cgit v1.2.3