summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2005-01-05 17:52:33 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2005-01-05 17:52:33 +0000
commitea3f5598c074a510272ea7d0cb16b106697e388b (patch)
tree5d8516717b7f539c5ef169041f3874e9934e78c3 /c/src
parent2005-01-05 Ralf Corsepius <ralf.corsepius@rtems.org> (diff)
downloadrtems-ea3f5598c074a510272ea7d0cb16b106697e388b.tar.bz2
2005-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
* configure.ac: Pass CFLAGS to cpukit configure. * aclocal/rtems-flags.m4: Remove (Unused). * aclocal/prog-ccas.m4: Remove $(GCCSPECS). * aclocal/env-rtemsbsp.m4: Comment out CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CPU_CFLAGS. * aclocal/prog-cc.m4: Don't invoke _RTEMS_FLAGS to set up RTEMS_CFLAGS. * automake/compile.am: AM_CFLAGS = RTEMS_CFLAGS. Add AM_CXXFLAGS. Remove CPPFLAGS, CFLAGS, CPU_CFLAGS, CFLAGS_OPTIMIZE, ASFLAGS. Cleanup comments.
Diffstat (limited to 'c/src')
-rw-r--r--c/src/ChangeLog13
-rw-r--r--c/src/aclocal/env-rtemsbsp.m46
-rw-r--r--c/src/aclocal/prog-cc.m44
-rw-r--r--c/src/aclocal/prog-ccas.m42
-rw-r--r--c/src/aclocal/rtems-flags.m411
-rw-r--r--c/src/automake/compile.am60
-rw-r--r--c/src/configure.ac3
7 files changed, 24 insertions, 75 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog
index 6bf9d3dce4..7fa9dc303f 100644
--- a/c/src/ChangeLog
+++ b/c/src/ChangeLog
@@ -1,3 +1,16 @@
+2005-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * configure.ac: Pass CFLAGS to cpukit configure.
+ * aclocal/rtems-flags.m4: Remove (Unused).
+ * aclocal/prog-ccas.m4: Remove $(GCCSPECS).
+ * aclocal/env-rtemsbsp.m4:
+ Comment out CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CPU_CFLAGS.
+ * aclocal/prog-cc.m4: Don't invoke _RTEMS_FLAGS to set up
+ RTEMS_CFLAGS.
+ * automake/compile.am: AM_CFLAGS = RTEMS_CFLAGS. Add AM_CXXFLAGS.
+ Remove CPPFLAGS, CFLAGS, CPU_CFLAGS, CFLAGS_OPTIMIZE, ASFLAGS.
+ Cleanup comments.
+
2005-01-01 Ralf Corsepius <ralf.corsepius@rtems.org>
* automake/compile.am: Remove build-variant support.
diff --git a/c/src/aclocal/env-rtemsbsp.m4 b/c/src/aclocal/env-rtemsbsp.m4
index c7ce949521..6145f1f496 100644
--- a/c/src/aclocal/env-rtemsbsp.m4
+++ b/c/src/aclocal/env-rtemsbsp.m4
@@ -8,9 +8,9 @@ AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
-AC_ARG_VAR([CPU_CFLAGS],[CFLAGS specifying CPU-dependent features])
-AC_ARG_VAR([CFLAGS_OPTIMIZE_V],[CFLAGS for building the OPTIMIZE variant])
-AC_ARG_VAR([CFLAGS_DEBUG_V],[CFLAGS for building the DEBUG variant])
+# AC_ARG_VAR([CPU_CFLAGS],[CFLAGS specifying CPU-dependent features])
+# AC_ARG_VAR([CFLAGS_OPTIMIZE_V],[CFLAGS for building the OPTIMIZE variant])
+# AC_ARG_VAR([CFLAGS_DEBUG_V],[CFLAGS for building the DEBUG variant])
AC_ARG_VAR([RTEMS_BSP_FAMILY],[RTEMS's BSP directory])
AC_ARG_VAR([RTEMS_CPU_MODEL],[RTEMS's cpu model])
diff --git a/c/src/aclocal/prog-cc.m4 b/c/src/aclocal/prog-cc.m4
index 7b4335ca17..2267c5d720 100644
--- a/c/src/aclocal/prog-cc.m4
+++ b/c/src/aclocal/prog-cc.m4
@@ -10,8 +10,7 @@ AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_BEFORE([$0], [AC_PROG_CC])dnl
AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
-_RTEMS_FLAGS([CFLAGS],
- ["\$(CPU_CFLAGS) \$(RTEMS_CFLAGS_\$(VARIANT_V)_V) \$(CFLAGS_\$(VARIANT_V)_V) -g"])
+CFLAGS=${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}
RTEMS_CHECK_TOOL(CC,gcc)
test -z "$CC" && \
@@ -39,6 +38,7 @@ if test "$GCC" = yes; then
RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall"
m4_if([$1],,[],[RTEMS_CFLAGS="$RTEMS_CFLAGS $1"])
fi
+AC_SUBST(RTEMS_CFLAGS)
AS_IF([test x"$rtems_cv_gcc_isystem" = x"yes"],[
RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)"],[
diff --git a/c/src/aclocal/prog-ccas.m4 b/c/src/aclocal/prog-ccas.m4
index aeef25ec0c..c5b64f561f 100644
--- a/c/src/aclocal/prog-ccas.m4
+++ b/c/src/aclocal/prog-ccas.m4
@@ -3,6 +3,6 @@
AC_DEFUN([RTEMS_PROG_CCAS],
[
AC_REQUIRE([RTEMS_PROG_CC])
-AC_SUBST(CCAS,["$CC \$(GCCSPECS)"])
+AC_SUBST(CCAS,["$CC"])
AC_SUBST(CCASFLAGS,["-DASM \$(CFLAGS) \$(INCLUDES)"])
])
diff --git a/c/src/aclocal/rtems-flags.m4 b/c/src/aclocal/rtems-flags.m4
deleted file mode 100644
index 8e034e52c2..0000000000
--- a/c/src/aclocal/rtems-flags.m4
+++ /dev/null
@@ -1,11 +0,0 @@
-## $Id$
-##
-## Some hacks to set up RTEMS_*FLAGS
-## Internal macro, not supposed to be explictly used in configure.ac's
-
-AC_DEFUN([_RTEMS_FLAGS],[
-AS_IF([test -n "[$]{$1}"],
- [RTEMS_$1=[$]{$1}],
- [RTEMS_$1=$2])
-AC_SUBST([RTEMS_$1])
-])
diff --git a/c/src/automake/compile.am b/c/src/automake/compile.am
index c8d381e57f..f36b26d3e6 100644
--- a/c/src/automake/compile.am
+++ b/c/src/automake/compile.am
@@ -2,82 +2,28 @@
## $Id$
##
-## -------------------------------------------------------------------------
-## NOTE: This file is rather immature and has to be considered to be
-## almost experimental.
-##
-## Expect frequent changes -- It deserves to be cleaned up :(
-## -------------------------------------------------------------------------
-
-## The section below is based on make/compilers/gcc-target-default.cfg
-## used in former versions of RTEMS.
-
-##
-## Set up the flags for the toolchains:
-##
-## We are considering 3 different building schemes here:
-## * Using gcc's being able to accept -specs (aka gcc-2.8 building scheme)
-## * Using gcc's not being able to accept -specs (aka gcc-2.7.2 building
-## scheme)
-## * Using third party toolchains (aka non-gcc building scheme)
-##
-## Automake conditionals in use:
## RTEMS_USE_GCC .. if we are using GCC
-## NOTES:
-## * The gcc-2.8 building scheme is the nominal building scheme and
-## is actively supported.
-## * The non-gcc building scheme requires manually setting up environment
-## variables and is hardly tested at all
-
-## CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V are the values we
-## would want the corresponding macros to be set to.
-##
-## CFLAGS_OPTIMIZE, CFLAGS_DEBUG are set by the
-## 'VARIANT=<OPTIMIZE|DEBUG>' targets to their _V values.
-
if RTEMS_USE_GCC
## All the stuff below is specific to gcc
GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS)
endif # RTEMS_USE_GCC
-CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES)
-CFLAGS = @RTEMS_CFLAGS@
-## FIXME: This should be correct, but is not supported, yet
-# CXXFLAGS = @RTEMS_CXXFLAGS@
-## Fall back to using RTEMS_CFLAGS for C++
-CXXFLAGS = @RTEMS_CFLAGS@
-ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS)
-
depend:
if RTEMS_USE_GCC
-## gcc >= 2.8
RTEMS_RELLDFLAGS = -qnolinkcmds -nostdlib -Wl,-r
endif
## -------------------------------------------------------------------------
-## These are supposed to be set in make/custom/<bsp>.cfg
-CPU_CFLAGS = @CPU_CFLAGS@
-CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@
-
-## ------------------------------------------------------------------------
-## Setup hard-coded flags
-if RTEMS_USE_GCC
-## gcc >= gcc-2.8
-RTEMS_CFLAGS_OPTIMIZE_V =
-RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused
-endif
-RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V)
-
-## -------------------------------------------------------------------------
CC = @CC@ $(GCCSPECS)
CXX = @CXX@ $(GCCSPECS)
CPP = @CPP@ $(GCCSPECS)
+CCAS = @CCAS@ $(GCCSPECS)
##
AM_CPPFLAGS = $(RTEMS_CPPFLAGS)
-AM_CFLAGS =
-AM_CXXFLAGS =
+AM_CFLAGS = $(RTEMS_CFLAGS)
+AM_CXXFLAGS = $(RTEMS_CFLAGS)
AM_CCASFLAGS = $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
diff --git a/c/src/configure.ac b/c/src/configure.ac
index ebaa4b1a9e..0e0561d5ce 100644
--- a/c/src/configure.ac
+++ b/c/src/configure.ac
@@ -132,7 +132,8 @@ RTEMS_BSP_CONFIG_SUBDIR(
[cpukit],[../../cpukit],
['--with-project-root=${with_project_root}../$RTEMS_BSP/' \
'--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
- '--libdir=${exec_prefix}/${RTEMS_BSP}/lib'],
+ '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
+ 'CFLAGS="${CFLAGS}"'],
[test x"$multilib" = xno])
## Note: the order of the directories below is essential