aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-04-14 08:32:34 +0000
committerJeff Law <law@gcc.gnu.org>1998-04-14 02:32:34 -0600
commitb7cb92adc97bd0cde5263493567cff7d23ed65d7 (patch)
tree1bd91d169d6d61a61b60647e064b8ca2cb33d3a6 /gcc
parent80608e279347300c822a048eb4b37b607f930b76 (diff)
downloadgcc-b7cb92adc97bd0cde5263493567cff7d23ed65d7.zip
gcc-b7cb92adc97bd0cde5263493567cff7d23ed65d7.tar.gz
gcc-b7cb92adc97bd0cde5263493567cff7d23ed65d7.tar.bz2
* Idea and part of the patch from HJ.
* Makefile.in: auto-host.h renamed from auto-config.h. All references changed. (distclean): Remove auto-build.h too. * configure.in: Rename host autoconf generated file to auto-host.h. If host != build, then run autoconf to generate auto-build.h for the build machine and include it in build_xm_files. Check for wait.h and sys/wait.h. From-SVN: r19205
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/Makefile.in9
-rwxr-xr-xgcc/configure52
-rw-r--r--gcc/configure.in50
4 files changed, 91 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 807455c..9f27e91 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
Tue Apr 14 09:02:32 1998 Jeffrey A Law (law@cygnus.com)
+ * Idea and part of the patch from HJ.
+ * Makefile.in: auto-host.h renamed from auto-config.h. All references
+ changed.
+ (distclean): Remove auto-build.h too.
+ * configure.in: Rename host autoconf generated file to auto-host.h.
+ If host != build, then run autoconf to generate auto-build.h for
+ the build machine and include it in build_xm_files.
+ Check for wait.h and sys/wait.h.
+
* combine.c (simplify_rtx, case TRUNCATE): Respect value of
TRULY_NOOP_TRUNCATION.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 3bb4b8e..e7590bc 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -728,9 +728,9 @@ $(srcdir)/config.in: $(srcdir)/cstamp-h.in
$(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
cd $(srcdir) && autoheader
echo timestamp > $(srcdir)/cstamp-h.in
-auto-config.h: cstamp-h ; @true
+auto-host.h: cstamp-h ; @true
cstamp-h: config.in config.status
- CONFIG_HEADERS=auto-config.h:config.in $(SHELL) config.status
+ CONFIG_HEADERS=auto-host.h:config.in $(SHELL) config.status
# Really, really stupid make features, such as SUN's KEEP_STATE, may force
# a target to build even if it is up-to-date. So we must verify that
@@ -757,7 +757,7 @@ start.encap: native xgcc$(exeext) specs $(LIBGCC1) xlimits.h lang.start.encap
rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
# This is what is made with the host's compiler
# whether making a cross compiler or not.
-native: config.status auto-config.h cpp$(exeext) $(LANGUAGES) \
+native: config.status auto-host.h cpp$(exeext) $(LANGUAGES) \
$(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
# Define the names for selecting languages in LANGUAGES.
@@ -2115,7 +2115,8 @@ clean: mostlyclean lang.clean
# Delete all files that users would normally create
# while building and installing GCC.
distclean: clean lang.distclean
- -rm -f tm.h config.h auto-config.h tconfig.h hconfig.h md cstamp-h
+ -rm -f tm.h config.h auto-host.h auto-build.h tconfig.h hconfig.h
+ -rm -f md cstamp-h
-rm -f config.status config.run config.cache config.bak
-rm -f Make-lang Make-hooks Make-host Make-target
-rm -f Makefile specs.h options.h *.oaux
diff --git a/gcc/configure b/gcc/configure
index c9ce370..3ae066f 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1494,7 +1494,7 @@ EOF
fi
-for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h
+for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h wait.h sys/wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -4637,17 +4637,39 @@ fi
# Set up the header files.
# $links is the list of header files to create.
# $vars is the list of shell variables with file names to include.
-# auto-conf.h is the file containing items generated by autoconf and is
+# auto-host.h is the file containing items generated by autoconf and is
# the first file included by config.h.
null_defines=
-host_xm_file="auto-config.h ${host_xm_file}"
+host_xm_file="auto-host.h ${host_xm_file}"
-# If host=build, it is correct to have hconfig include auto-conf.h
+# If host=build, it is correct to have hconfig include auto-host.h
# as well. If host!=build, we are in error and need to do more
# work to find out the build config parameters.
if [ x$host = x$build ]
then
- build_xm_file="auto-config.h ${build_xm_file}"
+ build_xm_file="auto-host.h ${build_xm_file}"
+else
+ # We create a subdir, then run autoconf in the subdir.
+ # To prevent recursion we set host and build for the new
+ # invocation of configure to the build for this invocation
+ # of configure.
+ tempdir=build.$$
+ rm -rf $tempdir
+ mkdir $tempdir
+ cd $tempdir
+ case ${srcdir} in
+ /*) realsrcdir=${srcdir};;
+ *) realsrcdir=../${srcdir};;
+ esac
+ CC=${BUILD_CC-cc} ${realsrcdir}/configure \
+ --target=$target --host=$build --build=$build
+
+ # We just finished tests for the build machine, so rename
+ # the file auto-build.h in the gcc directory.
+ mv auto-host.h ../auto-build.h
+ cd ..
+ rm -rf $tempdir
+ build_xm_file="auto-build.h ${build_xm_file}"
fi
vars="host_xm_file tm_file xm_file build_xm_file"
@@ -4754,19 +4776,23 @@ done
host_xm_file_list=
for f in $host_xm_file; do
- if test $f != "auto-config.h"; then
+ if test $f != "auto-host.h"; then
host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
else
- host_xm_file_list="${host_xm_file_list} auto-config.h"
+ host_xm_file_list="${host_xm_file_list} auto-host.h"
fi
done
build_xm_file_list=
for f in $build_xm_file; do
- if test $f != "auto-config.h"; then
- build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
+ if test $f != "auto-build.h"; then
+ if test $f != "auto-host.h"; then
+ build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
+ else
+ build_xm_file_list="${build_xm_file_list} auto-host.h"
+ fi
else
- build_xm_file_list="${build_xm_file_list} auto-config.h"
+ build_xm_file_list="${build_xm_file_list} auto-build.h"
fi
done
@@ -5207,7 +5233,7 @@ done
ac_given_srcdir=$srcdir
-trap 'rm -fr `echo "$all_outputs auto-config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -5444,7 +5470,7 @@ ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="auto-config.h:config.in"
+ CONFIG_HEADERS="auto-host.h:config.in"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
@@ -5567,7 +5593,7 @@ cat >> $CONFIG_STATUS <<\EOF
. $srcdir/configure.lang
case x$CONFIG_HEADERS in
-xauto-config.h:config.in)
+xauto-host.h:config.in)
echo > cstamp-h ;;
esac
# If the host supports symlinks, point stage[1234] at ../stage[1234] so
diff --git a/gcc/configure.in b/gcc/configure.in
index 9d33463..3930a1e 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -22,7 +22,7 @@
# Initialization and defaults
AC_INIT(tree.c)
-AC_CONFIG_HEADER(auto-config.h:config.in)
+AC_CONFIG_HEADER(auto-host.h:config.in)
remove=rm
hard_link=ln
@@ -148,7 +148,7 @@ EGCS_PROG_INSTALL
AC_HEADER_STDC
AC_HEADER_TIME
-AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h)
+AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h wait.h sys/wait.h)
# Check for thread headers.
AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
@@ -2948,17 +2948,39 @@ fi
# Set up the header files.
# $links is the list of header files to create.
# $vars is the list of shell variables with file names to include.
-# auto-conf.h is the file containing items generated by autoconf and is
+# auto-host.h is the file containing items generated by autoconf and is
# the first file included by config.h.
null_defines=
-host_xm_file="auto-config.h ${host_xm_file}"
+host_xm_file="auto-host.h ${host_xm_file}"
-# If host=build, it is correct to have hconfig include auto-conf.h
+# If host=build, it is correct to have hconfig include auto-host.h
# as well. If host!=build, we are in error and need to do more
# work to find out the build config parameters.
if [[ x$host = x$build ]]
then
- build_xm_file="auto-config.h ${build_xm_file}"
+ build_xm_file="auto-host.h ${build_xm_file}"
+else
+ # We create a subdir, then run autoconf in the subdir.
+ # To prevent recursion we set host and build for the new
+ # invocation of configure to the build for this invocation
+ # of configure.
+ tempdir=build.$$
+ rm -rf $tempdir
+ mkdir $tempdir
+ cd $tempdir
+ case ${srcdir} in
+ /*) realsrcdir=${srcdir};;
+ *) realsrcdir=../${srcdir};;
+ esac
+ CC=${BUILD_CC-cc} ${realsrcdir}/configure \
+ --target=$target --host=$build --build=$build
+
+ # We just finished tests for the build machine, so rename
+ # the file auto-build.h in the gcc directory.
+ mv auto-host.h ../auto-build.h
+ cd ..
+ rm -rf $tempdir
+ build_xm_file="auto-build.h ${build_xm_file}"
fi
vars="host_xm_file tm_file xm_file build_xm_file"
@@ -3065,19 +3087,23 @@ done
host_xm_file_list=
for f in $host_xm_file; do
- if test $f != "auto-config.h"; then
+ if test $f != "auto-host.h"; then
host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
else
- host_xm_file_list="${host_xm_file_list} auto-config.h"
+ host_xm_file_list="${host_xm_file_list} auto-host.h"
fi
done
build_xm_file_list=
for f in $build_xm_file; do
- if test $f != "auto-config.h"; then
- build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
+ if test $f != "auto-build.h"; then
+ if test $f != "auto-host.h"; then
+ build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
+ else
+ build_xm_file_list="${build_xm_file_list} auto-host.h"
+ fi
else
- build_xm_file_list="${build_xm_file_list} auto-config.h"
+ build_xm_file_list="${build_xm_file_list} auto-build.h"
fi
done
@@ -3422,7 +3448,7 @@ AC_OUTPUT($all_outputs,
[
. $srcdir/configure.lang
case x$CONFIG_HEADERS in
-xauto-config.h:config.in)
+xauto-host.h:config.in)
echo > cstamp-h ;;
esac
# If the host supports symlinks, point stage[1234] at ../stage[1234] so