This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: specs vs whitespace
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Jan 2003 09:40:32 -0800
- Subject: Re: specs vs whitespace
- References: <20030116233520.A31492@redhat.com>
Richard Henderson <rth@redhat.com> writes:
> #define LIB_SPEC \
> "%{pthread:-lpthread }%{shared:-lc}%{!shared:%{profile:-lc_p}%{!profile:-lc}} "
>
> In that we now ignore the trailing space after "-lpthread", and so
> create the link option "-lpthread-lc", which of course fails.
>
> Not wanting to audit all specs for similar problems, was there any
> particularly good reason for stripping trailing spaces? I can
> imagine similar problems with stripping leading spaces.
Look at config/rs6000/sysv4.h ASM_SPEC, CC1_SPEC, etc. That notation
would have to be uglier if trailing space were significant.
Is there a reason why that was written the way it was instead of
"%{pthread:-lpthread} %{shared:-lc}%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
? Or, with the new notation,
"%{pthread:-lpthread} \
%{shared: -lc ; \
profile: -lc_p; \
: -lc }"
zw