source: rtems/testsuites/aclocal/prog-cc.m4 @ 5cbc9c5

5
Last change on this file since 5cbc9c5 was 5cbc9c5, checked in by Jacob Hansen <jacob.hansen@…>, on 02/07/18 at 11:35:33

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.

  • Property mode set to 100644
File size: 794 bytes
Line 
1dnl
2dnl Check for target gcc
3dnl
4
5AC_DEFUN([RTEMS_PROG_CC],
6[
7AC_BEFORE([$0], [AC_PROG_CPP])dnl
8AC_BEFORE([$0], [AC_PROG_CC])dnl
9AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
10
11case "$host" in
12*-*-rtems*) ac_cv_exeext=.exe;;
13esac
14
15RTEMS_CHECK_TOOL(CC,gcc)
16test -z "$CC" && \
17  AC_MSG_ERROR([no acceptable cc found in \$PATH])
18AC_PROG_CC
19AC_PROG_CPP
20])
21
22AC_DEFUN([RTEMS_PROG_CC_FOR_TARGET],
23[
24dnl check target cc
25RTEMS_PROG_CC
26
27dnl check if the compiler supports -specs
28RTEMS_GCC_SPECS
29
30AS_IF([test x"$GCC" = xyes],[
31GCCSPECS="-B\$(RTEMS_SOURCE_ROOT)/bsps/\$(RTEMS_CPU)/\$(RTEMS_BSP_FAMILY)/start"
32AS_IF([test x"$rtems_cv_gcc_specs" = xyes],[
33GCCSPECS="${GCCSPECS} -specs bsp_specs"])
34GCCSPECS="${GCCSPECS} -qrtems"])
35AC_SUBST(GCCSPECS)
36
37RTEMS_INCLUDES
38RTEMS_BSP_INCLUDES
39RTEMS_BSP_LINKCMDS
40])
Note: See TracBrowser for help on using the repository browser.