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 to correct LINK_PIE_SPEC


On Mon, Nov 15, 2004 at 12:27:02PM +0100, Peter S. Mazinger wrote:
> Hello!
> 
> The attached patch corrects the conditions, when the pie option should we 
> "propagated" to ld. It uses the same condition as later in the 
> link_command section, where the startfile and the endfile are applied.
> 
> ChangeLog:
> 2004-11-15  Peter S. Mazinger  <ps.m@gmx.net>
> 	* gcc.c (LINK_PIE_SPEC): Add %{!A:%{!nostdlib:%{!nostartfiles: }}} 

This is incorrect.
When you specify -nostdlib or -nostartfiles, you certainly want -pie
being passed down to ld if given to gcc.  These options tell the compiler
that you are taking care of using the appropriate start files and/or libraries.
Not passing -pie here would be very surprising and likely breaks
e.g. glibc which heavily uses -nostdlib and -nostartfiles and uses -pie
too.

	Jakub


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