summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--configure93
-rw-r--r--configure.in9
-rw-r--r--make/Makefile.in63
-rw-r--r--make/compilers/gcc.cfg.in203
-rw-r--r--make/custom/default.cfg2
5 files changed, 295 insertions, 75 deletions
diff --git a/configure b/configure
index 24ed28da49..688d4e03dd 100644
--- a/configure
+++ b/configure
@@ -2667,15 +2667,18 @@ case $host_os in
esac
+test "$ac_cv_prog_gcc" = "yes" && CC_CFLAGS_DEFAULT=-Wall
+test "$ac_cv_prog_cc_g" = "yes" && CC_CFLAGS_DEBUG_V=-g
+
for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2674: checking for $ac_func" >&5
+echo "configure:2677: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2679 "configure"
+#line 2682 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2698,7 +2701,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2727,7 +2730,7 @@ if test "$target_cpu" = "unix" ; then
echo $ac_n "checking whether $RTEMS_HOST supports System V semaphores""... $ac_c" 1>&6
-echo "configure:2731: checking whether $RTEMS_HOST supports System V semaphores" >&5
+echo "configure:2734: checking whether $RTEMS_HOST supports System V semaphores" >&5
if eval "test \"`echo '$''{'rtems_cv_sysv_sem'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2736,7 +2739,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2740 "configure"
+#line 2743 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2762,7 +2765,7 @@ int main () {
}
EOF
-if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
rtems_cv_sysv_sem="yes"
else
@@ -2785,7 +2788,7 @@ echo "$ac_t""$rtems_cv_sysv_sem" 1>&6
echo $ac_n "checking whether $RTEMS_HOST supports System V shared memory""... $ac_c" 1>&6
-echo "configure:2789: checking whether $RTEMS_HOST supports System V shared memory" >&5
+echo "configure:2792: checking whether $RTEMS_HOST supports System V shared memory" >&5
if eval "test \"`echo '$''{'rtems_cv_sysv_shm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2794,7 +2797,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2798 "configure"
+#line 2801 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2810,7 +2813,7 @@ int main () {
}
EOF
-if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
rtems_cv_sysv_shm="yes"
else
@@ -2833,7 +2836,7 @@ echo "$ac_t""$rtems_cv_sysv_shm" 1>&6
echo $ac_n "checking whether $RTEMS_HOST supports System V messages""... $ac_c" 1>&6
-echo "configure:2837: checking whether $RTEMS_HOST supports System V messages" >&5
+echo "configure:2840: checking whether $RTEMS_HOST supports System V messages" >&5
if eval "test \"`echo '$''{'rtems_cv_sysv_msg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2842,7 +2845,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2846 "configure"
+#line 2849 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2858,7 +2861,7 @@ int main () {
}
EOF
-if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
rtems_cv_sysv_msg="yes"
else
@@ -2883,7 +2886,7 @@ fi
# find all the Executive Makefiles
echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6
-echo "configure:2887: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
+echo "configure:2890: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2898,7 +2901,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
-echo "configure:2902: checking for Makefile.in in c/src/exec/rtems" >&5
+echo "configure:2905: checking for Makefile.in in c/src/exec/rtems" >&5
if test -d $srcdir/c/src/exec/rtems; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2913,7 +2916,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
-echo "configure:2917: checking for Makefile.in in c/src/exec/sapi" >&5
+echo "configure:2920: checking for Makefile.in in c/src/exec/sapi" >&5
if test -d $srcdir/c/src/exec/sapi; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2930,7 +2933,7 @@ fi
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6
-echo "configure:2934: checking for Makefile.in in c/src/exec/posix" >&5
+echo "configure:2937: checking for Makefile.in in c/src/exec/posix" >&5
if test -d $srcdir/c/src/exec/posix; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2952,7 +2955,7 @@ if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then
if test -z "$rtems_bsp"; then
echo $ac_n "checking for bsps""... $ac_c" 1>&6
-echo "configure:2956: checking for bsps" >&5
+echo "configure:2959: checking for bsps" >&5
files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
for file in $files; do
case $file in
@@ -3017,7 +3020,7 @@ echo "configure:2956: checking for bsps" >&5
bspdirs="$bspdirs $bspdir"
echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir""... $ac_c" 1>&6
-echo "configure:3021: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir" >&5
+echo "configure:3024: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir" >&5
if test -d $srcdir/c/src/lib/libbsp/$bspcpudir$bspdir; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3032,7 +3035,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared""... $ac_c" 1>&6
-echo "configure:3036: checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared" >&5
+echo "configure:3039: checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared" >&5
if test -d $srcdir/c/src/lib/libbsp/${bspcpudir}shared; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3055,7 +3058,7 @@ fi
# find all the CPU dependent library Makefiles
echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6
-echo "configure:3059: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
+echo "configure:3062: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3072,7 +3075,7 @@ fi
if test "$skip_startfiles" != "yes"; then
echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6
-echo "configure:3076: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
+echo "configure:3079: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
if test -d $srcdir/c/src/lib/start/$target_cpu; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3104,12 +3107,12 @@ fi
# If the TCP/IP stack is enabled, then find all TCP/IP Makefiles
echo $ac_n "checking if networking is enabled? ""... $ac_c" 1>&6
-echo "configure:3108: checking if networking is enabled? " >&5
+echo "configure:3111: checking if networking is enabled? " >&5
echo "$ac_t""$RTEMS_HAS_NETWORKING" 1>&6
if test "$RTEMS_HAS_NETWORKING" = "yes"; then
echo $ac_n "checking for Makefile.in in c/src/lib/libnetworking""... $ac_c" 1>&6
-echo "configure:3113: checking for Makefile.in in c/src/lib/libnetworking" >&5
+echo "configure:3116: checking for Makefile.in in c/src/lib/libnetworking" >&5
if test -d $srcdir/c/src/lib/libnetworking; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3131,7 +3134,7 @@ fi
# If the tests are enabled, then find all the test suite Makefiles
echo $ac_n "checking if the test suites are enabled? ""... $ac_c" 1>&6
-echo "configure:3135: checking if the test suites are enabled? " >&5
+echo "configure:3138: checking if the test suites are enabled? " >&5
tests_enabled=yes
# Check whether --enable-tests or --disable-tests was given.
if test "${enable_tests+set}" = set; then
@@ -3150,7 +3153,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6
-echo "configure:3154: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
+echo "configure:3157: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
if test -d $srcdir/c/src/tests/tools/$target_cpu; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3167,7 +3170,7 @@ fi
if test "$tests_enabled" = "yes"; then
echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6
-echo "configure:3171: checking for Makefile.in in c/src/tests/libtests" >&5
+echo "configure:3174: checking for Makefile.in in c/src/tests/libtests" >&5
if test -d $srcdir/c/src/tests/libtests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3182,7 +3185,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
-echo "configure:3186: checking for Makefile.in in c/src/tests/sptests" >&5
+echo "configure:3189: checking for Makefile.in in c/src/tests/sptests" >&5
if test -d $srcdir/c/src/tests/sptests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3197,7 +3200,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
-echo "configure:3201: checking for Makefile.in in c/src/tests/tmtests" >&5
+echo "configure:3204: checking for Makefile.in in c/src/tests/tmtests" >&5
if test -d $srcdir/c/src/tests/tmtests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3212,7 +3215,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
-echo "configure:3216: checking for Makefile.in in c/src/tests/mptests" >&5
+echo "configure:3219: checking for Makefile.in in c/src/tests/mptests" >&5
if test -d $srcdir/c/src/tests/mptests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3228,7 +3231,7 @@ fi
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6
-echo "configure:3232: checking for Makefile.in in c/src/tests/psxtests" >&5
+echo "configure:3235: checking for Makefile.in in c/src/tests/psxtests" >&5
if test -d $srcdir/c/src/tests/psxtests; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3246,7 +3249,7 @@ fi
# If the HWAPI is enabled, the find the HWAPI Makefiles
echo $ac_n "checking if the HWAPI is enabled? ""... $ac_c" 1>&6
-echo "configure:3250: checking if the HWAPI is enabled? " >&5
+echo "configure:3253: checking if the HWAPI is enabled? " >&5
# Check whether --enable-hwapi or --disable-hwapi was given.
if test "${enable_hwapi+set}" = set; then
enableval="$enable_hwapi"
@@ -3257,7 +3260,7 @@ if test "${enable_hwapi+set}" = set; then
makefiles="$makefiles c/src/lib/libhwapi/Makefile"
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6
-echo "configure:3261: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
+echo "configure:3264: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
if test -d $srcdir/c/src/lib/libhwapi/analog; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3272,7 +3275,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
-echo "configure:3276: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
+echo "configure:3279: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
if test -d $srcdir/c/src/lib/libhwapi/discrete; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3287,7 +3290,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
-echo "configure:3291: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
+echo "configure:3294: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
if test -d $srcdir/c/src/lib/libhwapi/drivers; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3302,7 +3305,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
-echo "configure:3306: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
+echo "configure:3309: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3317,7 +3320,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
-echo "configure:3321: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
+echo "configure:3324: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
if test -d $srcdir/c/src/lib/libhwapi/serial; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3332,7 +3335,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
-echo "configure:3336: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
+echo "configure:3339: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
if test -d $srcdir/c/src/lib/libhwapi/support; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3347,7 +3350,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
-echo "configure:3351: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
+echo "configure:3354: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
if test -d $srcdir/c/src/lib/libhwapi/wrapup; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3389,10 +3392,12 @@ fi
+
+
# pick up all the Makefiles in required parts of the tree
echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6
-echo "configure:3396: checking for Makefile.in in c/build-tools" >&5
+echo "configure:3401: checking for Makefile.in in c/build-tools" >&5
if test -d $srcdir/c/build-tools; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3407,7 +3412,7 @@ fi
echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
-echo "configure:3411: checking for Makefile.in in make" >&5
+echo "configure:3416: checking for Makefile.in in make" >&5
if test -d $srcdir/make; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3422,7 +3427,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
-echo "configure:3426: checking for Makefile.in in c/src/lib/libmisc" >&5
+echo "configure:3431: checking for Makefile.in in c/src/lib/libmisc" >&5
if test -d $srcdir/c/src/lib/libmisc; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3437,7 +3442,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
-echo "configure:3441: checking for Makefile.in in c/src/tests/samples" >&5
+echo "configure:3446: checking for Makefile.in in c/src/tests/samples" >&5
if test -d $srcdir/c/src/tests/samples; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -3559,6 +3564,7 @@ trap 'rm -fr `echo "Makefile
make/host.cfg
make/target.cfg
make/Templates/Makefile.inc
+make/compilers/gcc.cfg
c/Makefile
c/src/Makefile
c/src/exec/Makefile
@@ -3676,6 +3682,8 @@ s%@BARE_CPU_CFLAGS@%$BARE_CPU_CFLAGS%g
s%@BARE_CPU_MODEL@%$BARE_CPU_MODEL%g
s%@PROJECT_ROOT@%$PROJECT_ROOT%g
s%@program_prefix@%$program_prefix%g
+s%@CC_CFLAGS_DEFAULT@%$CC_CFLAGS_DEFAULT%g
+s%@CC_CFLAGS_DEBUG_V@%$CC_CFLAGS_DEBUG_V%g
CEOF
EOF
@@ -3721,6 +3729,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
make/host.cfg
make/target.cfg
make/Templates/Makefile.inc
+make/compilers/gcc.cfg
c/Makefile
c/src/Makefile
c/src/exec/Makefile
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
diff --git a/make/Makefile.in b/make/Makefile.in
index 7b281a3bbf..6f504d7eee 100644
--- a/make/Makefile.in
+++ b/make/Makefile.in
@@ -58,35 +58,34 @@ get: retrieve
all:
$(prefix)/rtems:
- -$(MKDIR) $(prefix)
- -$(MKDIR) $(prefix)/rtems
-
-install: install_files $(prefix)/rtems
-
-install_files:: $(GENERIC_FILES) $(MAKEFILES)
- @test -d $(prefix)/rtems/make || \
- $(MKDIR) $(prefix)/rtems/make
- for f in $^; do \
- $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make ;\
- done
-
-install_files:: $(COMPILER_FILES)
- @test -d $(prefix)/rtems/make/compilers || \
- $(MKDIR) $(prefix)/rtems/make/compilers
- for f in $^; do \
- $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/compilers; \
- done
-
-install_files:: $(CUSTOM_FILES)
- @test -d $(prefix)/rtems/make/custom || \
- $(MKDIR) $(prefix)/rtems/make/custom
- for f in $^; do \
- $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/custom; \
- done
-
-install_files:: $(TEMPLATE_FILES)
- @test -d $(prefix)/rtems/make/Templates || \
- $(MKDIR) $(prefix)/rtems/make/Templates
- for f in $^; do \
- $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/Templates; \
- done
+ @INSTALL@ $(INSTDIRFLAGS) $@
+
+install: $(prefix)/rtems install_files
+
+$(prefix)/rtems/make:
+ @INSTALL@ $(INSTDIRFLAGS) $@
+
+install_files:: $(GENERIC_FILES) $(MAKEFILES) $(prefix)/rtems/make
+ @INSTALL@ $(INSTDATAFLAGS) $(GENERIC_FILES) $(MAKEFILES) \
+ $(prefix)/rtems/make
+
+$(prefix)/rtems/make/compilers:
+ @INSTALL@ $(INSTDIRFLAGS) $@
+
+install_files:: $(COMPILER_FILES) $(prefix)/rtems/make/compilers
+ @INSTALL@ $(INSTDATAFLAGS) $(COMPILER_FILES) \
+ $(prefix)/rtems/make/compilers
+
+$(prefix)/rtems/make/custom:
+ @INSTALL@ $(INSTDIRFLAGS) $@
+
+install_files:: $(CUSTOM_FILES) $(prefix)/rtems/make/custom
+ @INSTALL@ $(INSTDATAFLAGS) $(CUSTOM_FILES) \
+ $(prefix)/rtems/make/custom
+
+$(prefix)/rtems/make/Templates:
+ @INSTALL@ $(INSTDIRFLAGS) $@
+
+install_files:: $(TEMPLATE_FILES) $(prefix)/rtems/make/Templates
+ @INSTALL@ $(INSTDATAFLAGS) $(TEMPLATE_FILES) \
+ $(prefix)/rtems/make/Templates
diff --git a/make/compilers/gcc.cfg.in b/make/compilers/gcc.cfg.in
new file mode 100644
index 0000000000..df4c11cb8c
--- /dev/null
+++ b/make/compilers/gcc.cfg.in
@@ -0,0 +1,203 @@
+#
+# $Id$
+#
+# gcc 2.6.x native compiler
+# Compiler (and tools) configuration
+#
+
+# Additional target names (other than debug, profile)
+TARGET_VARIANTS +=
+
+#
+# Pre-processor defines.
+# Local tailoring (on the command line) can be done by setting XCPPFLAGS
+# which is never set in the Makefile's
+#
+
+CPPFLAGS=$(XCPPFLAGS) $(DEFINES)
+
+#
+# Local tailoring (on the command line) can be done by setting CFLAGS
+# which is never set in the Makefile's
+#
+
+#
+# CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CFLAGS_PROFILE_V are the values we
+# would want the corresponding macros to be set to.
+#
+# CFLAGS_OPTIMIZE, CFLAGS_DEBUG, CFLAGS_PROFILE are set in the leaf
+# Makefiles by the 'debug:' and 'profile:' targets to their _V values.
+#
+
+# default flags
+
+CFLAGS_DEFAULT = @CC_CFLAGS_DEFAULT@
+
+# Under MS-DOS do not use pipes
+# It turns out the pipes don't work with some non-gas assemblers either. :(
+# ifneq ($(RTEMS_HOST),msdos)
+# # CFLAGS_DEFAULT += -pipe
+# CFLAGS_DEFAULT +=
+# endif
+
+# Additional target names (other than debug, profile)
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O
+
+# debug flag; typically -g
+CFLAGS_DEBUG_V=@CC_CFLAGS_DEBUG_V@
+
+# when debugging, optimize flag: typically empty
+# some compilers do allow optimization with their "-g"
+CFLAGS_DEBUG_OPTIMIZE_V=
+
+# profile flag; use gprof(1)
+CFLAGS_PROFILE_V=-pg
+
+# default is to optimize
+CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
+
+# dynamic libraries
+CFLAGS_DYNAMIC_V=-fpic
+ASFLAGS_DYNAMIC_V=
+
+# XCFLAGS are now local flags to avoid conflict with cygnus configure
+XCFLAGS=$(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE) \
+ $(CFLAGS_DEFAULT)
+
+# List of library paths without -L
+LD_PATHS=
+
+# libraries you want EVERYONE to link with
+LD_LIBS=
+
+# ld flag to ensure pure-text
+LDFLAGS_MUST_BE_PURE_V =
+
+# ld flag for [un]shared objects
+LDFLAGS_STATIC_LIBRARIES_V =
+LDFLAGS_SHARED_LIBRARIES_V =
+
+# ld flag for incomplete link
+LDFLAGS_INCOMPLETE = -r
+
+# Special linker options when building lib.so
+LDFLAGS_DYNAMIC_V = ??
+
+# Some dynamic linking systems want the preferred name recorded in the binary
+# ref: src/libxil/Makefile
+LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
+
+# ld flags for profiling, debugging
+LDFLAGS_PROFILE_V =
+LDFLAGS_DEBUG_V =
+
+LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
+
+#
+# Stuff to clean and clobber for the compiler and its tools
+#
+
+CLEAN_CC = a.out *.o *.BAK
+CLOBBER_CC =
+
+#
+# Client compiler and support tools
+#
+
+# CC_FOR_BUILD=gcc -O
+# override CC=$(CC_FOR_BUILD)
+
+CC=@CC@
+
+# CPP command to write file to standard output
+CPP=$(CC) -E
+
+# flags set by cc when running cpp
+CPP_CC_FLAGS=-D__STDC__
+
+# egrep regexp to ignore symbol table entries in ar archives.
+# Only used to make sure we skip them when coalescing libraries.
+# skip __.SYMDEF and empty names (maybe bug in ranlib??).
+AR_SYMBOL_TABLE="HIGHLY-UNLIKELY-TO-CONFLICT"
+ARFLAGS=ruv
+
+#
+# Command to convert a normal archive to one searchable by $(LD)
+# Not needed on SVR4
+# FIXME: Should be handled by autoconf. Doesn't matter, because
+# rtems doesn't have any host-libraries until now.
+#
+
+MKLIB=echo library is complete:
+
+#
+# How to compile stuff into ${ARCH} subdirectory
+#
+# NOTE: we override COMPILE.c
+#
+
+COMPILE.c=$(CC) $(CFLAGS) $(CPPFLAGS) $(XCFLAGS) -c
+
+${ARCH}/%.o: %.c
+ ${COMPILE.c} -o $@ $<
+
+${ARCH}/%.o: %.cc
+ ${COMPILE.c} -o $@ $<
+
+# assembly runs gasp
+${ARCH}/%.o: %.s
+ $(CPP) ${CPPFLAGS} $< | $(SED) 's/% /%/g' | $(SED) 's/^#.*//' >$(ARCH)/$*.i
+ $(AS) -o $@ $(ARCH)/$*.i
+ $(RM) $(ARCH)/$*.i
+
+# Link host applications.
+define make-exe
+ ${CC} ${LDFLAGS} -o $@ $^ ${LD_LIBS}
+endef
+
+# Specify our own default rule for this to prevent having CFLAGS and
+# CPPFLAGS being passed to linker
+#
+# NOTE: This rule is only used as fallback for host-tool makefiles
+# which don't provide their own rule
+${ARCH}/%$(EXEEXT): ${ARCH}/%.o
+ $(make-exe)
+
+# create $(ARCH)/pgm from pgm.sh
+${ARCH}/%: %.sh
+ $(RM) $@
+ $(CP) $< $@
+ $(CHMOD) +x $@
+
+# Dependency files for use by gmake
+# NOTE: we don't put in $(TARGET_ARCH)
+# so that 'make clean' doesn't blow it away
+
+DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+
+CLEAN_DEPEND=$(DEPEND).tmp
+CLOBBER_DEPEND=$(DEPEND)
+
+# We deliberately don't have anything depend on the
+# $(DEPEND) file; otherwise it will get rebuilt even
+# on 'make clean'
+#
+
+depend: $(C_FILES) $(CC_FILES) $(S_FILES)
+ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
+# Use gcc -M to generate dependencies
+# Replace foo.o with $(ARCH)/foo.o
+# Replace $(ARCH) value with string $(ARCH)
+# so that it will for debug and profile cases
+ $(COMPILE.c) -M $^ | \
+ $(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
+ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
+ $(MV) $(DEPEND).tmp $(DEPEND)
+endif
+
+define make-rel
+ $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $(OBJS)
+endef
diff --git a/make/custom/default.cfg b/make/custom/default.cfg
index e96c1e21fa..afa1779f3d 100644
--- a/make/custom/default.cfg
+++ b/make/custom/default.cfg
@@ -31,7 +31,7 @@ endif
# HOST Compiler config file
# You may also want to specify where the compiler resides here.
-CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+CONFIG.$(HOST_ARCH).CC = $(PROJECT_ROOT)/make/compilers/gcc.cfg
## Target compiler config file, if any
CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg