mirror of
https://github.com/tpoechtrager/osxcross.git
synced 2024-08-16 12:00:24 +03:00
* Bump Version to 1.2
* Drop support for <= 10.5 SDKs (use osxcross-1.1 branch instead) * Adjustments for ld64 512.4
This commit is contained in:
parent
21241087bd
commit
748108aec4
12
CHANGELOG
12
CHANGELOG
@ -1,3 +1,15 @@
|
||||
/****************************** v1.2 *********************************/
|
||||
|
||||
Added:
|
||||
* Support for ld64 '-lto_library <path>'
|
||||
|
||||
Changed:
|
||||
* Updated cctools to 949.0.1 and ld64 to 512.4
|
||||
|
||||
Removed:
|
||||
* Support for <= 10.5 SDKs. Use 'osxcross-1.1' branch for these.
|
||||
|
||||
|
||||
/****************************** v1.1 *********************************/
|
||||
|
||||
Added:
|
||||
|
@ -296,7 +296,7 @@ Usage Examples:
|
||||
|
||||
The default deployment target is:
|
||||
|
||||
SDK <= 10.13: `Mac OS X 10.5`
|
||||
SDK <= 10.13: `Mac OS X 10.6`
|
||||
SDK >= 10.14: `Mac OS X 10.9`
|
||||
|
||||
However, there are several ways to override the default value:
|
||||
|
45
build.sh
45
build.sh
@ -5,7 +5,7 @@
|
||||
# This script requires the OS X SDK and the Clang/LLVM compiler.
|
||||
#
|
||||
|
||||
VERSION=1.1
|
||||
VERSION=1.2
|
||||
|
||||
pushd "${0%/*}" &>/dev/null
|
||||
|
||||
@ -13,7 +13,6 @@ source tools/tools.sh
|
||||
|
||||
if [ $SDK_VERSION ]; then
|
||||
echo 'SDK VERSION set in environment variable:' $SDK_VERSION
|
||||
test $SDK_VERSION = 10.4 && SDK_VERSION=10.4u
|
||||
else
|
||||
guess_sdk_version
|
||||
SDK_VERSION=$guess_sdk_version_result
|
||||
@ -21,29 +20,34 @@ fi
|
||||
verify_sdk_version $SDK_VERSION
|
||||
|
||||
case $SDK_VERSION in
|
||||
10.4*) TARGET=darwin8; X86_64H_SUPPORTED=0; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.4; ;;
|
||||
10.5*) TARGET=darwin9; X86_64H_SUPPORTED=0; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.6*) TARGET=darwin10; X86_64H_SUPPORTED=0; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.7*) TARGET=darwin11; X86_64H_SUPPORTED=0; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.8*) TARGET=darwin12; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.9*) TARGET=darwin13; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.10*) TARGET=darwin14; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.11*) TARGET=darwin15; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.12*) TARGET=darwin16; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.13*) TARGET=darwin17; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.5; ;;
|
||||
10.4*|10.5*)
|
||||
echo ""
|
||||
echo "SDK <= 10.5 no longer supported. Use 'osxcross-1.1' branch instead."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case $SDK_VERSION in
|
||||
10.6*) TARGET=darwin10; X86_64H_SUPPORTED=0; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.6; ;;
|
||||
10.7*) TARGET=darwin11; X86_64H_SUPPORTED=0; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.6; ;;
|
||||
10.8*) TARGET=darwin12; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.6; ;;
|
||||
10.9*) TARGET=darwin13; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.6; ;;
|
||||
10.10*) TARGET=darwin14; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=0; OSX_VERSION_MIN_INT=10.6; ;;
|
||||
10.11*) TARGET=darwin15; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.6; ;;
|
||||
10.12*) TARGET=darwin16; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.6; ;;
|
||||
10.13*) TARGET=darwin17; X86_64H_SUPPORTED=1; I386_SUPPORTED=1; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.6; ;;
|
||||
10.14*) TARGET=darwin18; X86_64H_SUPPORTED=1; I386_SUPPORTED=0; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.9; ;;
|
||||
10.15*) TARGET=darwin19; X86_64H_SUPPORTED=1; I386_SUPPORTED=0; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.9; ;;
|
||||
*) echo "Unsupported SDK"; exit 1 ;;
|
||||
esac
|
||||
|
||||
|
||||
# Minimum targeted OS X version
|
||||
# Must be <= SDK_VERSION
|
||||
if [ -n "$OSX_VERSION_MIN_INT" -a -z "$OSX_VERSION_MIN" ]; then
|
||||
OSX_VERSION_MIN=$OSX_VERSION_MIN_INT
|
||||
fi
|
||||
|
||||
|
||||
export TARGET
|
||||
|
||||
echo ""
|
||||
@ -122,8 +126,7 @@ if [ $f_res -eq 1 ]; then
|
||||
CONFFLAGS+="--with-libxar=$TARGET_DIR "
|
||||
[ -n "$DISABLE_CLANG_AS" ] && CONFFLAGS+="--disable-clang-as "
|
||||
[ -n "$DISABLE_LTO_SUPPORT" ] && CONFFLAGS+="--disable-lto-support "
|
||||
# https://github.com/tpoechtrager/osxcross/issues/156
|
||||
CXX="$CXX -DNDEBUG" ./configure $CONFFLAGS
|
||||
./configure $CONFFLAGS
|
||||
$MAKE -j$JOBS
|
||||
$MAKE install -j$JOBS
|
||||
popd &>/dev/null
|
||||
@ -227,12 +230,12 @@ $BASE_DIR/wrapper/build_wrapper.sh
|
||||
|
||||
echo ""
|
||||
|
||||
if [ $(osxcross-cmp ${SDK_VERSION/u/} "<" $OSX_VERSION_MIN) -eq 1 ]; then
|
||||
if [ $(osxcross-cmp $SDK_VERSION "<" $OSX_VERSION_MIN) -eq 1 ]; then
|
||||
echo "OSX_VERSION_MIN must be <= SDK_VERSION"
|
||||
trap "" EXIT
|
||||
exit 1
|
||||
elif [ $(osxcross-cmp $OSX_VERSION_MIN "<" 10.4) -eq 1 ]; then
|
||||
echo "OSX_VERSION_MIN must be >= 10.4"
|
||||
elif [ $(osxcross-cmp $OSX_VERSION_MIN "<" 10.6) -eq 1 ]; then
|
||||
echo "OSX_VERSION_MIN must be >= 10.6"
|
||||
trap "" EXIT
|
||||
exit 1
|
||||
fi
|
||||
@ -249,7 +252,7 @@ create_symlink osxcross-cmake "$TARGET_DIR/bin/x86_64-apple-$TARGET-cmake"
|
||||
|
||||
unset MACOSX_DEPLOYMENT_TARGET
|
||||
|
||||
if [ $(osxcross-cmp ${SDK_VERSION/u/} ">=" 10.7) -eq 1 ]; then
|
||||
if [ $(osxcross-cmp $SDK_VERSION ">=" 10.7) -eq 1 ]; then
|
||||
pushd $SDK_DIR/MacOSX$SDK_VERSION.sdk &>/dev/null
|
||||
if [ ! -f "usr/include/c++/v1/vector" ]; then
|
||||
echo ""
|
||||
@ -319,7 +322,7 @@ if [ $I386_SUPPORTED -eq 0 ]; then
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [ $(osxcross-cmp ${SDK_VERSION/u/} ">=" 10.14) -eq 1 ]; then
|
||||
if [ $(osxcross-cmp $SDK_VERSION ">=" 10.14) -eq 1 ]; then
|
||||
echo "Your SDK does not support libstdc++ anymore."
|
||||
echo "Use <= 10.13 SDK if you rely on libstdc++ support."
|
||||
echo ""
|
||||
|
@ -22,6 +22,11 @@ if [ -z "$GCC_VERSION" ]; then
|
||||
#GCC_VERSION=5-20200228 # snapshot
|
||||
fi
|
||||
|
||||
if [ $(osxcross-cmp $OSX_VERSION_MIN '<=' 10.5) -eq 1 ]; then
|
||||
echo "You must build OSXCross with OSX_VERSION_MIN >= 10.6" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# GCC mirror
|
||||
GCC_MIRROR="https://mirror.koddos.net/gcc"
|
||||
|
||||
|
@ -6,6 +6,7 @@ function set_path_vars()
|
||||
{
|
||||
if [ -n "$OSXCROSS_VERSION" ]; then
|
||||
export VERSION=$OSXCROSS_VERSION
|
||||
export OSX_VERSION_MIN=$OSXCROSS_OSX_VERSION_MIN
|
||||
export TARGET=$OSXCROSS_TARGET
|
||||
export BASE_DIR=$OSXCROSS_BASE_DIR
|
||||
export TARBALL_DIR=$OSXCROSS_TARBALL_DIR
|
||||
@ -195,12 +196,6 @@ function extract()
|
||||
test -n "$OCDEBUG" && tarflags+="v"
|
||||
|
||||
case $1 in
|
||||
*.pkg)
|
||||
require cpio
|
||||
which xar &>/dev/null || exit 1
|
||||
xar -xf $1
|
||||
cat Payload | gunzip -dc | cpio -i 2>/dev/null && rm Payload
|
||||
;;
|
||||
*.tar.xz)
|
||||
xz -dc $1 | tar $tarflags -
|
||||
;;
|
||||
|
@ -844,6 +844,35 @@ bool Target::setup() {
|
||||
}
|
||||
}
|
||||
|
||||
bool isgcclibstdcxx =
|
||||
(isGCC() || (isClang() && usegcclibs && stdlib == StdLib::libstdcxx));
|
||||
|
||||
if (OSNum <= OSVersion(10, 5)) {
|
||||
bool error = false;
|
||||
bool nowarning = false;
|
||||
|
||||
if (isgcclibstdcxx) {
|
||||
err << "building for OS X '<= 10.5' with GCC (or clang++-gstdc++) "
|
||||
"is no longer supported" << err.endl();
|
||||
error = true;
|
||||
} else if (isClang()) {
|
||||
nowarning = !!getenv("OSXCROSS_NO_10_5_DEPRECATION_WARNING");
|
||||
if (!nowarning)
|
||||
warn << "building for OS X '<= 10.5' "
|
||||
"is no longer supported" << warn.endl();
|
||||
}
|
||||
|
||||
if (!nowarning)
|
||||
info << "use 'osxcross-1.1' branch instead" << info.endl();
|
||||
|
||||
if (error)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Silence 'operator new[]' warning in ld64
|
||||
if (isgcclibstdcxx)
|
||||
setenv("OSXCROSS_GCC_LIBSTDCXX", "1", 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace target
|
||||
|
Loading…
Reference in New Issue
Block a user