patch to include gansidecl.h in {ht}config.h
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Fri Oct 30 14:21:00 GMT 1998
This patch changes configure.in such that when it creates
{ht}config.h, they each include gansidecl.h. This centralizes including
gansidecl.h and makes sure everyone gets it. It also allows us to start
using PROTO() in the prototypes of config/ directory headers, but only
for built-in types, (ie. not rtx/tree/machine_mode etc.) Eg, here is what
config.h now looks like on mips-sgi-irix6.2:
> #include "auto-host.h"
> #include "gansidecl.h"
> #include "mips/xm-iris6.h"
The whole maze of {ht}config.h include hackery is black magic to
me. So I would appreciate some feedback as to whether I've done this
correctly. Eg. I don't have to worry about tm.h, right?
---------------------------------------------------------------------------
>>>>>> Also it appears that, independent of my patch, canadian cross
compiles are slightly broken (and have been for a while) because of the
settings of the $vars and $links variables in configure.in.
> vars="host_xm_file tm_file xm_file build_xm_file"
> links="config.h tm.h tconfig.h hconfig.h"
I think $links has config.h and hconfig.h backwards based on the order
listed in $vars. My eyeball tells me this would cause config.h to get
auto-host.h and hconfig.h would get auto-build.h in a canadian cross
compile. (That's backwards right?)
My patch doesn't touch this since I'm not sure. I just noticed
it while doing my own stuff.
---------------------------------------------------------------------------
Is my patch okay to install? If so, I'll submit a patch to clean
up the now redundant includes of gansidecl.h all over the source and the
dependencies in Makefile.in.
--Kaveh
Fri Oct 30 14:39:27 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in (host_xm_file, build_xm_file, xm_file): Arrange to
include gansidecl.h in {ht}config.h just before the config/
directory headers.
--- orig/egcs-CVS19981029/gcc/configure.in Thu Oct 29 17:26:07 1998
+++ egcs-CVS19981029/gcc/configure.in Fri Oct 30 13:22:40 1998
@@ -3456,14 +3456,14 @@
# 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-host.h ${host_xm_file}"
+host_xm_file="auto-host.h gansidecl.h ${host_xm_file}"
# 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 test x$host = x$build
then
- build_xm_file="auto-host.h ${build_xm_file}"
+ build_xm_file="auto-host.h gansidecl.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
@@ -3485,9 +3485,11 @@
mv auto-host.h ../auto-build.h
cd ..
rm -rf $tempdir
- build_xm_file="auto-build.h ${build_xm_file}"
+ build_xm_file="auto-build.h gansidecl.h ${build_xm_file}"
fi
+xm_file="gansidecl.h ${xm_file}"
+
vars="host_xm_file tm_file xm_file build_xm_file"
links="config.h tm.h tconfig.h hconfig.h"
defines="host_xm_defines null_defines xm_defines build_xm_defines"
@@ -3599,20 +3601,20 @@
host_xm_file_list=
for f in $host_xm_file; do
- if test $f != "auto-host.h"; then
+ if test $f != "auto-host.h" -a $f != "gansidecl.h" ; then
host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
else
- host_xm_file_list="${host_xm_file_list} auto-host.h"
+ host_xm_file_list="${host_xm_file_list} $f"
fi
done
build_xm_file_list=
for f in $build_xm_file; do
if test $f != "auto-build.h"; then
- if test $f != "auto-host.h"; then
+ if test $f != "auto-host.h" -a $f != "gansidecl.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"
+ build_xm_file_list="${build_xm_file_list} $f"
fi
else
build_xm_file_list="${build_xm_file_list} auto-build.h"
More information about the Gcc-patches
mailing list