site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812) On 4 Oct 2009, at 11:40, Mario Emmenlauer wrote: I am aware of setting export MACOSX_DEPLOYMENT_TARGET="10.5" CFLAGS+="-mmacosx-version-min=10.5" CFLAGS+="-isysroot /Developer/SDKs/MacOSX10.5.sdk" Aaaah *sighs of understanding* This makes total sense. Thanks Alastair (and Iain, whom you beat by two minutes :-) ) Two things I learned to love about Mac: Universal binaries, and compiling against an SDK. Cheers, Mario The C++ point is an interesting one... Kind regards, Alastair. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Alastair Houghton wrote: but will that help against gcc linking its own (newer) libraries? The -isysroot setting will cause GCC to link against libraries within the SDK folder. If the correct library is in that folder, GCC will link with it. If it isn't, you'll get a linker error. In the specific case of libgcc, I think you'll find that on OS X it's divided into two pieces; one part is a static library (/usr/lib/gcc/<gcc-version>/<architecture>/libgcc.a) and the other part is a dylib (/usr/lib/libgcc_s.nn.n.dylib). Notice that the library that depends on the GCC version is the static one... It's also worth pointing out that there's nothing stopping Apple, therefore, from shipping the static library with the developer tools even if it didn't form part of the original operating system for a given SDK. Anyway, as far as I'm aware, this all works just fine, as indeed is implied by the Xcode release notes, which specifically state: "Note that neither gcc-4.2 nor llvm-gcc-4.2 will compile code against the 10.4u or earlier SDK, or deploy for Mac OS X 10.4 or earlier. Note that because most C++ applications built for 10.3.9 and later use the dynamic C++ standard library from the operating system, and Leopard only ships with the gcc 4.0 version of the C++ standard library, the gcc 4.2 and llvm-gcc4.2 compilers also use the gcc 4.0 C++ standard library, not the gcc 4.2 version." p.s. In spite of the fact that you aren't using Xcode, xcode-users is probably the place to ask this kind of question. Maybe xcode-users should be renamed to devtools-users :-) This email sent to site_archiver@lists.apple.com