-shared-libgcc vs -static-libgcc
Matt Austern
austern@apple.com
Fri Feb 13 19:52:00 GMT 2004
On Feb 13, 2004, at 11:48 AM, Zack Weinberg wrote:
> Matt Austern <austern@apple.com> writes:
>
>> Here's what the documentation says about -shared-libgcc and
>> -static-libgcc:
>> "On systems that provide @file{libgcc} as a shared library, these
>> options force the use of either the shared or static version
>> respectively. If no shared version of @file{libgcc} was built when the
>> compiler was configured, these options have no effect."
>>
>> Or to put it differently: shared-libgcc versus static-libgcc is a
>> binary choice. In some cases shared-libgcc is the default and in
>> other cases static-libgcc is the default. We must have either
>> shared-libgcc or static-gcc; it makes no sense to be neither, and it
>> makes no sense to be both.
>>
>> The reason I'm harping on this: if you accept my paraphrase, then I
>> don't see why we have two switches instead of one. One switch is a
>> binary choice between two alternatives.
>
> Huh? The two options are each other's negation. I don't think there
> is any -no-shared-libgcc or -no-static-libgcc option, which is the
> only construal of what you're saying that makes any sense that I can
> think of.
That's basically what I was hinting, yes: that this was a case where
it would make more sense to have a single flag with a -no-* option,
which is what we normally do if we're making a choice between
"do this", "don't do this", and "do this or not, whatever is the
default".
But that's mostly a nitpick. Mostly I just wanted to confirm that I
was right, that either we've got shared-libgcc or we don't, and that
I don't have to worry about weird corner cases where we might
have both or neither.
--Matt
More information about the Gcc
mailing list