This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add PICFLAG to flags_to_pass in build machinery
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>, DJ Delorie <dj at redhat dot com>, Nathanael Nerode <neroden at gcc dot gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 08 Dec 2004 15:11:09 -0500
- Subject: [PATCH] Add PICFLAG to flags_to_pass in build machinery
- References: <200412061929.LAA11806@hpsje.cup.hp.com>
Yesterday's patch that added AM_MAKEFLAGS to libgfortran broke AIX
bootstrap because it exploded the size of the environment. The
combination of the environment and the libgfortran object files list is
larger than AIX ARG_MAX. Although the Makefiles set NOEXPORT, GNU Make
always exports commandline arguments to the environment.
Now that GCC requires GNU Make, AM_MAKEFLAGS seems to be
unnecessary and almost all of the flags are redundant. Although the
message accompanying the patch to libgfortran does not say what actually
broke, it mention a HP-UX to IA64 cross. mh-ia64pic contains
PICFLAG=-fpic
and that is the one variable in AM_MAKEFLAGS not present in
FLAGS_TO_PASS.
The appended patch adds PICFLAG and PICFLAG_FOR_TARGET to the
top-level Makefile FLAGS_TO_PASS. It should have been there all along and
appears to have been masked by the AM_MAKEFLAGS kludge. This should allow
AM_MAKEFLAGS to be removed from libgfortran (and all GCC Makefiles).
This patch is the global part of a fix to a bootstrap regression
on AIX.
Ok for mainline?
Thanks, David
* Makefile.def (flags_to_pass): Add PICFLAG_FOR_TARGET.
* Makefile.tpl (EXTRA_HOST_FLAGS): Add PICFLAG.
(EXTRA_TARGET_FLAGS): Add PICFLAG.
* Makefile.in: Regenerate.
Index: Makefile.def
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.def,v
retrieving revision 1.41
diff -c -p -r1.41 Makefile.def
*** Makefile.def 13 Nov 2004 07:32:48 -0000 1.41
--- Makefile.def 8 Dec 2004 19:52:57 -0000
*************** flags_to_pass = { flag= LD_FOR_TARGET ;
*** 227,232 ****
--- 227,233 ----
flags_to_pass = { flag= LIBCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= NM_FOR_TARGET ; };
+ flags_to_pass = { flag= PICFLAG_FOR_TARGET ; };
flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.118
diff -c -p -r1.118 Makefile.tpl
*** Makefile.tpl 2 Dec 2004 23:45:19 -0000 1.118
--- Makefile.tpl 8 Dec 2004 19:52:57 -0000
*************** EXTRA_HOST_FLAGS = \
*** 528,533 ****
--- 528,534 ----
'DLLTOOL=$(DLLTOOL)' \
'LD=$(LD)' \
'NM=$(NM)' \
+ 'PICFLAG=$(PICFLAG)' \
'RANLIB=$(RANLIB)' \
'WINDRES=$(WINDRES)'
*************** EXTRA_TARGET_FLAGS = \
*** 560,565 ****
--- 561,567 ----
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
'NM=$$(NM_FOR_TARGET)' \
+ 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)'