[PATCH] Add PICFLAG to flags_to_pass in build machinery

David Edelsohn dje@watson.ibm.com
Wed Dec 8 20:12:00 GMT 2004


	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)'
  



More information about the Gcc-patches mailing list