stringify test broken
H.J. Lu
hjl@lucon.org
Mon Jan 26 08:32:00 GMT 1998
>
>
> The stringify feature test for gengenrtl.c doesn't work. gengenrtl.c
> includes hconfig.h but HAVE_CPP_STRINGIFY is defined only if config.h
> is included. This would be a minor problem if the default were to
> assume ANSI behavior. As it is, building with an ANSI C compiler
> other than GNU C doesn't work.
>
>
Can you try this patch?
Thanks.
--
H.J. Lu (hjl@gnu.org)
---
Fri Aug 15 17:47:14 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
* configure.in (--with-auto-config.h): New argument. Create
auto-config.h and exit.
(build-auto-config.h): Create it if the build machine is not
the same as the host machine.
(hconfig.h): Include build-auto-config.h if the build machine
is not the same as the host machine. Otherwise include
auto-config.h.
Index: configure.in
===================================================================
RCS file: /home/work/cvs/gnu/gcc/configure.in,v
retrieving revision 1.1.1.16
diff -u -r1.1.1.16 configure.in
--- configure.in 1998/01/09 20:45:30 1.1.1.16
+++ configure.in 1998/01/20 21:05:22
@@ -32,6 +32,12 @@
# Check for additional parameters
+# Generate auto-config.h only.
+AC_ARG_WITH(auto-config-h,
+[ --with-auto-config-h generate auto-config.h only.],
+auto_config_h_only=yes,
+auto_config_h_only=no)
+
# With GNU ld
AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld arrange to work with GNU ld.],
@@ -2838,6 +2870,20 @@
done
done
+if [[ -f hconfig.h ]]
+then
+ rm -f hconfig.h.tmp
+ if [[ x$build != x$host ]]
+ then
+ echo "#include \"build-auto-config.h\"" > hconfig.h.tmp
+ else
+ echo "#include \"auto-config.h\"" > hconfig.h.tmp
+ fi
+ cat hconfig.h >> hconfig.h.tmp
+ rm -f hconfig.h
+ mv hconfig.h.tmp hconfig.h
+fi
+
# Truncate the target if necessary
if [[ x$host_truncate_target != x ]]; then
target=`echo $target | sed -e 's/\(..............\).*/\1/'`
@@ -3269,3 +3315,22 @@
cross_overrides='${cross_overrides}'
build_overrides='${build_overrides}'
])
+
+# We need to create auto-config.h for the build machine if it is not the
+# same as host.
+if [[ $auto_config_h_only != yes -a x$build != x$host ]]
+then
+ tempdir=build.$$
+ rm -rf $tempdir
+ mkdir $tempdir
+ cd $tempdir
+ case ${srcdir} in
+ /*) realsrcdir=${srcdir};;
+ *) realsrcdir=../${srcdir};;
+ esac
+ CC=${BUILD_CC-cc} ${realsrcdir}/configure --with-auto-config-h \
+ --target=$target --host=$host --build=$build
+ mv auto-config.h ../build-auto-config.h
+ cd ..
+ rm -rf $tempdir
+fi
More information about the Gcc
mailing list