summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-21 17:43:22 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-21 17:43:22 +0000
commitcce81a748fc4f69de944ff0ae8cb1a59b6194308 (patch)
tree3db353a3c26999d927915047b1b20497347719bf /configure.in
parentModified version number to recut snapshot. (diff)
downloadrtems-cce81a748fc4f69de944ff0ae8cb1a59b6194308.tar.bz2
A patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Here is another patch to hopefully enhance rtems' configuration. Motivation: Try to support other c-compilers besides gcc (I tried to build rtems under Solaris using sun's WSPro c-compiler). Here is a couple of small patches concerning the host compiler configuration, which fix/work-around the worst problems when using sun's WSPro c-compiler. Changes: * Replaced make/compilers/gcc.cfg with make/compilers/gcc.cfg.in, ie. gcc.cfg is generated by configure now. * Removed a line containing a hard-coded "gcc" from gcc.cfg (BUG-fix). * Add -g to host compiler flags only if configure reported -g to work * Add -Wall to host compiler flags only if configure reported that the host compiler is gcc (WSPro's cc chokes on -Wall). * Some modifications to make/Makefile.in * Adapted make/custom/default.cfg to the new location of gcc.cfg BTW, gcc.cfg/gcc.cfg.in seems to be full of unused code (DEBUG-VARIANTS etc.) which deserves to be cleaned up, IMO. IMO, a similar patch should be applied to gcc-target-default.cfg
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 1ee614dedd..d08245faa6 100644
--- a/configure.in
+++ b/configure.in
@@ -240,6 +240,12 @@ case $host_os in
esac
AC_SUBST(GCCSED)
+dnl FIXME: This is a kludge
+dnl Add -Wall if using gcc as host compiler
+test "$ac_cv_prog_gcc" = "yes" && CC_CFLAGS_DEFAULT=-Wall
+dnl Add -g if the host compiler accepts -g, assume -g means debugging
+test "$ac_cv_prog_cc_g" = "yes" && CC_CFLAGS_DEBUG_V=-g
+
dnl check for host library functions
dnl NOTE: must be called after AC_PROG_CC
AC_CHECK_FUNCS(strerror)
@@ -448,6 +454,8 @@ AC_SUBST(BARE_CPU_CFLAGS)
AC_SUBST(BARE_CPU_MODEL)
AC_SUBST(PROJECT_ROOT)
AC_SUBST(program_prefix)
+AC_SUBST(CC_CFLAGS_DEFAULT)
+AC_SUBST(CC_CFLAGS_DEBUG_V)
# pick up all the Makefiles in required parts of the tree
RTEMS_CHECK_MAKEFILE(c/build-tools)
@@ -463,6 +471,7 @@ Makefile
make/host.cfg
make/target.cfg
make/Templates/Makefile.inc
+make/compilers/gcc.cfg
c/Makefile
c/src/Makefile
c/src/exec/Makefile