source: rtems/c/src/aclocal/prog-cc.m4 @ 0063a93a

4.104.114.9
Last change on this file since 0063a93a was 0063a93a, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 16, 2008 at 4:02:41 AM

2008-08-16 Ralf Corsepius <ralf.corsepius@…>

  • aclocal/prog-cc.m4: Add -Wimplicit-function-declaration -Wstrict-prototypes to RTEMS_CFLAGS.
  • Property mode set to 100644
File size: 1.3 KB
Line 
1dnl
2dnl $Id$
3dnl
4dnl Check for target gcc
5dnl
6
7AC_DEFUN([RTEMS_PROG_CC],
8[
9AC_BEFORE([$0], [AC_PROG_CPP])dnl
10AC_BEFORE([$0], [AC_PROG_CC])dnl
11AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
12
13RTEMS_CHECK_TOOL(CC,gcc)
14test -z "$CC" && \
15  AC_MSG_ERROR([no acceptable cc found in \$PATH])
16AC_PROG_CC
17AC_PROG_CPP
18])
19
20AC_DEFUN([RTEMS_PROG_CC_FOR_TARGET],
21[
22dnl check target cc
23RTEMS_PROG_CC
24dnl check if the compiler supports -isystem
25RTEMS_GCC_ISYSTEM
26dnl check if the target compiler may use --pipe
27RTEMS_GCC_PIPE
28test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
29
30dnl check if the compiler supports --specs
31RTEMS_GCC_SPECS
32
33AS_IF([test x"$rtems_cv_gcc_specs" = xyes],[
34GCCSPECS="-B\$(PROJECT_ROOT)/lib/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/"
35GCCSPECS="${GCCSPECS} -specs bsp_specs -qrtems"])
36AC_SUBST(GCCSPECS)
37
38AS_IF([test "$GCC" = yes],[
39RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall"
40# FIXME: This should be removed in production releases
41RTEMS_CFLAGS="$RTEMS_CFLAGS -Wimplicit-function-declaration -Wstrict-prototypes"
42m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"])
43])
44AC_SUBST(RTEMS_CFLAGS)
45
46AS_IF([test x"$rtems_cv_gcc_isystem" = xyes],[
47  RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"],[
48  RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)"
49])
50AC_SUBST(RTEMS_CPPFLAGS)
51
52AS_IF([test "$GCC" = yes],[
53  RTEMS_RELLDFLAGS="-qnolinkcmds -nostdlib -Wl,-r"
54])
55AC_SUBST(RTEMS_RELLDFLAGS)
56])
Note: See TracBrowser for help on using the repository browser.