This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: Build build programs in a build directory
- From: Kelley Cook <kcook at gcc dot gnu dot org>
- To: Richard Sandiford <rsandifo at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 30 Sep 2004 06:33:40 -0700 (PDT)
- Subject: Re: PING: Build build programs in a build directory
- Reply-to: kcook at gcc dot gnu dot org
--- Richard Sandiford <rsandifo@redhat.com> wrote:
> Sorry if this has already been said, but...
>
> Kelley Cook <kcook@gcc.gnu.org> writes:
> > * Makefile.in: Create all object and executables files built
> > with the build compiler in a build/ directory.
>
> ..this breaks bootstrap on mips-sgi-irix6.5. The problem is that
> fixproto
> is still looking for fix-header in the main gcc objdir, not in
> build/.
>
> Is the patch below the right fix? Bootstrapped & regression tested
> on mips-sgi-irix6.5.
>
> (And if it is the right fix, don't tell me it's obvious. ;)
> Nothing makefile-related is obvious to me...)
>
> Richard
>
>
> * Makefile.in (stmp-fixproto): Pass FIX_HEADER=build/... to
> fixproto.
>
> Index: Makefile.in
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
> retrieving revision 1.1404
> diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1404 Makefile.in
> *** Makefile.in 29 Sep 2004 09:47:41 -0000 1.1404
> --- Makefile.in 30 Sep 2004 07:07:56 -0000
> *************** stmp-fixproto: fixhdr.ready fixproto stm
> *** 2902,2907 ****
> --- 2902,2908 ----
> else \
> : This line works around a 'make' bug in BSDI 1.1.; \
> FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES;
> \
> + FIX_HEADER="build/fix-header$(build_exeext)"; export FIX_HEADER;
> \
> mkinstalldirs="$(mkinstalldirs)"; \
> export mkinstalldirs; \
> if [ -d "$(SYSTEM_HEADER_DIR)" ]; then \
>
Looks obvious to me. I would also change line 61 of fixproto so
FIX_HEADER defaults to $original_dir/build/fix-header.
Sorry about the breakage,
Kelley Cook