This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ada/6483: ada fails to build under hppa*-hp-hpux*


Forwarded message:
>From dave Thu May 2 11:27:18 EDT 2002
Subject: Re: ada/6483: ada fails to build under hppa*-hp-hpux*
To: mark@codesourcery.com
Date: Thu, 2 May 2002 11:27:18 -0400 (EDT)
From: "John David Anglin" <dave@hiauly1>
Cc: danglin@gcc.gnu.org, gcc-prs@gcc.gnu.org
In-Reply-To: <20020430215601.11332.qmail@sources.redhat.com> from "Mark Mitchell" at Apr 30, 2002 05:56:01 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 4770      

>  Make sense, indeed.
>  
>  Dave, would you do this please (on the mainline, as Zack says)?
>  
>  Preapproved, and with apologies to Zack and Dave: Zack, because he pointed
>  this out before, and Dave, because he probably already committed the
>  change.

I have checked the following patch into the main branch.  The one new
feature is that X_ADA_CFLAGS and T_ADA_CFLAGS are used in building the
runtime as well as gnat.  This may or may not be necessary, but it
seemed prudent.

Tested by bootstraps, make gnatlib_and_tools, and inspection of the
relevant build logs under hppa-linux.  I added for testing purposes
a xmake_host define in config.gcc for hppa-linux to make sure that
the define for X_ADA_CFLAGS in pa/x-ada was correctly handled.

In testing, I noticed that we possibly should be using ALL_CFLAGS
rather than CFLAGS in ALL_ADAFLAGS and MOST_ADAFLAGS.  Then, X_CFLAGS
and T_CFLAGS would be used in the ada file compilations.  However,
ALL_CFLAGS uses echo and sed, making the compile commands somewhat
ugly and slower.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-05-02  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* pa/x-ada (ADA_CFLAGS): Rename to X_ADA_CFLAGS.

	* ada/Makefile.in (X_ADA_CFLAGS, T_ADA_CFLAGS): New fragment overrides.
	(ALL_ADA_CFLAGS): Define.  Replace ADA_CFLAGS with ALL_ADA_CFLAGS in
	ALL_ADAFLAGS, MOST_ADAFLAGS, and all compilations using CC.
 
Index: config/pa/x-ada
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/x-ada,v
retrieving revision 1.2
diff -u -3 -p -r1.2 x-ada
--- config/pa/x-ada	30 Apr 2002 19:47:38 -0000	1.2
+++ config/pa/x-ada	2 May 2002 14:10:23 -0000
@@ -1,4 +1,4 @@
 # The ada virtual array implementation requires that indexing be disabled on
 # hosts such as hpux that use a segmented memory architecture.  Both the c
 # and ada files need to be compiled with this option for correct operation.
-ADA_CFLAGS=-mdisable-indexing
+X_ADA_CFLAGS=-mdisable-indexing
Index: ada/Makefile.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/Makefile.in,v
retrieving revision 1.28
diff -u -3 -p -r1.28 Makefile.in
--- ada/Makefile.in	21 Apr 2002 07:10:12 -0000	1.28
+++ ada/Makefile.in	2 May 2002 14:10:23 -0000
@@ -82,6 +82,9 @@ T_CFLAGS =
 X_CPPFLAGS =
 T_CPPFLAGS =
 
+X_ADA_CFLAGS =
+T_ADA_CFLAGS =
+
 X_ADAFLAGS =
 T_ADAFLAGS =
 
@@ -126,8 +129,11 @@ GNATLIBFLAGS = -gnatpg
 GNATLIBCFLAGS = -g -O2
 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
 	-DIN_RTS
-ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS)
-MOST_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(SOME_ADAFLAGS)
+ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
+ALL_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
+	$(ADAFLAGS)
+MOST_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
+	$(SOME_ADAFLAGS)
 THREAD_KIND = native
 THREADSLIB =
 GMEM_LIB =
@@ -276,7 +282,7 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdi
 
 # Always use -I$(srcdir)/config when compiling.
 .c.o:
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
 .adb.o:
 	$(ADAC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $<
 .ads.o:
@@ -2293,21 +2299,21 @@ mkdir.o   : mkdir.c
 sysdep.o  : sysdep.c
 
 cio.o     : cio.c 
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
 	         $(ALL_CPPFLAGS) $(INCLUDES) $< 
 
 init.o    : init.c ada.h types.h raise.h
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
 	         $(ALL_CPPFLAGS) $(INCLUDES) $< 
 
 raise.o   : raise.c raise.h
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
 		 $(ALL_CPPFLAGS) $(INCLUDES) $< 
 
 # Need to keep the frame pointer in this file to pop the stack properly on
 # some targets.
 tracebak.o  : tracebak.c
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 	      -fno-omit-frame-pointer $< 
 
 cuintp.o : cuintp.c $(CONFIG_H) $(TREE_H) ada.h types.h uintp.h atree.h \
@@ -2347,7 +2353,7 @@ utils2.o : utils2.c $(CONFIG_H) $(TREE_H
 # Rule to compile prefix.o for the run-time.
 
 prefix.o : $(srcdir)/../prefix.c
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
 	      $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/../.. -I../.. \
 	      -DPREFIX=\"$(prefix)\" $< 
 


-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]