This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Bootstrapping mainline GNAT fails (with workaround androot cause: makefile bug)
- From: Andreas Schwab <schwab at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: guerby at acm dot org, gbsadler1 at lcisp dot com, gcc at gcc dot gnu dot org
- Date: Sat, 23 Mar 2002 19:22:06 +0100
- Subject: Re: [Ada] Bootstrapping mainline GNAT fails (with workaround androot cause: makefile bug)
- References: <200203231637.RAA15459@bemls8.iconmedialab.be>
"lode_leroy at hotmail dot com" <"lode_leroy at hotmail dot com"> writes:
|> When bootstrapping the ADA frontend for GCC3.1, I ran into some build
|> problems, but managed to find a workaround and the underlying cause, as
|> described below.
|>
|> While I tried building inside the source tree I ran into the internal
|> error reported by other people.
|>
|> Then I tried building in a separate build tree but I got problems during
|> linking of gnatlib:
|>
|> c-charac.o not found
|>
|> After spending a some time reading the Makefiles and trying out various
|> things, I found that the observed problems are caused by the file:
|>
|> build/gcc/ada/Makefile
|>
|> which contains
|> VPATH=../../../gcc/ada
|>
|> When making in the directory
|> build/gcc/ada/rts
|>
|> the file build/gcc/ada/Makefile is used, as follows:
|> make -f ../Makefile
|>
|> When used like this, the relative directory in VPATH ends up pointing to
|> the wrong directory.
Please try this patch:
2002-03-23 Andreas Schwab <schwab@suse.de>
* Makefile.in: Pass VPATH=$(fsrcdir) when calling make in rts
directory.
Index: gcc/gcc/ada/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
retrieving revision 1.21.10.2
diff -u -a -u -r1.21.10.2 gcc/gcc/ada/Makefile.in
--- gcc/gcc/ada/Makefile.in 2002/03/13 01:17:55 1.21.10.2
+++ gcc/gcc/ada/Makefile.in 2002/03/23 18:16:43
@@ -2182,13 +2182,13 @@
INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
CFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -DIN_RTS" \
ADA_CFLAGS="$(GNATLIBCFLAGS)" \
- srcdir=$(fsrcdir) \
+ srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
-f ../Makefile $(LIBGNAT_OBJS)
$(MAKE) -C rts CC="../../xgcc -B../../" \
ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
CFLAGS="$(GNATLIBCFLAGS)" ADA_CFLAGS="$(GNATLIBCFLAGS)" \
ADAFLAGS="$(GNATLIBFLAGS)" \
- srcdir=$(fsrcdir) \
+ srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
-f ../Makefile \
$(GNATRTL_OBJS)
$(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
@@ -2218,7 +2218,7 @@
ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
CFLAGS="$(GNATLIBCFLAGS)" \
ADAFLAGS="$(GNATLIBFLAGS)" \
- srcdir=$(fsrcdir) \
+ srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
-f ../Makefile \
$(HIE_OBJS)
$(CHMOD) a-wx rts/*.ali
@@ -2241,7 +2241,7 @@
ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
CFLAGS="$(GNATLIBCFLAGS)" \
ADAFLAGS="$(GNATLIBFLAGS)" \
- srcdir=$(fsrcdir) \
+ srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
-f ../Makefile \
$(RAVEN_OBJS)
$(CHMOD) a-wx rts/*.ali
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."