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: [PATCH] Fix Ada bootstrap on darwin


> OK? Bootstrapped and tested on ppc-darwin.  We have only 40 acats 
> failures
> now down from 49 the last time I ran the testsuite last week.

The Makefile.in part is OK (I have a similar patch for GCC 3.4
that hasn't propagated yet to the HEAD), but the mlib-tgt-darwin.adb part is
not: PIC_Option should return a single argument, so here you're
returning a single argument called "-fPIC -fno-common" which won't
work.

If we want to support more than one argument (which indeed makes sense
on some platforms), we would need to change the spec of PIC_Option and
all its callers.

cc:ing Vincent who is more familiar with this code so that he is
aware of the issue.

Arno

> ChangeLog:
> 	* Makefile.in (gnatlib-shared-darwin): Pass -fno-common for the 
> 	CFLAGS.
> 	* mlib-tgt-darwin.adb (PIC_Option): Return "-fno-common -fPIC".
>
> Index: Makefile.in
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
> retrieving revision 1.102
> diff -u -p -r1.102 Makefile.in
> --- Makefile.in	8 Dec 2004 11:47:34 -0000	1.102
> +++ Makefile.in	9 Dec 2004 13:30:15 -0000
> @@ -1890,7 +1890,7 @@ gnatlib-shared-win32:
>  gnatlib-shared-darwin:
>  	$(MAKE) $(FLAGS_TO_PASS) \
>  	     GNATLIBFLAGS="$(GNATLIBFLAGS)" \
> -	     GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
> +	     GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fno-common" \
>  	     THREAD_KIND="$(THREAD_KIND)" \
>  	     gnatlib
>  	$(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
> Index: mlib-tgt-darwin.adb
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/ada/mlib-tgt-darwin.adb,v
> retrieving revision 1.1
> diff -u -p -r1.1 mlib-tgt-darwin.adb
> --- mlib-tgt-darwin.adb	27 Oct 2004 12:27:51 -0000	1.1
> +++ mlib-tgt-darwin.adb	9 Dec 2004 13:30:15 -0000
> @@ -342,7 +342,7 @@ package body MLib.Tgt is
>  
>     function PIC_Option return String is
>     begin
> -      return "-fPIC";
> +      return "-fPIC -fno-common";
>     end PIC_Option;


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