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 RFA: Add -static-libstdc++ option to g++


Ian Lance Taylor wrote:
> Dave Korn <dave.korn.cygwin@googlemail.com> writes:
> 
>>   I'm finding this aspect of it slightly problematical:
>>
>>> +/* Skip this option.  */
>>> +#define SKIPOPT		(1<<4)
>>> +	  else if (strcmp (argv[i], "-static-libstdc++") == 0)
>>> +	    {
>>> +	      library = library >= 0 ? 2 : library;
>>> +	      args[i] |= SKIPOPT;
>>> +	    }
>>   I need to do things differently in my LINK_SPEC according to whether
>> libstdc++ is being linked statically or shared.  I can use "%{!static: ...}",
>> but "%{!static-libstdc++: ...}" doesn't of course work because the option is
>> removed by this processing before the specs get a chance to see it, so I can't
>> catch the mixed-shared-libgcc-and-static-libstdc++ combination.
>>
>>   Does any obvious workaround spring to mind?
> 
> I suppose you could modify the default spec to ignore -static-libstdc++
> and then have g++spec.c keep it.

  I'm not sure which default spec you're referring to?

    cheers,
      DaveK


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