This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
PATCH: Break fixproto-enquire dependency (was: Re: Irix make loop (stmp-multilib) )
- To: wilson at cygnus dot com
- Subject: PATCH: Break fixproto-enquire dependency (was: Re: Irix make loop (stmp-multilib) )
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Thu, 7 May 1998 16:39:44 +0200 (MET DST)
- Cc: mmitchell at usa dot net, ghazi at caip dot rutgers dot edu, egcs-bugs at cygnus dot com
- References: <13636.28045.20804.935328@slsvhmt> <199804290324.UAA25099@rtl.cygnus.com>
- Reply-To: manfred at s-direktnet dot de, Manfred dot Hollstein at ks dot sel dot alcatel dot de
On Tue, 28 April 1998, 20:24:04, wilson@cygnus.com wrote:
> - stmp-fixproto needs stmp-headers
> - stmp-headers needs gfloat.h
> - gfloat.h needs float.h-nat
> - float.h-nat needs enquire
> - enquire needs $(GCC_PARTS)
> - $(GCC_PARTS) needs $(LIBGCC)
> - $(LIBGCC) needs libgcc2.ready
> - libgcc2.ready needs $(STMP_FIXPROTO)
> - STMP_FIXPROTO is stmp-fixproto, hence goto begin of loop :-(
>
> I think any attempt to break this loop needs to start with enquire.
>
> One possible solution is to stop running enquire at build time. Running
> enquire does not work for cross builds, so we have the awkward situation that
> native builds create float.h differently than cross builds. If we use the
> cross method (setting float_format in the configure file), then we no longer
> need enquire, and the dependency loop is broken.
>
> If we want to keep enquire as a consistency check, we could still do that.
> We could write a rule that compiles and runs enquire, and then compares
> the output against the float.h file, and fails with an error if they
> are different. This could be done in rest.encap after the LIBGCC and
> STMP_FIXPROTO rules. This check can not be done for cross builds, or at
> least not this way. It would be possible to put something in the testsuite
> that could work for native and cross builds, since the testsuite already knows
> how to run programs on the target.
I tried all this, but
a. depending on configure properly defining float_format's for
all hosts/targets in general
b. and running enquire as a consistency check in particular
made me worry, we'd probably break too much running configurations.
The problem with b. is, enquire tries to suppress as much as possible
if $(FLOAT_H_TEST) defines SYS_FLOAT_H_WRAP, i.e. on solaris2.5.1
gfloat.h is empty after running the fixincludes machinery. I tried to
simulate parts of this logic in a new `run_enquire' goal, but finally
gave up. The question here actually is:
Do we want to keep running enquire, or shall we use the
float_format approach as it is already used for cross builds.
I'd really appreciate this, but don't want to decide it myself, send
in a patch which is then rejected because nobody likes it this way.
To fix my current problem on m68k-motorola-sysv, I've appended a
modified patch, which simply uses "stmp-int-hdrs" instead of
"stmp-headers" and adds the latter where necessary.
If we'd decide to take one consistent approach for both gfloat.h-nat
and gfloat.h-cross, I'll come up with a patch for it.
Is it OK to check in the patch below?
manfred
>
> Alternatively, we could bring the gfloat.h rule out of stmp-headers, and
> put it in rest.encap/all.cross. There is no real need to create it
> before fixproto is run, because there should never be anything that needs to
> be fixed in this file. This seems less elegant though, as stmp-headers
> no longer creates all of the header files.
>
> Or going back to the beginning, we could take the stdlib.h/unistd.h includes
> out of libgcc2.c/frame.c, and find some other way to make the prototypes
> available here if we need them.
>
> Jim
Thu May 7 16:13:28 1998 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (all.cross): Surround $(LIBGCC) and $(STMP_FIXPROTO)
with stmp-int-hdrs and stmp-headers dependencies to break dependency
upon gfloat.h and enquire.
(rest.encap): Likewise.
(install-headers-tar): Likewise.
(install-headers-cpio): Likewise.
(stmp-fixproto): Add comment; change to depend upon stmp-int-hdrs
instead of stmp-headers.
diff -rupN -x CVS egcs-19980507.orig/gcc/Makefile.in egcs-19980507/gcc/Makefile.in
--- egcs-19980507.orig/gcc/Makefile.in Thu May 7 11:07:24 1998
+++ egcs-19980507/gcc/Makefile.in Thu May 7 15:09:37 1998
@@ -749,14 +749,15 @@ all.internal: start.encap rest.encap
# This is what to compile if making a cross-compiler.
# Note that we can compile enquire using the cross-compiler just built,
# although we can't run it on this machine.
-all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
- $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
+all.cross: native gcc-cross specs stmp-int-hdrs $(LIBGCC) $(STMP_FIXPROTO) \
+ stmp-headers $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
# This is what to compile if making gcc with a cross-compiler.
all.build: native xgcc$(exeext) $(EXTRA_PARTS) lang.all.build
# This is what must be made before installing GCC and converting libraries.
start.encap: native xgcc$(exeext) specs $(LIBGCC1) xlimits.h lang.start.encap
# These can't be made until after GCC can run.
-rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
+rest.encap: stmp-int-hdrs $(LIBGCC) $(STMP_FIXPROTO) stmp-headers \
+ $(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-host.h cpp$(exeext) $(LANGUAGES) \
@@ -1996,9 +1997,11 @@ fixhdr.ready: fix-header
fi
# stmp-headers is to make sure fixincludes has already finished.
+# Note, we only use stmp-int-hdrs now to ensure all include files but float.h
+# have been created which are necessary for building libgcc2.a.
# The if statement is so that we don't run fixproto a second time
# if it has already been run on the files in `include'.
-stmp-fixproto: fixhdr.ready fixproto stmp-headers
+stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
@echo "Various warnings and error messages from fixproto are normal"
-if [ -d include ] ; then true; else mkdir include; fi
-if [ -f include/fixed ] ; then true; \
@@ -2361,7 +2364,7 @@ install-include-dir: installdirs
-chmod a+rx $(libsubdir)/include
# Install the include directory using tar.
-install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
+install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) stmp-headers install-include-dir
(cd include; \
tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
# /bin/sh on some systems returns the status of the first tar,
@@ -2369,7 +2372,7 @@ install-headers-tar: stmp-headers $(STMP
# So use `exit 0' to ignore its exit status.
# Install the include directory using cpio.
-install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
+install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) stmp-headers install-include-dir
(cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
# Put assert.h where it won't override GNU libc's assert.h.