Commit 2f9e51b8 authored by Johann's avatar Johann

allow building for older platforms

Change-Id: Ibbd05e981debee12c16ebcd274150cd75a94a69d
parent 2d5c7f67
......@@ -603,24 +603,35 @@ process_common_toolchain() {
# PIC is probably what we want when building shared libs
enabled shared && soft_enable pic
# Handle darwin variants
# Handle darwin variants. Newer SDKs allow targeting older
# platforms, so find the newest SDK available.
if [ -d "/Developer/SDKs/MacOSX10.4u.sdk" ]; then
osx_sdk_dir="/Developer/SDKs/MacOSX10.4u.sdk"
fi
if [ -d "/Developer/SDKs/MacOSX10.5.sdk" ]; then
osx_sdk_dir="/Developer/SDKs/MacOSX10.5.sdk"
fi
if [ -d "/Developer/SDKs/MacOSX10.6.sdk" ]; then
osx_sdk_dir="/Developer/SDKs/MacOSX10.6.sdk"
fi
case ${toolchain} in
*-darwin8-*)
add_cflags "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
add_cflags "-isysroot ${osx_sdk_dir}"
add_cflags "-mmacosx-version-min=10.4"
add_ldflags "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
add_ldflags "-isysroot ${osx_sdk_dir}"
add_ldflags "-mmacosx-version-min=10.4"
;;
*-darwin9-*)
add_cflags "-isysroot /Developer/SDKs/MacOSX10.5.sdk"
add_cflags "-isysroot ${osx_sdk_dir}"
add_cflags "-mmacosx-version-min=10.5"
add_ldflags "-isysroot /Developer/SDKs/MacOSX10.5.sdk"
add_ldflags "-isysroot ${osx_sdk_dir}"
add_ldflags "-mmacosx-version-min=10.5"
;;
*-darwin10-*)
add_cflags "-isysroot /Developer/SDKs/MacOSX10.6.sdk"
add_cflags "-isysroot ${osx_sdk_dir}"
add_cflags "-mmacosx-version-min=10.6"
add_ldflags "-isysroot /Developer/SDKs/MacOSX10.6.sdk"
add_ldflags "-isysroot ${osx_sdk_dir}"
add_ldflags "-mmacosx-version-min=10.6"
;;
esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment