Re: Using gcc-4.2 on 10.6 Snow Leopard to target 10.5 Leopard?
site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=alastairs-place.net; h= subject:mime-version:content-type:from:in-reply-to:date:cc: content-transfer-encoding:message-id:references:to; q=dns/txt; s= aug07; bh=SvbkTIhdiO73BYqh05kbtgyqpm0=; b=TZuRBQCBd9gKq7YLxD40TG 4FSrQ6NL6FjDNiiu47lXEwihYt6pgRfL3m/Y1WzK9bZkZ9arYhG4GobdleeljIG/ t0eYdvHM6IGjDsGGDC18VdnaDmOMncygOYcNf1eV8pj1BUb8mBcdBD2LDEKaRNJg 3rNoXmN9lhvRU7SFVUBtI= 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" The C++ point is an interesting one... Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ 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... 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
participants (1)
-
Alastair Houghton