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: specs vs whitespace


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


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