Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building static



On 7/12/02 7:41 pm, Kevin Van Vechten <email@hidden> wrote:

> On Saturday, December 7, 2002, at 09:25 AM, Jerry Pendergraft wrote:
>
>> Unfortunately specifying the full path links the library as an object
>> which will no doubt make your binary [much] larger than it needs to be.
>
> How does linking as an object make the binary much larger than linking
> static? These seem like the same thing to me... either way the object
> code of libgmp gets added to the binary. Maybe the compiler isn't as
> smart about removing dead code? Surely that could be done during a
> post compile phase...
>
>> There are two ways to ensure -lgmp uses the .a library
>> 1) remove the .dylib form. Then the link must use the .a as found
>
> Nasty!
>
>> 2) specify -static -lgmp
>
> This was my first guess too, but i had trouble with -lcrt0.o.a not
> found. Anyone know what's up with that?

This issue came up a couple of months ago - searching the archives using the
slightly painful search engine at lists.apple.com revealed this:

<http://lists.apple.com/archives/darwin-development/2002/Oct/03/linkingdynam
icandstaticl.005.txt>

(username archives, password archives)

I spotted something about crt0.o not found as well, but forgot to note the
exact link, sorry.

Cheers,

Chris
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Building static (From: Kevin Van Vechten <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.