This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Tiny fix of LINK_COMMAND_SPEC
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Joern RENNECKE <joern dot rennecke at st dot com>
- Cc: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 Jul 2005 07:54:22 -0400
- Subject: Re: [patch] Tiny fix of LINK_COMMAND_SPEC
- References: <42DE3A09.3000302@st.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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