summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in9
-rw-r--r--aclocal.m4202
-rw-r--r--aclocal/ar-s.m421
-rw-r--r--aclocal/canonicalize-tools.m4107
-rw-r--r--aclocal/cygwin.m418
-rw-r--r--aclocal/exeext.m435
-rw-r--r--aclocal/gcc-pipe.m46
-rw-r--r--aclocal/gcc-specs.m414
-rw-r--r--c/PROBLEMS6
-rw-r--r--c/build-tools/scripts/Makefile.in4
-rw-r--r--c/build-tools/src/Makefile.in7
-rw-r--r--c/src/exec/score/tools/generic/size_rtems.in2
-rw-r--r--c/src/lib/libbsp/i386/pc386/tools/bin2boot.c4
-rw-r--r--c/src/lib/libbsp/m68k/idp/console/console.c12
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/console/console.c10
-rw-r--r--c/src/lib/wrapup/Makefile.in50
-rw-r--r--c/src/make/README5
-rw-r--r--c/src/make/compilers/gcc-target-default.cfg70
-rw-r--r--c/src/make/host.cfg.in5
-rw-r--r--c/src/wrapup/Makefile.in50
-rw-r--r--configure642
-rw-r--r--configure.in12
-rw-r--r--make/README5
-rw-r--r--make/compilers/gcc-no_bsp.cfg2
-rw-r--r--make/compilers/gcc-portsw.cfg2
-rw-r--r--make/compilers/gcc-target-default.cfg70
-rw-r--r--make/custom/FreeBSD-posix.cfg15
-rw-r--r--make/custom/HPUX9-posix.cfg11
-rw-r--r--make/custom/Linux-posix.cfg16
-rw-r--r--make/custom/Solaris-posix.cfg13
-rw-r--r--make/custom/bare.cfg3
-rw-r--r--make/custom/cvme961.cfg3
-rw-r--r--make/custom/dmv152.cfg3
-rw-r--r--make/custom/efi332.cfg3
-rw-r--r--make/custom/efi68k.cfg3
-rw-r--r--make/custom/erc32.cfg3
-rw-r--r--make/custom/force386.cfg3
-rw-r--r--make/custom/gen68302.cfg3
-rw-r--r--make/custom/gen68360.cfg3
-rw-r--r--make/custom/gensh1.cfg14
-rw-r--r--make/custom/go32.cfg7
-rw-r--r--make/custom/i386ex.cfg3
-rw-r--r--make/custom/idp.cfg3
-rw-r--r--make/custom/mvme136.cfg3
-rw-r--r--make/custom/mvme147.cfg3
-rw-r--r--make/custom/mvme162.cfg12
-rw-r--r--make/custom/no_bsp.cfg25
-rw-r--r--make/custom/ods68302.cfg8
-rw-r--r--make/custom/p4000.cfg5
-rw-r--r--make/custom/p4600.cfg9
-rw-r--r--make/custom/p4650.cfg14
-rw-r--r--make/custom/papyrus.cfg3
-rw-r--r--make/custom/pc386.cfg3
-rw-r--r--make/custom/psim.cfg11
-rw-r--r--make/custom/simhppa.cfg3
-rw-r--r--make/host.cfg.in5
-rw-r--r--make/target.cfg.in28
-rw-r--r--tools/build/scripts/Makefile.in4
-rw-r--r--tools/build/src/Makefile.in7
-rw-r--r--tools/cpu/generic/size_rtems.in2
60 files changed, 1196 insertions, 428 deletions
diff --git a/Makefile.in b/Makefile.in
index 95d3c28ffb..ab929bea06 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -37,8 +37,10 @@ MTARGETS = all install $(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_all) \
EXIT_CMD = exit 1
-# Don't pass flags from previous make - especially NOT CFLAGS
-override MAKEFLAGS=
+# Don't pass flags from previous make - especially NOT CFLAGS
+# NOTE: Previous versions overrode MAKEFLAGS, but this also disables
+# a lot of useful features
+# override MAKEFLAGS=
$(MTARGETS):
BASEDIR=`pwd`; \
@@ -55,9 +57,10 @@ $(MTARGETS):
ACLOCAL = aclocal -I aclocal
AUTOCONF = autoconf
+ACLOCAL_FILES := $(wildcard $(srcdir)/aclocal/*.m4)
ACLOCAL_M4 = aclocal.m4
-$(ACLOCAL_M4): configure.in
+$(ACLOCAL_M4): configure.in $(ACLOCAL_FILES)
-cd $(RTEMS_ROOT) && $(ACLOCAL)
Makefile: Makefile.in config.status
diff --git a/aclocal.m4 b/aclocal.m4
index 3329007592..5ca10a3f01 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -151,12 +151,14 @@ dnl
AC_DEFUN(RTEMS_GCC_SPECS,
[AC_REQUIRE([RTEMS_PROG_CC])
AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
-[touch confspec
-echo 'void f(){}' >conftest.c
-if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
- rtems_cv_gcc_specs=yes
-else
- rtems_cv_gcc_specs=no
+[
+rtems_cv_gcc_specs=no
+if test "$rtems_cv_prog_gcc" = "yes"; then
+ touch confspec
+ echo 'void f(){}' >conftest.c
+ if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
+ rtems_cv_gcc_specs=yes
+ fi
fi
rm -f confspec conftest*
])])
@@ -174,20 +176,20 @@ AC_DEFUN(RTEMS_GCC_PIPE,
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
[
+rtems_cv_gcc_pipe=no
+if test "$rtems_cv_prog_gcc" = "yes"; then
case "$host_os" in
cygwin32*)
- rtems_cv_gcc_pipe=no
;;
*)
echo 'void f(){}' >conftest.c
if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
rtems_cv_gcc_pipe=yes
- else
- rtems_cv_gcc_pipe=no
fi
rm -f conftest*
;;
esac
+fi
])
])
@@ -261,40 +263,174 @@ dnl $Id$
dnl
dnl Set target tools
dnl
+dnl 98/06/23 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
+dnl fixing cache/environment variable handling
+dnl adding checks for cygwin/egcs '\\'-bug
+dnl adding checks for ranlib/ar -s problem
+dnl
dnl 98/02/12 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
dnl
+AC_DEFUN(RTEMS_GCC_PRINT,
+[ case $host_os in
+ *cygwin32*)
+ dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
+ dnl Should be removed once cygwin/egcs reports '/' only
+ $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ $1=`$CC_FOR_TARGET --print-prog-name=$2`
+ ;;
+ esac
+])
+
+AC_DEFUN(RTEMS_PATH_TOOL,
+[
+AC_MSG_CHECKING([target's $2])
+AC_CACHE_VAL(ac_cv_path_$1,:)
+AC_MSG_RESULT([$ac_cv_path_$1])
+
+if test -n "$ac_cv_path_$1"; then
+ dnl retrieve the value from the cache
+ $1=$ac_cv_path_$1
+else
+ dnl the cache was not set
+ if test -z "[$]$1" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ RTEMS_GCC_PRINT($1,$2)
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
+ case "[$]$1" in
+ /*) # valid
+ AC_MSG_RESULT("yes")
+ ;;
+ *) # invalid for AC_PATH_PROG
+ AC_MSG_RESULT("no")
+ AC_MSG_ERROR([***]
+ [Environment variable $1 should ether]
+ [be unset (preferred) or contain an absolute path])
+ ;;
+ esac
+ fi
+
+ AC_PATH_PROG($1,"$program_prefix"$2,$3)
+fi
+])
+
AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
[AC_REQUIRE([RTEMS_PROG_CC])dnl
-if test "$rtems_cv_prog_gcc" = "yes" ; then
- dnl We are using gcc, now ask it about its tools
- dnl Necessary if gcc was configured to use the target's native tools
- dnl or uses prefixes for gnutools (e.g. gas instead of as)
- AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
- AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
- LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
- NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
- RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
+
+dnl FIXME: What shall be done if these tools are not available?
+ RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
+ RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
+ RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
+ RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
+
+dnl special treatment of ranlib
+ RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
+ if test "$RANLIB_FOR_TARGET" = "no"; then
+ # ranlib wasn't found; check if ar -s is available
+ RTEMS_AR_FOR_TARGET_S
+ if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
+ dnl override RANLIB_FOR_TARGET's cache
+ ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
+ RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
+ else
+ AC_MSG_ERROR([***]
+ [Can't figure out how to build a library index]
+ [Nether ranlib nor ar -s seem to be available] )
+ fi
+ fi
+
+dnl NOTE: These may not be available if not using gnutools
+ RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
+ RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
+])
+
+AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
+[
+AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
+rtems_cv_AR_FOR_TARGET_S,
+[
+cat > conftest.$ac_ext <<EOF
+int foo( int b )
+{ return b; }
+EOF
+if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
+ && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
+ && test -s conftest.a ; \
+then
+ rtems_cv_AR_FOR_TARGET_S="yes"
+else
+ rtems_cv_AR_FOR_TARGET_S="no"
fi
+ rm -f conftest*
+])
+])
-dnl check whether the tools exist
-dnl FIXME: What shall be done if they don't exist?
-dnl FIXME: This may fail if the compiler has not been recognized as gcc
-dnl and uses tools with different names
-AC_PATH_PROG(AR_FOR_TARGET,"$program_prefix"ar,no)
-AC_PATH_PROG(AS_FOR_TARGET,"$program_prefix"as,no)
-AC_PATH_PROG(NM_FOR_TARGET,"$program_prefix"nm,no)
-AC_PATH_PROG(LD_FOR_TARGET,"$program_prefix"ld,no)
+dnl Detect the Cygwin32 environment (unix under Win32)
+dnl
+dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
+dnl Hacked from automake-1.3
-dnl NOTE: This is doubtful, but should not disturb all current rtems'
-dnl targets (remark: solaris fakes ranlib!!)
-AC_PATH_PROG(RANLIB_FOR_TARGET,"$program_prefix"ranlib,no)
+# Check to see if we're running under Cygwin32, without using
+# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
+# Otherwise set it to "no".
+
+dnl RTEMS_CYGWIN32()
+AC_DEFUN(RTEMS_CYGWIN32,
+[AC_CACHE_CHECK(for Cygwin32 environment, rtems_cv_cygwin32,
+[AC_TRY_COMPILE(,[return __CYGWIN32__;],
+rtems_cv_cygwin32=yes, rtems_cv_cygwin32=no)
+rm -f conftest*])
+CYGWIN32=
+test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes])
+
+
+dnl Set the EXE extension
+dnl
+dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
+dnl Hacked from automake-1.3
+
+# Check to see if we're running under Win32, without using
+# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
+# Otherwise set it to "".
+
+dnl RTEMS_EXEEXT()
+dnl This knows we add .exe if we're building in the Cygwin32
+dnl environment. But if we're not, then it compiles a test program
+dnl to see if there is a suffix for executables.
+AC_DEFUN(RTEMS_EXEEXT,
+[AC_REQUIRE([RTEMS_CYGWIN32])
+AC_MSG_CHECKING([for executable suffix])
+AC_CACHE_VAL(rtems_cv_exeext,
+[if test "$CYGWIN32" = yes; then
+rtems_cv_exeext=.exe
+else
+cat > rtems_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
+rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
+rm -f rtems_c_test*])
+test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
+fi
+EXEEXT=""
+test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
+AC_MSG_RESULT(${rtems_cv_exeext})
+AC_SUBST(EXEEXT)])
-dnl NOTE: These may not be available, if not using gnutools
-AC_PATH_PROG(OBJCOPY_FOR_TARGET,"$program_prefix"objcopy,no)
-AC_PATH_PROG(SIZE_FOR_TARGET,"$program_prefix"size,no)
-])
dnl $Id$
diff --git a/aclocal/ar-s.m4 b/aclocal/ar-s.m4
new file mode 100644
index 0000000000..ecff77718c
--- /dev/null
+++ b/aclocal/ar-s.m4
@@ -0,0 +1,21 @@
+AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
+[
+AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
+rtems_cv_AR_FOR_TARGET_S,
+[
+cat > conftest.$ac_ext <<EOF
+int foo( int b )
+{ return b; }
+EOF
+if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
+ && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
+ && test -s conftest.a ; \
+then
+ rtems_cv_AR_FOR_TARGET_S="yes"
+else
+ rtems_cv_AR_FOR_TARGET_S="no"
+fi
+ rm -f conftest*
+])
+])
+
diff --git a/aclocal/canonicalize-tools.m4 b/aclocal/canonicalize-tools.m4
index 1689d315ca..7875b3f8dd 100644
--- a/aclocal/canonicalize-tools.m4
+++ b/aclocal/canonicalize-tools.m4
@@ -2,37 +2,94 @@ dnl $Id$
dnl
dnl Set target tools
dnl
+dnl 98/06/23 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
+dnl fixing cache/environment variable handling
+dnl adding checks for cygwin/egcs '\\'-bug
+dnl adding checks for ranlib/ar -s problem
+dnl
dnl 98/02/12 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
dnl
-AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
-[AC_REQUIRE([RTEMS_PROG_CC])dnl
-if test "$rtems_cv_prog_gcc" = "yes" ; then
- dnl We are using gcc, now ask it about its tools
- dnl Necessary if gcc was configured to use the target's native tools
- dnl or uses prefixes for gnutools (e.g. gas instead of as)
- AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
- AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
- LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
- NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
- RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
+AC_DEFUN(RTEMS_GCC_PRINT,
+[ case $host_os in
+ *cygwin32*)
+ dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
+ dnl Should be removed once cygwin/egcs reports '/' only
+ $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ $1=`$CC_FOR_TARGET --print-prog-name=$2`
+ ;;
+ esac
+])
+
+AC_DEFUN(RTEMS_PATH_TOOL,
+[
+AC_MSG_CHECKING([target's $2])
+AC_CACHE_VAL(ac_cv_path_$1,:)
+AC_MSG_RESULT([$ac_cv_path_$1])
+
+if test -n "$ac_cv_path_$1"; then
+ dnl retrieve the value from the cache
+ $1=$ac_cv_path_$1
+else
+ dnl the cache was not set
+ if test -z "[$]$1" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ RTEMS_GCC_PRINT($1,$2)
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
+ case "[$]$1" in
+ /*) # valid
+ AC_MSG_RESULT("yes")
+ ;;
+ *) # invalid for AC_PATH_PROG
+ AC_MSG_RESULT("no")
+ AC_MSG_ERROR([***]
+ [Environment variable $1 should ether]
+ [be unset (preferred) or contain an absolute path])
+ ;;
+ esac
+ fi
+
+ AC_PATH_PROG($1,"$program_prefix"$2,$3)
fi
+])
-dnl check whether the tools exist
-dnl FIXME: What shall be done if they don't exist?
+AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
+[AC_REQUIRE([RTEMS_PROG_CC])dnl
-dnl FIXME: This may fail if the compiler has not been recognized as gcc
-dnl and uses tools with different names
-AC_PATH_PROG(AR_FOR_TARGET,"$program_prefix"ar,no)
-AC_PATH_PROG(AS_FOR_TARGET,"$program_prefix"as,no)
-AC_PATH_PROG(NM_FOR_TARGET,"$program_prefix"nm,no)
-AC_PATH_PROG(LD_FOR_TARGET,"$program_prefix"ld,no)
+dnl FIXME: What shall be done if these tools are not available?
+ RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
+ RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
+ RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
+ RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
-dnl NOTE: This is doubtful, but should not disturb all current rtems'
-dnl targets (remark: solaris fakes ranlib!!)
-AC_PATH_PROG(RANLIB_FOR_TARGET,"$program_prefix"ranlib,no)
+dnl special treatment of ranlib
+ RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
+ if test "$RANLIB_FOR_TARGET" = "no"; then
+ # ranlib wasn't found; check if ar -s is available
+ RTEMS_AR_FOR_TARGET_S
+ if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
+ dnl override RANLIB_FOR_TARGET's cache
+ ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
+ RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
+ else
+ AC_MSG_ERROR([***]
+ [Can't figure out how to build a library index]
+ [Nether ranlib nor ar -s seem to be available] )
+ fi
+ fi
-dnl NOTE: These may not be available, if not using gnutools
-AC_PATH_PROG(OBJCOPY_FOR_TARGET,"$program_prefix"objcopy,no)
-AC_PATH_PROG(SIZE_FOR_TARGET,"$program_prefix"size,no)
+dnl NOTE: These may not be available if not using gnutools
+ RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
+ RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
])
diff --git a/aclocal/cygwin.m4 b/aclocal/cygwin.m4
new file mode 100644
index 0000000000..2f988155c6
--- /dev/null
+++ b/aclocal/cygwin.m4
@@ -0,0 +1,18 @@
+dnl Detect the Cygwin32 environment (unix under Win32)
+dnl
+dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
+dnl Hacked from automake-1.3
+
+# Check to see if we're running under Cygwin32, without using
+# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
+# Otherwise set it to "no".
+
+dnl RTEMS_CYGWIN32()
+AC_DEFUN(RTEMS_CYGWIN32,
+[AC_CACHE_CHECK(for Cygwin32 environment, rtems_cv_cygwin32,
+[AC_TRY_COMPILE(,[return __CYGWIN32__;],
+rtems_cv_cygwin32=yes, rtems_cv_cygwin32=no)
+rm -f conftest*])
+CYGWIN32=
+test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes])
+
diff --git a/aclocal/exeext.m4 b/aclocal/exeext.m4
new file mode 100644
index 0000000000..f922511a76
--- /dev/null
+++ b/aclocal/exeext.m4
@@ -0,0 +1,35 @@
+dnl Set the EXE extension
+dnl
+dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
+dnl Hacked from automake-1.3
+
+# Check to see if we're running under Win32, without using
+# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
+# Otherwise set it to "".
+
+dnl RTEMS_EXEEXT()
+dnl This knows we add .exe if we're building in the Cygwin32
+dnl environment. But if we're not, then it compiles a test program
+dnl to see if there is a suffix for executables.
+AC_DEFUN(RTEMS_EXEEXT,
+[AC_REQUIRE([RTEMS_CYGWIN32])
+AC_MSG_CHECKING([for executable suffix])
+AC_CACHE_VAL(rtems_cv_exeext,
+[if test "$CYGWIN32" = yes; then
+rtems_cv_exeext=.exe
+else
+cat > rtems_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
+rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
+rm -f rtems_c_test*])
+test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
+fi
+EXEEXT=""
+test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
+AC_MSG_RESULT(${rtems_cv_exeext})
+AC_SUBST(EXEEXT)])
+
diff --git a/aclocal/gcc-pipe.m4 b/aclocal/gcc-pipe.m4
index b4fb528338..1e5b52be50 100644
--- a/aclocal/gcc-pipe.m4
+++ b/aclocal/gcc-pipe.m4
@@ -11,19 +11,19 @@ AC_DEFUN(RTEMS_GCC_PIPE,
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
[
+rtems_cv_gcc_pipe=no
+if test "$rtems_cv_prog_gcc" = "yes"; then
case "$host_os" in
cygwin32*)
- rtems_cv_gcc_pipe=no
;;
*)
echo 'void f(){}' >conftest.c
if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
rtems_cv_gcc_pipe=yes
- else
- rtems_cv_gcc_pipe=no
fi
rm -f conftest*
;;
esac
+fi
])
])
diff --git a/aclocal/gcc-specs.m4 b/aclocal/gcc-specs.m4
index 017ca40745..a422717d8a 100644
--- a/aclocal/gcc-specs.m4
+++ b/aclocal/gcc-specs.m4
@@ -9,12 +9,14 @@ dnl
AC_DEFUN(RTEMS_GCC_SPECS,
[AC_REQUIRE([RTEMS_PROG_CC])
AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
-[touch confspec
-echo 'void f(){}' >conftest.c
-if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
- rtems_cv_gcc_specs=yes
-else
- rtems_cv_gcc_specs=no
+[
+rtems_cv_gcc_specs=no
+if test "$rtems_cv_prog_gcc" = "yes"; then
+ touch confspec
+ echo 'void f(){}' >conftest.c
+ if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
+ rtems_cv_gcc_specs=yes
+ fi
fi
rm -f confspec conftest*
])])
diff --git a/c/PROBLEMS b/c/PROBLEMS
index 90829d2a59..571a0af5f7 100644
--- a/c/PROBLEMS
+++ b/c/PROBLEMS
@@ -50,3 +50,9 @@ This is the list of outstanding problems in this release.
milliseconds. This only applies to clock drivers which generate
an ISR each millisecond and only call rtems_clock_tick every
so many ISRs.
+
++ Cross-check configure --enable-* flags.
+ + warn/refuse to configure when --enable-libcdir and
+ --enable-gcc28 are given.
+ + force --enable-libcdir when --disable-gcc28 is given
+
diff --git a/c/build-tools/scripts/Makefile.in b/c/build-tools/scripts/Makefile.in
index db02f4736c..1cecfcc2cb 100644
--- a/c/build-tools/scripts/Makefile.in
+++ b/c/build-tools/scripts/Makefile.in
@@ -17,8 +17,8 @@ include $(RTEMS_ROOT)/make/leaf.cfg
DESTDIR=$(PROJECT_RELEASE)/build-tools
-PGMS=install-if-change rcs-clean lock-directory unlock-directory rtems-glom search-id.sh
-
+PGMS=install-if-change rcs-clean lock-directory unlock-directory \
+ search-id.sh
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
diff --git a/c/build-tools/src/Makefile.in b/c/build-tools/src/Makefile.in
index 2dd240f761..d1cfe1a519 100644
--- a/c/build-tools/src/Makefile.in
+++ b/c/build-tools/src/Makefile.in
@@ -11,6 +11,10 @@ includedir = @includedir@
manext = 1
mandir = @mandir@/man$(manext)
+# FIXME: $EXEEXT should be set in a central cfg-file used for native
+# compiling (e.g. gcc.cfg) instead of setting EXEEXE here.
+EXEEXT=@EXEEXT@
+
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
@@ -28,7 +32,8 @@ H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-PGMS=$(ARCH)/cklength $(ARCH)/eolstrip $(ARCH)/packhex $(ARCH)/unhex
+PGMS=$(ARCH)/cklength$(EXEEXT) $(ARCH)/eolstrip$(EXEEXT) \
+ $(ARCH)/packhex$(EXEEXT) $(ARCH)/unhex$(EXEEXT)
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/leaf.cfg
diff --git a/c/src/exec/score/tools/generic/size_rtems.in b/c/src/exec/score/tools/generic/size_rtems.in
index e3dde44a81..72c96e842c 100644
--- a/c/src/exec/score/tools/generic/size_rtems.in
+++ b/c/src/exec/score/tools/generic/size_rtems.in
@@ -1,4 +1,4 @@
-#!KSHELL -p
+#!@KSH@ -p
#
# size_rtems
#
diff --git a/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c b/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c
index 7818f66266..d8d19b4166 100644
--- a/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c
+++ b/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c
@@ -67,12 +67,12 @@ getNumArg(char *arg)
{
char *dummy;
- if (arg[0] == '0')
+ if (arg[0] == '0') {
if ((arg[1] == 'x') || (arg[1] == 'X')) /* Hexadecimal */
return (DWord)strtol(arg, &dummy, 16);
else /* Octal */
return (DWord)strtol(arg, &dummy, 8);
- else /* Decimal */
+ } else /* Decimal */
return (DWord)strtol(arg, &dummy, 10);
} /* getNumArg */
diff --git a/c/src/lib/libbsp/m68k/idp/console/console.c b/c/src/lib/libbsp/m68k/idp/console/console.c
index 90d21ece5f..3e67d70e61 100644
--- a/c/src/lib/libbsp/m68k/idp/console/console.c
+++ b/c/src/lib/libbsp/m68k/idp/console/console.c
@@ -16,7 +16,7 @@
#include <ringbuf.h>
-Ring_buffer_t Buffer[ 2 ];
+Ring_buffer_t Console_Buffer[ 2 ];
rtems_isr C_Receive_ISR(rtems_vector_number vector);
@@ -39,8 +39,8 @@ rtems_device_driver console_initialize(
{
rtems_status_code status;
- Ring_buffer_Initialize( &Buffer[ 0 ] );
- Ring_buffer_Initialize( &Buffer[ 1 ] );
+ Ring_buffer_Initialize( &Console_Buffer[ 0 ] );
+ Ring_buffer_Initialize( &Console_Buffer[ 1 ] );
init_pit();
@@ -91,10 +91,10 @@ rtems_boolean is_character_ready(
int port
)
{
- if ( Ring_buffer_Is_empty( &Buffer[ port ] ) )
+ if ( Ring_buffer_Is_empty( &Console_Buffer[ port ] ) )
return FALSE;
- Ring_buffer_Remove_character( &Buffer[ port ], *ch );
+ Ring_buffer_Remove_character( &Console_Buffer[ port ], *ch );
return TRUE;
}
@@ -114,7 +114,7 @@ rtems_boolean quick_char_check(
int port
)
{
- if ( Ring_buffer_Is_empty( &Buffer[ port ] ) )
+ if ( Ring_buffer_Is_empty( &Console_Buffer[ port ] ) )
return FALSE;
return TRUE;
diff --git a/c/src/lib/libbsp/m68k/mvme162/console/console.c b/c/src/lib/libbsp/m68k/mvme162/console/console.c
index a639df941d..ab700fe613 100644
--- a/c/src/lib/libbsp/m68k/mvme162/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme162/console/console.c
@@ -25,7 +25,7 @@
#include <rtems/libio.h>
#include <ringbuf.h>
-Ring_buffer_t Buffer[2];
+Ring_buffer_t Console_Buffer[2];
/*
* Interrupt handler for receiver interrupts
@@ -43,7 +43,7 @@ rtems_isr C_Receive_ISR(rtems_vector_number vector)
else if (ipend == 0x20) port = 1; /* channel A intr pending */
else return;
- Ring_buffer_Add_character(&Buffer[port], ZREADD(port));
+ Ring_buffer_Add_character(&Console_Buffer[port], ZREADD(port));
if (ZREAD(port, 1) & 0x70) { /* check error stat */
ZWRITE0(port, 0x30); /* reset error */
@@ -64,7 +64,7 @@ rtems_device_driver console_initialize(
*/
for (i = 0; i <= 1; i++) {
- Ring_buffer_Initialize( &Buffer[i] );
+ Ring_buffer_Initialize( &Console_Buffer[i] );
ZWRITE(i, 2, SCC_VECTOR);
ZWRITE(i, 10, 0);
ZWRITE(i, 1, 0x10); /* int on all Rx chars or special condition */
@@ -113,10 +113,10 @@ rtems_device_driver console_initialize(
rtems_boolean char_ready(int port, char *ch)
{
- if ( Ring_buffer_Is_empty( &Buffer[port] ) )
+ if ( Ring_buffer_Is_empty( &Console_Buffer[port] ) )
return FALSE;
- Ring_buffer_Remove_character( &Buffer[port], *ch );
+ Ring_buffer_Remove_character( &Console_Buffer[port], *ch );
return TRUE;
}
diff --git a/c/src/lib/wrapup/Makefile.in b/c/src/lib/wrapup/Makefile.in
index 46f7aac927..bef0aa637b 100644
--- a/c/src/lib/wrapup/Makefile.in
+++ b/c/src/lib/wrapup/Makefile.in
@@ -13,27 +13,59 @@ PROJECT_ROOT = @PROJECT_ROOT@
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/lib.cfg
-LIB=$(PROJECT_RELEASE)/lib/librtemsall.a
+LIB=$(PROJECT_RELEASE)/lib/librtemsall${LIB_VARIANT}.a
SRCS=$(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
$(PROJECT_RELEASE)/lib/librtems$(LIB_VARIANT).a \
$(wildcard $(PROJECT_RELEASE)/lib/libposix$(LIB_VARIANT).a) \
$(wildcard $(PROJECT_RELEASE)/lib/libka9q$(LIB_VARIANT).a) \
+ $(wildcard $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a) \
$(PROJECT_RELEASE)/lib/libcsupport$(LIB_VARIANT).a \
$(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \
$(wildcard $(PROJECT_RELEASE)/lib/rtems-ctor$(LIB_VARIANT).o) \
$(wildcard $(PROJECT_RELEASE)/lib/libno-ctor$(LIB_VARIANT).a)
-CLEAN_ADDITIONS +=
+CLEAN_ADDITIONS += $(ARCH)/check
CLOBBER_ADDITIONS +=
all: $(ARCH) $(LIB)
-
-$(LIB): $(SRCS)
- PROJECT_RELEASE=$(PROJECT_RELEASE) \
- $(PROJECT_RELEASE)/build-tools/rtems-glom \
- -d $(PROJECT_RELEASE)/lib -v -V "$(LIB_VARIANT)" \
- -a $(AR)
-
+
install: all
+$(ARCH)/check:: $(SRCS)
+ @$(RM) $@; touch $@;
+ @for f in $(SRCS); do \
+ case $$f in \
+ *.o) echo " `basename $$f`" >> $@ \
+ ;; \
+ *.rel) echo " `basename $$f`" >> $@ \
+ ;; \
+ *.a) \
+ ( list=`$(AR) t $$f`;\
+ for i in $$list; do \
+ if grep " $$i" $@; then \
+ echo "ERROR -- $$i in multiple files"; exit 1; \
+ fi;\
+ echo " $$i" >> $@;\
+ done; ) \
+ ;; \
+ esac; \
+ done;
+
+$(LIB):: $(ARCH)/check
+ @for f in $(SRCS); do \
+ case $$f in \
+ *.o) $(AR) ru $@ $$f \
+ ;;\
+ *.rel) $(AR) ru $@ $$f \
+ ;;\
+ *.a) \
+ (cd $(ARCH); \
+ list=`$(AR) t $$f`; \
+ $(AR) x $$f $$list; $(AR) ru $@ $$list; \
+ $(RM) $$list ;)\
+ ;; \
+ esac; \
+ done;
+ @$(RANLIB) $@
+ @echo "*** Glommed $@"
diff --git a/c/src/make/README b/c/src/make/README
index 6d4b7501b4..6cdc4b2c6e 100644
--- a/c/src/make/README
+++ b/c/src/make/README
@@ -210,7 +210,6 @@
personality modules specified by the customization file for:
compiler ( make/compilers/??.cfg )
- operating system ( make/os/??.cfg )
private customization files
@@ -310,10 +309,6 @@
a number of MAKE variables are automatically set and maintained by
the config files.
- CONFIG.$(HOST_ARCH).OS
- -- full path of OS config file, set by
- custom config file.
-
CONFIG.$(HOST_ARCH).CC
-- full path of C compilation config file, set by custom
config file.
diff --git a/c/src/make/compilers/gcc-target-default.cfg b/c/src/make/compilers/gcc-target-default.cfg
index d75c1e4230..82294d0e87 100644
--- a/c/src/make/compilers/gcc-target-default.cfg
+++ b/c/src/make/compilers/gcc-target-default.cfg
@@ -4,10 +4,6 @@
# $Id$
#
-# names for C++ compilers.
-CXX=$(CC)
-CCC=$(CXX)
-
CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
CPLUS_CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
@@ -45,7 +41,7 @@ ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g \
else
# Used for embedded bsps
# Ask gcc where it finds its own include files
-GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include)
+GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include $(GCCSED))
CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
-nostdinc -I$(PROJECT_INCLUDE) \
@@ -76,11 +72,11 @@ ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g -I$(srcdir) \
# default location of Standard C Library
ifndef LIBC_LIBC
-LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a)
+LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a $(GCCSED))
endif
ifndef LIBC_LIBM
-LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a)
+LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a $(GCCSED))
endif
endif
@@ -93,7 +89,7 @@ else
HAS_CPLUSPLUS=no
endif
-# debug flag; typically
+# debug flag;
CFLAGS_DEBUG_V+=-Wno-unused
ifeq ($(RTEMS_USE_GCC272),no)
@@ -173,10 +169,9 @@ ARFLAGS=ruv
#
# Command to convert a normal archive to one searchable by $(LD)
-# Not needed on SVR4
#
-
-MKLIB=echo library is complete:
+# NOTE: Obsolete, use $(RANLIB) instead, MKLIB may disappear soon
+MKLIB=$(RANLIB)
#
# How to compile stuff into ${ARCH} subdirectory
@@ -193,12 +188,6 @@ ${ARCH}/%.o: %.c
${ARCH}/%.o: %.cc
${COMPILE.cc} -o $@ $<
-${ARCH}/%.o: %.cpp
- ${COMPILE.cc} -o $@ $<
-
-${ARCH}/%.o: %.cxx
- ${COMPILE.cc} -o $@ $<
-
${ARCH}/%.o: %.S
${COMPILE.c} -DASM -o $@ $<
@@ -272,26 +261,49 @@ CONSTRUCTOR=
LIBC_LOW=
ifndef LIBGCC
-LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
endif
-LINK_OBJS=\
+#
+# NOTE: a rule to link an rtems' application should look similar to this
+# (cf. "make-exe" in make/custom/*.cfg):
+#
+# gcc27:
+# $(PGM): $(LINK_FILES)
+# $(LD) $(LDFLAGS) -o $@ $(LINK_OBJS) \
+# --start-group $(LIB_LIBS) --end-group
+#
+# gcc28:
+# $(PGM): $(LINK_FILES)
+# $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LIB_LIBS)
+#
+
+LINK_OBJS =\
$(CONSTRUCTOR) \
$(OBJS) \
$(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
- $(LD_LIBS) \
$(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA)
-LINK_LIBS=\
- $(LD_LIBS) \
- $(LIBC_EXTRA_LIBS) \
- $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA) \
- $(LIBC_LIBM) $(LIBC_LIBC) $(LIBGCC)
-
-LINK_FILES=\
+LINK_FILES =\
$(START_FILE) \
- $(LINK_OBJS) \
- $(LINK_LIBS)
+ $(CONSTRUCTOR) \
+ $(OBJS) \
+ $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
+ $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA) \
+ $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+LINK_LIBS = $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
+ifeq ($(RTEMS_CROSS_TARGET),yes)
+# NOTE: add libc and libgcc only for embedded targets
+# LIBC_LIBM should not be needed by rtems itself.
+# FIXME: If a BSP requires libm, its make/custom/*.cfg file should add
+# LIBC_LIBM to LINK_LIBS (untested)
+LINK_LIBS += $(LIBC_LIBC) $(LIBGCC)
+endif
+endif
+
+LINK_LIBS += $(LD_LIBS)
#
# Allow user to override link commands (to build a prom image, perhaps)
diff --git a/c/src/make/host.cfg.in b/c/src/make/host.cfg.in
index ba09e56e45..8b2350e6da 100644
--- a/c/src/make/host.cfg.in
+++ b/c/src/make/host.cfg.in
@@ -37,6 +37,11 @@ FGREP=@FGREP@
GREP=@GREP@
EGREP=@EGREP@
+# FIXME: HACK for a bug in cygwin-hosted egcs which returns a mixture
+# of '\\' and '/' as path separators.
+# Should be removed as soon as this bug is fixed in egcs.
+GCCSED = @GCCSED@
+
# ksh (or bash) is used by some shell scripts; ref build-tools/scripts/Makefile
#
# Must have shell functions. Some ksh's core dump mysteriously and
diff --git a/c/src/wrapup/Makefile.in b/c/src/wrapup/Makefile.in
index 46f7aac927..bef0aa637b 100644
--- a/c/src/wrapup/Makefile.in
+++ b/c/src/wrapup/Makefile.in
@@ -13,27 +13,59 @@ PROJECT_ROOT = @PROJECT_ROOT@
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/lib.cfg
-LIB=$(PROJECT_RELEASE)/lib/librtemsall.a
+LIB=$(PROJECT_RELEASE)/lib/librtemsall${LIB_VARIANT}.a
SRCS=$(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
$(PROJECT_RELEASE)/lib/librtems$(LIB_VARIANT).a \
$(wildcard $(PROJECT_RELEASE)/lib/libposix$(LIB_VARIANT).a) \
$(wildcard $(PROJECT_RELEASE)/lib/libka9q$(LIB_VARIANT).a) \
+ $(wildcard $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a) \
$(PROJECT_RELEASE)/lib/libcsupport$(LIB_VARIANT).a \
$(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \
$(wildcard $(PROJECT_RELEASE)/lib/rtems-ctor$(LIB_VARIANT).o) \
$(wildcard $(PROJECT_RELEASE)/lib/libno-ctor$(LIB_VARIANT).a)
-CLEAN_ADDITIONS +=
+CLEAN_ADDITIONS += $(ARCH)/check
CLOBBER_ADDITIONS +=
all: $(ARCH) $(LIB)
-
-$(LIB): $(SRCS)
- PROJECT_RELEASE=$(PROJECT_RELEASE) \
- $(PROJECT_RELEASE)/build-tools/rtems-glom \
- -d $(PROJECT_RELEASE)/lib -v -V "$(LIB_VARIANT)" \
- -a $(AR)
-
+
install: all
+$(ARCH)/check:: $(SRCS)
+ @$(RM) $@; touch $@;
+ @for f in $(SRCS); do \
+ case $$f in \
+ *.o) echo " `basename $$f`" >> $@ \
+ ;; \
+ *.rel) echo " `basename $$f`" >> $@ \
+ ;; \
+ *.a) \
+ ( list=`$(AR) t $$f`;\
+ for i in $$list; do \
+ if grep " $$i" $@; then \
+ echo "ERROR -- $$i in multiple files"; exit 1; \
+ fi;\
+ echo " $$i" >> $@;\
+ done; ) \
+ ;; \
+ esac; \
+ done;
+
+$(LIB):: $(ARCH)/check
+ @for f in $(SRCS); do \
+ case $$f in \
+ *.o) $(AR) ru $@ $$f \
+ ;;\
+ *.rel) $(AR) ru $@ $$f \
+ ;;\
+ *.a) \
+ (cd $(ARCH); \
+ list=`$(AR) t $$f`; \
+ $(AR) x $$f $$list; $(AR) ru $@ $$list; \
+ $(RM) $$list ;)\
+ ;; \
+ esac; \
+ done;
+ @$(RANLIB) $@
+ @echo "*** Glommed $@"
diff --git a/configure b/configure
index b060199533..9006bbbf3c 100644
--- a/configure
+++ b/configure
@@ -1321,7 +1321,7 @@ case "${target}" in
# override these settings
RTEMS_HAS_POSIX_API=no
;;
- i[3456]86-unknown-freebsd2.[12]*) # unix "simulator" port
+ i[3456]86-*freebsd2*) # unix "simulator" port
target_cpu=unix
RTEMS_HOST=FreeBSD
# override these settings
@@ -1535,12 +1535,14 @@ echo "configure:1535: checking whether $CC_FOR_TARGET accepts -specs" >&5
if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
+
+rtems_cv_gcc_specs=no
+if test "$rtems_cv_prog_gcc" = "yes"; then
touch confspec
-echo 'void f(){}' >conftest.c
-if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
- rtems_cv_gcc_specs=yes
-else
- rtems_cv_gcc_specs=no
+ echo 'void f(){}' >conftest.c
+ if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
+ rtems_cv_gcc_specs=yes
+ fi
fi
rm -f confspec conftest*
@@ -1550,25 +1552,25 @@ echo "$ac_t""$rtems_cv_gcc_specs" 1>&6
echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
-echo "configure:1554: checking whether $CC_FOR_TARGET accepts --pipe" >&5
+echo "configure:1556: checking whether $CC_FOR_TARGET accepts --pipe" >&5
if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
+rtems_cv_gcc_pipe=no
+if test "$rtems_cv_prog_gcc" = "yes"; then
case "$host_os" in
cygwin32*)
- rtems_cv_gcc_pipe=no
;;
*)
echo 'void f(){}' >conftest.c
if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
rtems_cv_gcc_pipe=yes
- else
- rtems_cv_gcc_pipe=no
fi
rm -f conftest*
;;
esac
+fi
fi
@@ -1591,7 +1593,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1595: checking for $ac_word" >&5
+echo "configure:1597: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CXX_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1631,7 +1633,7 @@ rtems_save_CXXFLAGS=$CXXFLAGS
CXX=$CXX_FOR_TARGET
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1635: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1637: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1641,11 +1643,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 1645 "configure"
+#line 1647 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1671,12 +1673,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1675: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1677: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1680: checking whether we are using GNU C++" >&5
+echo "configure:1682: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1685,7 +1687,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1700,7 +1702,7 @@ if test $ac_cv_prog_gxx = yes; then
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1704: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1706: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1751,19 +1753,60 @@ else
CXX_FOR_TARGET="no"
fi
-if test "$rtems_cv_prog_gcc" = "yes" ; then
- AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
- AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
- LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
- NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
- RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
+
+
+echo $ac_n "checking target's ar""... $ac_c" 1>&6
+echo "configure:1760: checking target's ar" >&5
+if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ :
fi
+echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
+
+if test -n "$ac_cv_path_AR_FOR_TARGET"; then
+ AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
+else
+ if test -z "$AR_FOR_TARGET" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ case $host_os in
+ *cygwin32*)
+ AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
+ ;;
+ esac
+
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
+echo "configure:1793: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
+ case "$AR_FOR_TARGET" in
+ /*) # valid
+ echo "$ac_t"""yes"" 1>&6
+ ;;
+ *) # invalid for AC_PATH_PROG
+ echo "$ac_t"""no"" 1>&6
+ { echo "configure: error: ***
+ Environment variable AR_FOR_TARGET should ether
+ be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
+ ;;
+ esac
+ fi
-# Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
+ # Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
set dummy "$program_prefix"ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1767: checking for $ac_word" >&5
+echo "configure:1810: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1792,10 +1835,61 @@ else
echo "$ac_t""no" 1>&6
fi
-# Extract the first word of ""$program_prefix"as", so it can be a program name with args.
+fi
+
+
+echo $ac_n "checking target's as""... $ac_c" 1>&6
+echo "configure:1843: checking target's as" >&5
+if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ :
+fi
+
+echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
+
+if test -n "$ac_cv_path_AS_FOR_TARGET"; then
+ AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
+else
+ if test -z "$AS_FOR_TARGET" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ case $host_os in
+ *cygwin32*)
+ AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
+ ;;
+ esac
+
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
+echo "configure:1876: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
+ case "$AS_FOR_TARGET" in
+ /*) # valid
+ echo "$ac_t"""yes"" 1>&6
+ ;;
+ *) # invalid for AC_PATH_PROG
+ echo "$ac_t"""no"" 1>&6
+ { echo "configure: error: ***
+ Environment variable AS_FOR_TARGET should ether
+ be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
+ ;;
+ esac
+ fi
+
+ # Extract the first word of ""$program_prefix"as", so it can be a program name with args.
set dummy "$program_prefix"as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1799: checking for $ac_word" >&5
+echo "configure:1893: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1824,75 +1918,228 @@ else
echo "$ac_t""no" 1>&6
fi
-# Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
-set dummy "$program_prefix"nm; ac_word=$2
+fi
+
+
+echo $ac_n "checking target's ld""... $ac_c" 1>&6
+echo "configure:1926: checking target's ld" >&5
+if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ :
+fi
+
+echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
+
+if test -n "$ac_cv_path_LD_FOR_TARGET"; then
+ LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
+else
+ if test -z "$LD_FOR_TARGET" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ case $host_os in
+ *cygwin32*)
+ LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
+ ;;
+ esac
+
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
+echo "configure:1959: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
+ case "$LD_FOR_TARGET" in
+ /*) # valid
+ echo "$ac_t"""yes"" 1>&6
+ ;;
+ *) # invalid for AC_PATH_PROG
+ echo "$ac_t"""no"" 1>&6
+ { echo "configure: error: ***
+ Environment variable LD_FOR_TARGET should ether
+ be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
+ ;;
+ esac
+ fi
+
+ # Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
+set dummy "$program_prefix"ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1831: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:1976: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$NM_FOR_TARGET" in
+ case "$LD_FOR_TARGET" in
/*)
- ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
+ ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
+ ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET="no"
+ test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
;;
esac
fi
-NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
-if test -n "$NM_FOR_TARGET"; then
- echo "$ac_t""$NM_FOR_TARGET" 1>&6
+LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
+if test -n "$LD_FOR_TARGET"; then
+ echo "$ac_t""$LD_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-# Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
-set dummy "$program_prefix"ld; ac_word=$2
+fi
+
+
+echo $ac_n "checking target's nm""... $ac_c" 1>&6
+echo "configure:2009: checking target's nm" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ :
+fi
+
+echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
+
+if test -n "$ac_cv_path_NM_FOR_TARGET"; then
+ NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
+else
+ if test -z "$NM_FOR_TARGET" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ case $host_os in
+ *cygwin32*)
+ NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
+ ;;
+ esac
+
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
+echo "configure:2042: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
+ case "$NM_FOR_TARGET" in
+ /*) # valid
+ echo "$ac_t"""yes"" 1>&6
+ ;;
+ *) # invalid for AC_PATH_PROG
+ echo "$ac_t"""no"" 1>&6
+ { echo "configure: error: ***
+ Environment variable NM_FOR_TARGET should ether
+ be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
+ ;;
+ esac
+ fi
+
+ # Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
+set dummy "$program_prefix"nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1863: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
+echo "configure:2059: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$LD_FOR_TARGET" in
+ case "$NM_FOR_TARGET" in
/*)
- ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
+ ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
+ ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
+ test -z "$ac_cv_path_NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET="no"
;;
esac
fi
-LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
-if test -n "$LD_FOR_TARGET"; then
- echo "$ac_t""$LD_FOR_TARGET" 1>&6
+NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
+if test -n "$NM_FOR_TARGET"; then
+ echo "$ac_t""$NM_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
+fi
+
+
+
+echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
+echo "configure:2093: checking target's ranlib" >&5
+if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ :
+fi
+
+echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
-# Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
+if test -n "$ac_cv_path_RANLIB_FOR_TARGET"; then
+ RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
+else
+ if test -z "$RANLIB_FOR_TARGET" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ case $host_os in
+ *cygwin32*)
+ RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
+ ;;
+ esac
+
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
+echo "configure:2126: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
+ case "$RANLIB_FOR_TARGET" in
+ /*) # valid
+ echo "$ac_t"""yes"" 1>&6
+ ;;
+ *) # invalid for AC_PATH_PROG
+ echo "$ac_t"""no"" 1>&6
+ { echo "configure: error: ***
+ Environment variable RANLIB_FOR_TARGET should ether
+ be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
+ ;;
+ esac
+ fi
+
+ # Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
set dummy "$program_prefix"ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1896: checking for $ac_word" >&5
+echo "configure:2143: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1921,11 +2168,98 @@ else
echo "$ac_t""no" 1>&6
fi
+fi
+
+ if test "$RANLIB_FOR_TARGET" = "no"; then
+ # ranlib wasn't found; check if ar -s is available
+
+echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
+echo "configure:2178: checking whether $AR_FOR_TARGET -s works" >&5
+if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+int foo( int b )
+{ return b; }
+EOF
+if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:2187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
+ && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:2188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
+ && test -s conftest.a ; \
+then
+ rtems_cv_AR_FOR_TARGET_S="yes"
+else
+ rtems_cv_AR_FOR_TARGET_S="no"
+fi
+ rm -f conftest*
+
+fi
+
+echo "$ac_t""$rtems_cv_AR_FOR_TARGET_S" 1>&6
+
+ if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
+ ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
+ RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
+ else
+ { echo "configure: error: ***
+ Can't figure out how to build a library index
+ Nether ranlib nor ar -s seem to be available " 1>&2; exit 1; }
+ fi
+ fi
+
+
+echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
+echo "configure:2213: checking target's objcopy" >&5
+if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ :
+fi
+
+echo "$ac_t""$ac_cv_path_OBJCOPY_FOR_TARGET" 1>&6
+
+if test -n "$ac_cv_path_OBJCOPY_FOR_TARGET"; then
+ OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
+else
+ if test -z "$OBJCOPY_FOR_TARGET" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ case $host_os in
+ *cygwin32*)
+ OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy`
+ ;;
+ esac
+
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
+echo "configure:2246: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
+ case "$OBJCOPY_FOR_TARGET" in
+ /*) # valid
+ echo "$ac_t"""yes"" 1>&6
+ ;;
+ *) # invalid for AC_PATH_PROG
+ echo "$ac_t"""no"" 1>&6
+ { echo "configure: error: ***
+ Environment variable OBJCOPY_FOR_TARGET should ether
+ be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
+ ;;
+ esac
+ fi
-# Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
+ # Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
set dummy "$program_prefix"objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1929: checking for $ac_word" >&5
+echo "configure:2263: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1954,10 +2288,61 @@ else
echo "$ac_t""no" 1>&6
fi
-# Extract the first word of ""$program_prefix"size", so it can be a program name with args.
+fi
+
+
+echo $ac_n "checking target's size""... $ac_c" 1>&6
+echo "configure:2296: checking target's size" >&5
+if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ :
+fi
+
+echo "$ac_t""$ac_cv_path_SIZE_FOR_TARGET" 1>&6
+
+if test -n "$ac_cv_path_SIZE_FOR_TARGET"; then
+ SIZE_FOR_TARGET=$ac_cv_path_SIZE_FOR_TARGET
+else
+ if test -z "$SIZE_FOR_TARGET" ; then
+ if test "$rtems_cv_prog_gcc" = "yes"; then
+ # We are using gcc, ask it about its tool
+ # NOTE: Necessary if gcc was configured to use the target's
+ # native tools or uses prefixes for gnutools (e.g. gas instead of as)
+ case $host_os in
+ *cygwin32*)
+ SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size | sed -e "s%\\\\%/%g" `
+ ;;
+ *)
+ SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size`
+ ;;
+ esac
+
+ fi
+ else
+ # The user set an environment variable.
+ # Check whether it is an absolute path, otherwise AC_PATH_PROG
+ # will override the environment variable, which isn't what the user
+ # intends
+ echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
+echo "configure:2329: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
+ case "$SIZE_FOR_TARGET" in
+ /*) # valid
+ echo "$ac_t"""yes"" 1>&6
+ ;;
+ *) # invalid for AC_PATH_PROG
+ echo "$ac_t"""no"" 1>&6
+ { echo "configure: error: ***
+ Environment variable SIZE_FOR_TARGET should ether
+ be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
+ ;;
+ esac
+ fi
+
+ # Extract the first word of ""$program_prefix"size", so it can be a program name with args.
set dummy "$program_prefix"size; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1961: checking for $ac_word" >&5
+echo "configure:2346: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1986,12 +2371,14 @@ else
echo "$ac_t""no" 1>&6
fi
+fi
+
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1995: checking for $ac_word" >&5
+echo "configure:2382: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2020,7 +2407,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
+echo "configure:2411: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2068,7 +2455,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2072: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2459: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2078,11 +2465,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2082 "configure"
+#line 2469 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2102,12 +2489,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2106: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2493: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2111: checking whether we are using GNU C" >&5
+echo "configure:2498: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2116,7 +2503,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2131,7 +2518,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2135: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2522: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2159,15 +2546,76 @@ else
fi
+echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
+echo "configure:2551: checking for Cygwin32 environment" >&5
+if eval "test \"`echo '$''{'rtems_cv_cygwin32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2556 "configure"
+#include "confdefs.h"
+
+int main() {
+return __CYGWIN32__;
+; return 0; }
+EOF
+if { (eval echo configure:2563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ rtems_cv_cygwin32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ rtems_cv_cygwin32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$rtems_cv_cygwin32" 1>&6
+CYGWIN32=
+test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:2581: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'rtems_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN32" = yes; then
+rtems_cv_exeext=.exe
+else
+cat > rtems_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
+rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
+rm -f rtems_c_test*
+fi
+
+test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
+fi
+EXEEXT=""
+test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
+echo "$ac_t""${rtems_cv_exeext}" 1>&6
+
+
+case $host_os in
+*cygwin32*) GCCSED="| sed 's%\\\\%/%g'" ;;
+*) ;;
+esac
+
+
for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2166: checking for $ac_func" >&5
+echo "configure:2614: 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 2171 "configure"
+#line 2619 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2190,7 +2638,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2218,7 +2666,7 @@ done
# 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:2222: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
+echo "configure:2670: 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;
@@ -2233,7 +2681,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
-echo "configure:2237: checking for Makefile.in in c/src/exec/rtems" >&5
+echo "configure:2685: 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;
@@ -2248,7 +2696,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
-echo "configure:2252: checking for Makefile.in in c/src/exec/sapi" >&5
+echo "configure:2700: 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;
@@ -2265,7 +2713,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:2269: checking for Makefile.in in c/src/exec/posix" >&5
+echo "configure:2717: 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;
@@ -2287,7 +2735,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:2291: checking for bsps" >&5
+echo "configure:2739: checking for bsps" >&5
files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
for file in $files; do
case $file in
@@ -2342,7 +2790,7 @@ echo "configure:2291: 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:2346: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir" >&5
+echo "configure:2794: 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;
@@ -2365,7 +2813,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:2369: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
+echo "configure:2817: 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;
@@ -2382,7 +2830,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:2386: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
+echo "configure:2834: 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;
@@ -2424,7 +2872,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:2428: checking if the test suites are enabled? " >&5
+echo "configure:2876: 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
@@ -2443,7 +2891,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6
-echo "configure:2447: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
+echo "configure:2895: 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;
@@ -2460,7 +2908,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:2464: checking for Makefile.in in c/src/tests/libtests" >&5
+echo "configure:2912: 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;
@@ -2475,7 +2923,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
-echo "configure:2479: checking for Makefile.in in c/src/tests/sptests" >&5
+echo "configure:2927: 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;
@@ -2490,7 +2938,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
-echo "configure:2494: checking for Makefile.in in c/src/tests/tmtests" >&5
+echo "configure:2942: 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;
@@ -2505,7 +2953,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
-echo "configure:2509: checking for Makefile.in in c/src/tests/mptests" >&5
+echo "configure:2957: 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;
@@ -2521,7 +2969,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:2525: checking for Makefile.in in c/src/tests/psxtests" >&5
+echo "configure:2973: 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;
@@ -2539,7 +2987,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:2543: checking if the HWAPI is enabled? " >&5
+echo "configure:2991: 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"
@@ -2550,7 +2998,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:2554: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
+echo "configure:3002: 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;
@@ -2565,7 +3013,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
-echo "configure:2569: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
+echo "configure:3017: 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;
@@ -2580,7 +3028,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
-echo "configure:2584: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
+echo "configure:3032: 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;
@@ -2595,7 +3043,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
-echo "configure:2599: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
+echo "configure:3047: 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;
@@ -2610,7 +3058,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
-echo "configure:2614: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
+echo "configure:3062: 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;
@@ -2625,7 +3073,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
-echo "configure:2629: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
+echo "configure:3077: 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;
@@ -2640,7 +3088,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
-echo "configure:2644: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
+echo "configure:3092: 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;
@@ -2685,7 +3133,7 @@ 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:2689: checking for Makefile.in in c/build-tools" >&5
+echo "configure:3137: checking for Makefile.in in c/build-tools" >&5
if test -d $srcdir/c/build-tools; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2700,7 +3148,7 @@ fi
echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
-echo "configure:2704: checking for Makefile.in in make" >&5
+echo "configure:3152: checking for Makefile.in in make" >&5
if test -d $srcdir/make; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -2715,7 +3163,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
-echo "configure:2719: checking for Makefile.in in c/src/lib/libmisc" >&5
+echo "configure:3167: 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;
@@ -2730,7 +3178,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
-echo "configure:2734: checking for Makefile.in in c/src/tests/samples" >&5
+echo "configure:3182: 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;
@@ -2945,12 +3393,14 @@ s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
-s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
+s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g
s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g
s%@CC@%$CC%g
+s%@EXEEXT@%$EXEEXT%g
+s%@GCCSED@%$GCCSED%g
s%@rtems_cv_prog_cc_cross@%$rtems_cv_prog_cc_cross%g
s%@RTEMS_BSP_LIST@%$RTEMS_BSP_LIST%g
s%@RTEMS_HOST@%$RTEMS_HOST%g
diff --git a/configure.in b/configure.in
index b28ed27c52..72d57d9799 100644
--- a/configure.in
+++ b/configure.in
@@ -153,7 +153,7 @@ case "${target}" in
# override these settings
RTEMS_HAS_POSIX_API=no
;;
- i[[3456]]86-unknown-freebsd2.[[12]]*) # unix "simulator" port
+ i[[3456]]86-*freebsd2*) # unix "simulator" port
target_cpu=unix
RTEMS_HOST=FreeBSD
# override these settings
@@ -229,6 +229,16 @@ RTEMS_CANONICALIZE_TOOLS
dnl check host cc
AC_PROG_CC
+RTEMS_CYGWIN32
+RTEMS_EXEEXT
+
+dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
+case $host_os in
+*cygwin32*) GCCSED="| sed 's%\\\\%/%g'" ;;
+*) ;;
+esac
+AC_SUBST(GCCSED)
+
dnl check for host library functions
dnl NOTE: must be called after AC_PROG_CC
AC_CHECK_FUNCS(strerror)
diff --git a/make/README b/make/README
index 6d4b7501b4..6cdc4b2c6e 100644
--- a/make/README
+++ b/make/README
@@ -210,7 +210,6 @@
personality modules specified by the customization file for:
compiler ( make/compilers/??.cfg )
- operating system ( make/os/??.cfg )
private customization files
@@ -310,10 +309,6 @@
a number of MAKE variables are automatically set and maintained by
the config files.
- CONFIG.$(HOST_ARCH).OS
- -- full path of OS config file, set by
- custom config file.
-
CONFIG.$(HOST_ARCH).CC
-- full path of C compilation config file, set by custom
config file.
diff --git a/make/compilers/gcc-no_bsp.cfg b/make/compilers/gcc-no_bsp.cfg
index 35dbe5e599..6260eafe65 100644
--- a/make/compilers/gcc-no_bsp.cfg
+++ b/make/compilers/gcc-no_bsp.cfg
@@ -264,7 +264,7 @@ START_FILE=
CONSTRUCTOR=
-LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
LINK_FILES= $(START_FILE) \
$(CONSTRUCTOR) \
diff --git a/make/compilers/gcc-portsw.cfg b/make/compilers/gcc-portsw.cfg
index d9b47b72b9..6b6f3c459f 100644
--- a/make/compilers/gcc-portsw.cfg
+++ b/make/compilers/gcc-portsw.cfg
@@ -241,7 +241,7 @@ START_FILE= $(PROJECT_RELEASE)/lib/crt0$(LIB_VARIANT).o $(PROJECT_RELEASE)/lib/r
LIBC_LOW= $(PROJECT_RELEASE)/lib/libcsupport$(LIBSUFFIX_VA)
-LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
LIBOSBOOT=/home/src/amd29k/sps2000/netrom.o
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index d75c1e4230..82294d0e87 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/make/compilers/gcc-target-default.cfg
@@ -4,10 +4,6 @@
# $Id$
#
-# names for C++ compilers.
-CXX=$(CC)
-CCC=$(CXX)
-
CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
CPLUS_CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
@@ -45,7 +41,7 @@ ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g \
else
# Used for embedded bsps
# Ask gcc where it finds its own include files
-GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include)
+GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include $(GCCSED))
CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
-nostdinc -I$(PROJECT_INCLUDE) \
@@ -76,11 +72,11 @@ ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g -I$(srcdir) \
# default location of Standard C Library
ifndef LIBC_LIBC
-LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a)
+LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a $(GCCSED))
endif
ifndef LIBC_LIBM
-LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a)
+LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a $(GCCSED))
endif
endif
@@ -93,7 +89,7 @@ else
HAS_CPLUSPLUS=no
endif
-# debug flag; typically
+# debug flag;
CFLAGS_DEBUG_V+=-Wno-unused
ifeq ($(RTEMS_USE_GCC272),no)
@@ -173,10 +169,9 @@ ARFLAGS=ruv
#
# Command to convert a normal archive to one searchable by $(LD)
-# Not needed on SVR4
#
-
-MKLIB=echo library is complete:
+# NOTE: Obsolete, use $(RANLIB) instead, MKLIB may disappear soon
+MKLIB=$(RANLIB)
#
# How to compile stuff into ${ARCH} subdirectory
@@ -193,12 +188,6 @@ ${ARCH}/%.o: %.c
${ARCH}/%.o: %.cc
${COMPILE.cc} -o $@ $<
-${ARCH}/%.o: %.cpp
- ${COMPILE.cc} -o $@ $<
-
-${ARCH}/%.o: %.cxx
- ${COMPILE.cc} -o $@ $<
-
${ARCH}/%.o: %.S
${COMPILE.c} -DASM -o $@ $<
@@ -272,26 +261,49 @@ CONSTRUCTOR=
LIBC_LOW=
ifndef LIBGCC
-LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
endif
-LINK_OBJS=\
+#
+# NOTE: a rule to link an rtems' application should look similar to this
+# (cf. "make-exe" in make/custom/*.cfg):
+#
+# gcc27:
+# $(PGM): $(LINK_FILES)
+# $(LD) $(LDFLAGS) -o $@ $(LINK_OBJS) \
+# --start-group $(LIB_LIBS) --end-group
+#
+# gcc28:
+# $(PGM): $(LINK_FILES)
+# $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LIB_LIBS)
+#
+
+LINK_OBJS =\
$(CONSTRUCTOR) \
$(OBJS) \
$(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
- $(LD_LIBS) \
$(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA)
-LINK_LIBS=\
- $(LD_LIBS) \
- $(LIBC_EXTRA_LIBS) \
- $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA) \
- $(LIBC_LIBM) $(LIBC_LIBC) $(LIBGCC)
-
-LINK_FILES=\
+LINK_FILES =\
$(START_FILE) \
- $(LINK_OBJS) \
- $(LINK_LIBS)
+ $(CONSTRUCTOR) \
+ $(OBJS) \
+ $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
+ $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA) \
+ $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+LINK_LIBS = $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
+ifeq ($(RTEMS_CROSS_TARGET),yes)
+# NOTE: add libc and libgcc only for embedded targets
+# LIBC_LIBM should not be needed by rtems itself.
+# FIXME: If a BSP requires libm, its make/custom/*.cfg file should add
+# LIBC_LIBM to LINK_LIBS (untested)
+LINK_LIBS += $(LIBC_LIBC) $(LIBGCC)
+endif
+endif
+
+LINK_LIBS += $(LD_LIBS)
#
# Allow user to override link commands (to build a prom image, perhaps)
diff --git a/make/custom/FreeBSD-posix.cfg b/make/custom/FreeBSD-posix.cfg
index f48b2ecc49..326c0078f2 100644
--- a/make/custom/FreeBSD-posix.cfg
+++ b/make/custom/FreeBSD-posix.cfg
@@ -34,11 +34,7 @@ LIBC_DEFINES += -DHEAPSPACE_MB=1
# This requires that at least the GNU C++ compiler and libg++ be installed.
ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
HAS_CPLUSPLUS=yes
-# No need to set it, gcc knows about them
-# LIBCC_INCLUDE=/usr/include/g++
CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
-else
-HAS_CPLUSPLUS=no
endif
# Define this to yes if this target supports multiprocessor environments.
@@ -80,21 +76,12 @@ define make-target-options
echo "#define RTEMS_UNIX 1 " >>$@
endef
-ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
- $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
+ $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
-else
-#
-# gcc28 not yet supported
-#
-endif
# *****************************************************************
# Miscellaneous additions go here
-
-# Workaround for missing ranlib support in RTEMS
-MKLIB=$(AR) s $(@) ; echo library is complete:
diff --git a/make/custom/HPUX9-posix.cfg b/make/custom/HPUX9-posix.cfg
index 7adcb73267..c0383ea164 100644
--- a/make/custom/HPUX9-posix.cfg
+++ b/make/custom/HPUX9-posix.cfg
@@ -75,20 +75,11 @@ define make-target-options
echo "#define RTEMS_UNIX 1 " >>$@
endef
-ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
- $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
+ $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
-else
-#
-# gcc28 not yet supported
-#
-endif
# Miscellaneous additions go here
-# Workaround for missing ranlib support in RTEMS
-MKLIB=$(AR) s $(@) ; echo library is complete:
-
diff --git a/make/custom/Linux-posix.cfg b/make/custom/Linux-posix.cfg
index 5c0b5de5d6..2972d6388a 100644
--- a/make/custom/Linux-posix.cfg
+++ b/make/custom/Linux-posix.cfg
@@ -77,26 +77,12 @@ define make-target-options
echo "#define RTEMS_UNIX 1 " >>$@
endef
-ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
- $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
+ $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
-else
-#
-# just use the same make-exe as gcc 272
-#
-define make-exe
- $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
- $(NM) -ng $@ > $(basename $@).num
- $(SIZE) $@
-endef
-endif
# *****************************************************************
# Miscellaneous additions go here
-
-# Workaround for missing ranlib support in RTEMS
-MKLIB=$(AR) s $(@) ; echo library is complete:
diff --git a/make/custom/Solaris-posix.cfg b/make/custom/Solaris-posix.cfg
index bab2c21427..f2bf14997c 100644
--- a/make/custom/Solaris-posix.cfg
+++ b/make/custom/Solaris-posix.cfg
@@ -27,7 +27,6 @@ RTEMS_USE_NEWLIB=no
LIBC_DEFINES += -DWORKSPACE_MB=2
LIBC_DEFINES += -DHEAPSPACE_MB=1
LIBC_DEFINES +=-DRTEMS_UNIXLIB -DRTEMS_UNIX -DMALLOC_PROVIDED -DRTEMS_DEBUG
-LIBC_LIBM=-lm
DEFINES += -D__EXTENSIONS__ -Dsolaris2
@@ -77,21 +76,11 @@ define make-target-options
echo "#define RTEMS_UNIX 1 " >>$@
endef
-ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
- $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
+ $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
-else
-# NOTE: Untested
-define make-exe
- $(CC) -v $(CFLAGS) -o $@ $(LINK_OBJS)
- $(NM) -ng $@ > $(basename $@).num
- $(SIZE) $@
-endef
-endif
-
# *****************************************************************
diff --git a/make/custom/bare.cfg b/make/custom/bare.cfg
index ce826ce7ba..8ad849e4be 100644
--- a/make/custom/bare.cfg
+++ b/make/custom/bare.cfg
@@ -17,9 +17,6 @@ CPU_CFLAGS=$(BARE_CPU_CFLAGS)
include $(RTEMS_ROOT)/make/custom/default.cfg
-## Target compiler config file, if any
-CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
-
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
diff --git a/make/custom/cvme961.cfg b/make/custom/cvme961.cfg
index 443fe07c56..fbc8eb660a 100644
--- a/make/custom/cvme961.cfg
+++ b/make/custom/cvme961.cfg
@@ -68,7 +68,8 @@ endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
diff --git a/make/custom/dmv152.cfg b/make/custom/dmv152.cfg
index aa87312e4f..078f23c636 100644
--- a/make/custom/dmv152.cfg
+++ b/make/custom/dmv152.cfg
@@ -71,7 +71,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
diff --git a/make/custom/efi332.cfg b/make/custom/efi332.cfg
index 3cecefe485..ec3a4d8cde 100644
--- a/make/custom/efi332.cfg
+++ b/make/custom/efi332.cfg
@@ -62,7 +62,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
diff --git a/make/custom/efi68k.cfg b/make/custom/efi68k.cfg
index d3005af7d4..34f91c2357 100644
--- a/make/custom/efi68k.cfg
+++ b/make/custom/efi68k.cfg
@@ -62,7 +62,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
diff --git a/make/custom/erc32.cfg b/make/custom/erc32.cfg
index 569d7139cc..3267d52474 100644
--- a/make/custom/erc32.cfg
+++ b/make/custom/erc32.cfg
@@ -90,7 +90,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
diff --git a/make/custom/force386.cfg b/make/custom/force386.cfg
index 1738acb508..7828e3576d 100644
--- a/make/custom/force386.cfg
+++ b/make/custom/force386.cfg
@@ -66,7 +66,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
diff --git a/make/custom/gen68302.cfg b/make/custom/gen68302.cfg
index 886d519f7c..7fce2148d2 100644
--- a/make/custom/gen68302.cfg
+++ b/make/custom/gen68302.cfg
@@ -62,7 +62,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
diff --git a/make/custom/gen68360.cfg b/make/custom/gen68360.cfg
index b476763b0b..fb1493d788 100644
--- a/make/custom/gen68360.cfg
+++ b/make/custom/gen68360.cfg
@@ -83,7 +83,8 @@ endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
diff --git a/make/custom/gensh1.cfg b/make/custom/gensh1.cfg
index fac62e69b5..6490fe7e09 100644
--- a/make/custom/gensh1.cfg
+++ b/make/custom/gensh1.cfg
@@ -63,19 +63,21 @@ endef
# The following are definitions of make-exe which will work using ld as
# is currently required. It is expected that as of gcc 2.8, the end user
# will be able to override parts of the compilers specs and link using gcc.
-# -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) -lrtemsall -lc $(LD_PATHS:%=-L %)
ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
- $(CC) $(LDFLAGS) -nostdlib -o $(basename $@).exe \
- -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) $(LD_PATHS:%=-L %)
+ $(LD) $(LDFLAGS) -N -e _start \
+ -T$(PROJECT_RELEASE)/lib/linkcmds\
+ -o $(basename $@).exe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
$(NM) -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
else
define make-exe
- $(CC) -Wl,-Map,$(basename $@).map $(CFLAGS) \
- -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) -v -Wl,-Map,$(basename $@).map \
+ $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
@@ -83,5 +85,3 @@ endif
# Miscellaneous additions go here
-# Workaround for missing ranlib support in rtems
-MKLIB=$(RANLIB)
diff --git a/make/custom/go32.cfg b/make/custom/go32.cfg
index 847fc529da..ff67d0b0fd 100644
--- a/make/custom/go32.cfg
+++ b/make/custom/go32.cfg
@@ -93,15 +93,16 @@ define make-exe
$(LD) $(LDFLAGS) -N -o $(basename $@).exe \
$(shell $(CC) $(CPU_CFLAGS) -print-file-name=crt0.o) \
$(LINK_OBJS) --start-group $(LINK_LIBS) --end-group \
- $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libcgo32.a) \
- $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libpc.a)
+ $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libcgo32.a $(GCCSED)) \
+ $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libpc.a $(GCCSED))
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
diff --git a/make/custom/i386ex.cfg b/make/custom/i386ex.cfg
index 7939307e05..12fcec58fb 100644
--- a/make/custom/i386ex.cfg
+++ b/make/custom/i386ex.cfg
@@ -67,7 +67,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
diff --git a/make/custom/idp.cfg b/make/custom/idp.cfg
index 302144c4a5..89541a7522 100644
--- a/make/custom/idp.cfg
+++ b/make/custom/idp.cfg
@@ -64,7 +64,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
diff --git a/make/custom/mvme136.cfg b/make/custom/mvme136.cfg
index aceb7b473c..ada4a834f4 100644
--- a/make/custom/mvme136.cfg
+++ b/make/custom/mvme136.cfg
@@ -63,7 +63,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
diff --git a/make/custom/mvme147.cfg b/make/custom/mvme147.cfg
index 74defad98a..89aab49929 100644
--- a/make/custom/mvme147.cfg
+++ b/make/custom/mvme147.cfg
@@ -57,7 +57,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
diff --git a/make/custom/mvme162.cfg b/make/custom/mvme162.cfg
index ed5d974169..21a2fe7782 100644
--- a/make/custom/mvme162.cfg
+++ b/make/custom/mvme162.cfg
@@ -26,9 +26,6 @@ endif # mvme162lx - mc68lc040
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=mvme162
-## Target compiler config file, if any
-CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
-
# We may install in a CPU model based directory but this is still
# a mvme162 based bsp.
RTEMS_BSP=mvme162
@@ -90,7 +87,8 @@ endif # mc68lc040
define make-exe
$(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
- $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(START_FILE) $(LINK_OBJS) \
+ --start-group $(LINK_LIBS) --end-group
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
@@ -99,7 +97,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS) \
+ $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
@@ -108,6 +107,3 @@ define make-exe
endef
endif
# Miscellaneous additions go here
-
-
-
diff --git a/make/custom/no_bsp.cfg b/make/custom/no_bsp.cfg
index dd27e58a20..a0f29170de 100644
--- a/make/custom/no_bsp.cfg
+++ b/make/custom/no_bsp.cfg
@@ -4,9 +4,7 @@
# $Id$
#
-# Specify here the host and target "architectures"
-HOST_ARCH=o-$(RTEMS_HOST)
-TARGET_ARCH=o-$(RTEMS_BSP)
+include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=no_cpu
RTEMS_CPU_MODEL=no_cpu_model
@@ -14,27 +12,6 @@ RTEMS_CPU_MODEL=no_cpu_model
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=no_bsp
-# use the inline functions instead of the macros
-# ref: src/exec/generic/Makefile
-# Need INLINE_UPCASE set to uppercase value of INLINE variable
-# ref: make/compilers/gcc-force386.cfg
-ifeq ($(RTEMS_USE_MACROS),yes)
-INLINE=macros
-INLINE_UPCASE=
-else
-INLINE=inline
-INLINE_UPCASE=INLINE
-endif
-
-# HOST Compiler config file
-# You may also want to specify where the compiler resides here.
-CC_$(HOST_ARCH)_DIR=$(RTEMS_GNUTOOLS_HOST)
-CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
-
-## Target compiler config file, if any
-CC_$(TARGET_ARCH)_DIR=$(RTEMS_GNUTOOLS)
-CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-$(RTEMS_BSP).cfg
-
# Use the LIBC support for CYGNUS newlib
# RTEMS_LIBC_DIR must already be set (by module file)
RTEMS_USE_NEWLIB=no
diff --git a/make/custom/ods68302.cfg b/make/custom/ods68302.cfg
index cad5bd0f9d..ac4ffa9d0d 100644
--- a/make/custom/ods68302.cfg
+++ b/make/custom/ods68302.cfg
@@ -40,12 +40,7 @@ HAS_KA9Q=no
# This requires that at least the GNU C++ compiler and libg++ be installed.
ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
HAS_CPLUSPLUS=yes
-# no standard C++ libs provided by default
-#LIBCC_INCLUDE=/usr/include/g++
-#CPLUS_LD_LIBS=-lstdc++ -lrtems++
CPLUS_LD_LIBS=$(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
-else
-HAS_CPLUSPLUS=no
endif
START_BASE=start302
@@ -90,7 +85,8 @@ else
define make-exe
$(CC) $(CFLAGS) $(CFLAGS_LD) \
-Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \
- -o $(basename $@).exe $(LINK_OBJS)
+ -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
endef
diff --git a/make/custom/p4000.cfg b/make/custom/p4000.cfg
index 18f46f007c..9f468adfc0 100644
--- a/make/custom/p4000.cfg
+++ b/make/custom/p4000.cfg
@@ -54,7 +54,7 @@ CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
$(CC) $(LDFLAGS) -nostdlib -o $(basename $@).exe \
- -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) $(LD_PATHS:%=-L %)
+ -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_OBJS) $(LINK_LIBS) $(LD_PATHS:%=-L %)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
$(RM) $(basename $@).srec1
@@ -63,7 +63,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
$(RM) $(basename $@).srec1
diff --git a/make/custom/p4600.cfg b/make/custom/p4600.cfg
index 3c5d198040..2d8e5b3f9b 100644
--- a/make/custom/p4600.cfg
+++ b/make/custom/p4600.cfg
@@ -25,9 +25,6 @@ CPU_DEFINES+=-DP4000 -DCPU_R4000 -DP3_DIAG -D_R4000 -D__mips=3
TARGET_ARCH=o-p4600
RTEMS_BSP=p4000
-## Target compiler config file, if any
-CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
-
# This target does NOT support the KA9Q TCP/IP stack so ignore requests
# to enable it.
HAS_KA9Q=no
@@ -74,7 +71,8 @@ ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
$(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
- $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(START_FILE) $(LINK_OBJS) \
+ --start-group $(LINK_LIBS) --end-group
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
$(RM) $(basename $@).srec1
@@ -83,7 +81,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS) \
+ $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
$(RM) $(basename $@).srec1
diff --git a/make/custom/p4650.cfg b/make/custom/p4650.cfg
index 22ca4c693a..3b01b116fd 100644
--- a/make/custom/p4650.cfg
+++ b/make/custom/p4650.cfg
@@ -24,9 +24,6 @@ CPU_DEFINES+=-DP4000 -DCPU_R4000 -DP3_DIAG -D_R4000 -D__mips=3
TARGET_ARCH=o-p4650
RTEMS_BSP=p4000
-## Target compiler config file, if any
-CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
-
# This target does NOT support the KA9Q TCP/IP stack so ignore requests
# to enable it.
HAS_KA9Q=no
@@ -73,7 +70,8 @@ ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
$(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
- $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(START_FILE) $(LINK_OBJS) \
+ --start-group $(LINK_LIBS) --end-group $(LD_LIBS)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
$(RM) $(basename $@).srec1
@@ -82,7 +80,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS) $(LD_LIBS)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
$(RM) $(basename $@).srec1
@@ -92,8 +91,3 @@ endef
endif
# Miscellaneous additions go here
-
-
-
-
-
diff --git a/make/custom/papyrus.cfg b/make/custom/papyrus.cfg
index a589323bd6..830238bb1b 100644
--- a/make/custom/papyrus.cfg
+++ b/make/custom/papyrus.cfg
@@ -92,7 +92,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg
index 3265ada60f..35ca1a1280 100644
--- a/make/custom/pc386.cfg
+++ b/make/custom/pc386.cfg
@@ -89,7 +89,8 @@ endef
else
define make-exe
$(CC) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
- -o $(basename $@).obj $(LINK_OBJS)
+ -o $(basename $@).obj \
+ $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O a.out-i386 \
--remove-section=.rodata \
--remove-section=.comment \
diff --git a/make/custom/psim.cfg b/make/custom/psim.cfg
index 5fe381b49e..a67ad5f6dc 100644
--- a/make/custom/psim.cfg
+++ b/make/custom/psim.cfg
@@ -101,11 +101,20 @@ HAS_KA9Q=no
# $(START_FILE) $(LINK_OBJS) \
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
+ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
- $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS)
+ $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
endef
+else
+define make-exe
+ $(CC) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
+endef
+endif
# Miscellaneous additions go here
diff --git a/make/custom/simhppa.cfg b/make/custom/simhppa.cfg
index 8e6040a938..e1d87622f3 100644
--- a/make/custom/simhppa.cfg
+++ b/make/custom/simhppa.cfg
@@ -125,7 +125,8 @@ endef
else
define make-exe
$(CC) $(CFLAGS) $(CFLAGS_LD) $(GCC_LD_LOC_OPTIONS) \
- -o $(basename $@).exe $(LINK_OBJS)
+ -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/host.cfg.in b/make/host.cfg.in
index ba09e56e45..8b2350e6da 100644
--- a/make/host.cfg.in
+++ b/make/host.cfg.in
@@ -37,6 +37,11 @@ FGREP=@FGREP@
GREP=@GREP@
EGREP=@EGREP@
+# FIXME: HACK for a bug in cygwin-hosted egcs which returns a mixture
+# of '\\' and '/' as path separators.
+# Should be removed as soon as this bug is fixed in egcs.
+GCCSED = @GCCSED@
+
# ksh (or bash) is used by some shell scripts; ref build-tools/scripts/Makefile
#
# Must have shell functions. Some ksh's core dump mysteriously and
diff --git a/make/target.cfg.in b/make/target.cfg.in
index c11322ee20..50033d933f 100644
--- a/make/target.cfg.in
+++ b/make/target.cfg.in
@@ -13,24 +13,16 @@ LDFLAGS =
LIBS = @LIBS@
CC_FOR_BUILD = @CC@
-CC_FOR_TARGET = @CC_FOR_TARGET@
-AS_FOR_TARGET = @AS_FOR_TARGET@
-AR_FOR_TARGET = @AR_FOR_TARGET@
-NM_FOR_TARGET = @NM_FOR_TARGET@
-LD_FOR_TARGET = @LD_FOR_TARGET@
-SIZE_FOR_TARGET = @SIZE_FOR_TARGET@
-OBJCOPY_FOR_TARGET = @OBJCOPY_FOR_TARGET@
+CC = @CC_FOR_TARGET@
+AS = @AS_FOR_TARGET@
+AR = @AR_FOR_TARGET@
+NM = @NM_FOR_TARGET@
+LD = @LD_FOR_TARGET@
+SIZE = @SIZE_FOR_TARGET@
+OBJCOPY = @OBJCOPY_FOR_TARGET@
+RANLIB = @RANLIB_FOR_TARGET@
-CC= $(CC_FOR_TARGET)
-AS= $(AS_FOR_TARGET)
-LD= $(LD_FOR_TARGET)
-NM= $(NM_FOR_TARGET)
-AR= $(AR_FOR_TARGET)
-SIZE= $(SIZE_FOR_TARGET)
-OBJCOPY= $(OBJCOPY_FOR_TARGET)
-
-CXX_FOR_TARGET = @CXX_FOR_TARGET@
-CXX=$(CXX_FOR_TARGET)
+CXX = @CXX_FOR_TARGET@
export CC
export AS
@@ -40,6 +32,8 @@ export AR
export SIZE
export OBJCOPY
+export CXX
+
RTEMS_CROSS_TARGET=@rtems_cv_prog_cc_cross@
RTEMS_HOST = @RTEMS_HOST@
diff --git a/tools/build/scripts/Makefile.in b/tools/build/scripts/Makefile.in
index db02f4736c..1cecfcc2cb 100644
--- a/tools/build/scripts/Makefile.in
+++ b/tools/build/scripts/Makefile.in
@@ -17,8 +17,8 @@ include $(RTEMS_ROOT)/make/leaf.cfg
DESTDIR=$(PROJECT_RELEASE)/build-tools
-PGMS=install-if-change rcs-clean lock-directory unlock-directory rtems-glom search-id.sh
-
+PGMS=install-if-change rcs-clean lock-directory unlock-directory \
+ search-id.sh
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
diff --git a/tools/build/src/Makefile.in b/tools/build/src/Makefile.in
index 2dd240f761..d1cfe1a519 100644
--- a/tools/build/src/Makefile.in
+++ b/tools/build/src/Makefile.in
@@ -11,6 +11,10 @@ includedir = @includedir@
manext = 1
mandir = @mandir@/man$(manext)
+# FIXME: $EXEEXT should be set in a central cfg-file used for native
+# compiling (e.g. gcc.cfg) instead of setting EXEEXE here.
+EXEEXT=@EXEEXT@
+
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
@@ -28,7 +32,8 @@ H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-PGMS=$(ARCH)/cklength $(ARCH)/eolstrip $(ARCH)/packhex $(ARCH)/unhex
+PGMS=$(ARCH)/cklength$(EXEEXT) $(ARCH)/eolstrip$(EXEEXT) \
+ $(ARCH)/packhex$(EXEEXT) $(ARCH)/unhex$(EXEEXT)
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/leaf.cfg
diff --git a/tools/cpu/generic/size_rtems.in b/tools/cpu/generic/size_rtems.in
index e3dde44a81..72c96e842c 100644
--- a/tools/cpu/generic/size_rtems.in
+++ b/tools/cpu/generic/size_rtems.in
@@ -1,4 +1,4 @@
-#!KSHELL -p
+#!@KSH@ -p
#
# size_rtems
#