• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard?


  • Subject: Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard?
  • From: IainS <email@hidden>
  • Date: Mon, 5 Oct 2009 10:39:21 +0100

Hi Mario,

When you link against the stub libraries [libgcc_s.10.X.dylib] in the SDK, all this does is to embed a reference to /usr/lib/libgcc_s. 1.dylib into your application binary. As far as the dynamic content is concerned this resolves only the symbols that are present at that revision of the OS.

The actual library [/usr/lib/libgcc_s.1.dylib] is linked by dyld when the program is loaded (on the target system)

Thus, by using the SDK (for the target system) and setting the minimum OSX version appropriately, you are ensuring that the correct library is linked at load-time.

cheers,
Iain


On 5 Oct 2009, at 09:24, Mario Emmenlauer wrote:


Hi Joel,

Joel Reymont wrote:
>
> On Oct 5, 2009, at 8:25 AM, Mario Emmenlauer wrote:
>
>> The reason I'm asking is that on Linux I could _never_ compile on a
>> newer system than the target system unless going completely static with
>> the runtime, so I'm a bit prejudiced against it. Is it really safe on
>> MacOS?
>
> Why ask? Why not try and see what happens?
>


quoting myself:

Mario Emmenlauer wrote:
[...] My application
starts on 10.5 when using the 10.5 SDK, but is there something I should
take special care of? Is using -shared-libgcc discouraged?

I did try, and it works. But you are probably aware that one can not proof a theory by example:( I guess our customers would not appreciate it when we made quarterly releases that crashes on some percentage of their Macs, even if a single trial worked for me:-)

But its nevertheless a matter of curiosity, meaning: On Linux, its
possible to compile on a newer system than the target, as long as
the linking is done completely static. The problem there is, that
linking against the runtime statically is discouraged, everything else
could work. Now I'm wondering what about libgcc, is it discouraged too?
And if so, can I make gcc-4.2 link against libgcc-4.0? If not, why
not?


If you (or anyone) could clarify, I would appreciate any insight!

Cheers,

   Mario



--
Dipl. Inf. Mario Emmenlauer Cell: +49-(0) 176-23463809
Bitplane AG Office: +41-(0) 44-430-1106
Badenerstrasse 682 Fax: +41-(0) 44-430-1101
CH-8048 Zürich mailto :mario * emmenlauer.de
Zürich http://www.marssoft.de / http:// www.xuvtools.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40sandoe-acoustics.co.uk


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard? (From: Mario Emmenlauer <email@hidden>)
 >Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard? (From: Joel Reymont <email@hidden>)
 >Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard? (From: Mario Emmenlauer <email@hidden>)
 >Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard? (From: Mario Emmenlauer <email@hidden>)

  • Prev by Date: Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard?
  • Next by Date: Record stream
  • Previous by thread: Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard?
  • Next by thread: Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard?
  • Index(es):
    • Date
    • Thread