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] Tiny fix of LINK_COMMAND_SPEC


On Wed, Jul 20, 2005 at 12:48:25PM +0100, Joern RENNECKE wrote:
> In http://gcc.gnu.org/ml/gcc-patches/2005-07/msg00357.html
> Jakub Jelinek wrote:
> 
> >That's really weird, as link_ssp either expands to nothing
> >(in which case the space is not desirable), or has a space at the end
> >already:
> >#define LINK_SSP_SPEC "%{fstack-protector:-lssp_nonshared -lssp }"
> 
> That's not the case when TARGET_LIBC_PROVIDES_SSP is defined;
> you've put this into gcc.c:
> 
> #ifndef LINK_SSP_SPEC
> #ifdef TARGET_LIBC_PROVIDES_SSP
> #define LINK_SSP_SPEC "%{fstack-protector:}"
> #else
> #define LINK_SSP_SPEC "%{fstack-protector:-lssp_nonshared -lssp }"
> #endif
> #endif

Sure, but in that case it expands to no characters.  There must have
been spaces before %(libspp), otherwise %(link_gcc_c_sequence)
could previously have no whitespace between itself and its previous
argument and there are at least 4 spaces at the beginning of the line:
    %{!nostdlib:%{!nodefaultlibs:%(link_ssp)%(link_gcc_c_sequence)}}\
Now, if it expanded to nothing, there still is whitespace before
whatever %(link_gcc_c_sequence) expands to, if it expands
to -lssp_nonshared -lssp , then there is whitespace added
in LINK_SSP_SPEC after -lssp.

	Jakub


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