source: rtems/cpukit/aclocal/prog-cc.m4 @ 385b2e2

Last change on this file since 385b2e2 was 385b2e2, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 18, 2003 at 12:58:44 PM

2003-02-18 Ralf Corsepius <corsepiu@…>

  • automake/local.am: Introduce depend-gcc. Remove ${ARCH}.
  • automake/compile.am: Remove GCCSPECS, GCC_SPECS, CONFIG.CC, CC, CPP. Add ${ARCH}. depend-gcc.
  • aclocal/prog-cc.m4: Set up RTEMS_CPPFLAGS.
  • aclocal/env-rtemscpu.m4: Remove GCC_SPECS.
  • aclocal/env-rtemsbsp.m4: Remove GCC_SPECS.
  • Property mode set to 100644
File size: 953 bytes
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
13_RTEMS_FLAGS([CFLAGS],
14  ["\$(CPU_CFLAGS) \$(RTEMS_CFLAGS_\$(VARIANT_V)_V) \$(CFLAGS_\$(VARIANT_V)_V) -g"])
15
16RTEMS_CHECK_TOOL(CC,gcc)
17test -z "$CC" && \
18  AC_MSG_ERROR([no acceptable cc found in \$PATH])
19AC_PROG_CC
20AC_PROG_CPP
21
22AM_CONDITIONAL(RTEMS_USE_GCC,test x"$GCC" = x"yes")
23])
24
25AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
26[
27dnl check target cc
28RTEMS_PROG_CC
29dnl check if the compiler supports --specs
30RTEMS_GCC_SPECS
31dnl check if the target compiler may use --pipe
32RTEMS_GCC_PIPE
33test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
34
35if test "$GCC" = yes; then
36RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall"
37m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"])
38RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"
39else
40RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)"
41fi
42AC_SUBST(RTEMS_CPPFLAGS)
43])
Note: See TracBrowser for help on using the repository browser.