mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
parent
49e49b1c56
commit
379f7648c3
@ -76,7 +76,7 @@ if [ $f_res -eq 1 ]; then
|
||||
|
||||
if [ $(osxcross-cmp $OSXCROSS_SDK_VERSION "<=" 10.11) -eq 1 ]; then
|
||||
# https://github.com/tpoechtrager/osxcross/issues/178
|
||||
patch -p1 < $PATCH_DIR/compiler-rt_clock-gettime.patch
|
||||
patch -p1 < $OSXCROSS_PATCH_DIR/compiler-rt_clock-gettime.patch
|
||||
fi
|
||||
|
||||
EXTRA_MAKE_FLAGS=""
|
||||
|
@ -62,18 +62,18 @@ rm -f $OSXCROSS_TARGET_DIR/bin/*-g++*
|
||||
if [ $(osxcross-cmp $GCC_VERSION '>' 5.0.0) -eq 1 ] &&
|
||||
[ $(osxcross-cmp $GCC_VERSION '<' 5.3.0) -eq 1 ]; then
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66035
|
||||
patch -p1 < $PATCH_DIR/gcc-pr66035.patch
|
||||
patch -p1 < $OSXCROSS_PATCH_DIR/gcc-pr66035.patch
|
||||
fi
|
||||
|
||||
if [ $(osxcross-cmp $GCC_VERSION '>=' 6.1.0) -eq 1 ] &&
|
||||
[ $(osxcross-cmp $GCC_VERSION '<=' 6.3.0) -eq 1 ]; then
|
||||
# https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00129.html
|
||||
patch -p1 < $PATCH_DIR/gcc-6-buildfix.patch
|
||||
patch -p1 < $OSXCROSS_PATCH_DIR/gcc-6-buildfix.patch
|
||||
fi
|
||||
|
||||
if [ $(osxcross-cmp $GCC_VERSION '==' 6.3.0) -eq 1 ]; then
|
||||
# https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/darwin-driver.c?r1=244010&r2=244009&pathrev=244010
|
||||
patch -p1 < $PATCH_DIR/darwin-driver.c.patch
|
||||
patch -p1 < $OSXCROSS_PATCH_DIR/darwin-driver.c.patch
|
||||
fi
|
||||
|
||||
if [ $(osxcross-cmp $OSXCROSS_SDK_VERSION '>=' 10.14) -eq 1 ] &&
|
||||
@ -152,7 +152,7 @@ GCC_VERSION=`echo $GCC_VERSION | tr '-' ' ' | awk '{print $1}'`
|
||||
pushd $OSXCROSS_TARGET_DIR/x86_64-apple-$OSXCROSS_TARGET/include &>/dev/null
|
||||
pushd c++/${GCC_VERSION}* &>/dev/null
|
||||
|
||||
cat $OSXCROSS_TARGET_DIR/../patches/libstdcxx.patch | \
|
||||
cat $OSXCROSS_PATCH_DIR/libstdcxx.patch | \
|
||||
$SED "s/darwin13/$OSXCROSS_TARGET/g" | \
|
||||
patch -p0 -l &>/dev/null || true
|
||||
|
||||
|
@ -6,7 +6,7 @@ BASE_DIR=$PWD
|
||||
|
||||
TARBALL_DIR=$BASE_DIR/tarballs
|
||||
BUILD_DIR=$BASE_DIR/build
|
||||
TARGET_DIR=$BASE_DIR/target
|
||||
TARGET_DIR=${TARGET_DIR:-$BASE_DIR/target}
|
||||
TARGET_DIR_SDK_TOOLS=$TARGET_DIR/SDK/tools
|
||||
PATCH_DIR=$BASE_DIR/patches
|
||||
SDK_DIR=$TARGET_DIR/SDK
|
||||
@ -122,7 +122,7 @@ function guess_sdk_version()
|
||||
for sdk in $sdks; do echo $sdk; done
|
||||
echo 'more than one MacOSX SDK tarball found. please set'
|
||||
echo 'SDK_VERSION environment variable for the one you want'
|
||||
echo '(for example: SDK_VERSION=10.x [OSX_VERSION_MIN=10.x] ./build.sh)'
|
||||
echo '(for example: SDK_VERSION=10.x [OSX_VERSION_MIN=10.x] [TARGET_DIR=...] ./build.sh)'
|
||||
exit 1
|
||||
else
|
||||
sdk=$(find -L tarballs/ -type f | grep MacOSX)
|
||||
|
@ -31,7 +31,12 @@ int conf(Target &target) {
|
||||
std::string SDKPath;
|
||||
OSVersion OSXVersionMin = getDefaultMinTarget();
|
||||
const char *ltopath = getLibLTOPath();
|
||||
const char *builddir = getBuildDir();
|
||||
std::string BuildDir = getBuildDir();
|
||||
|
||||
if (BuildDir.empty()) {
|
||||
BuildDir += target.execpath;
|
||||
BuildDir += "/../../build";
|
||||
}
|
||||
|
||||
if (!target.getSDKPath(SDKPath))
|
||||
return 1;
|
||||
@ -52,24 +57,16 @@ int conf(Target &target) {
|
||||
<< std::endl;
|
||||
std::cout << "export OSXCROSS_SDK=" << SDKPath
|
||||
<< std::endl;
|
||||
std::cout << "export OSXCROSS_TARBALL_DIR=" << target.execpath
|
||||
<< "/../../tarballs"
|
||||
std::cout << "export OSXCROSS_TARBALL_DIR=" << BuildDir.c_str()
|
||||
<< "/../tarballs"
|
||||
<< std::endl;
|
||||
std::cout << "export OSXCROSS_PATCH_DIR=" << target.execpath
|
||||
<< "/../../patches"
|
||||
std::cout << "export OSXCROSS_PATCH_DIR=" << BuildDir.c_str()
|
||||
<< "/../patches"
|
||||
<< std::endl;
|
||||
std::cout << "export OSXCROSS_TARGET_DIR=" << target.execpath << "/.."
|
||||
<< std::endl;
|
||||
|
||||
std::cout << "export OSXCROSS_BUILD_DIR=";
|
||||
|
||||
if (builddir[0])
|
||||
std::cout << builddir;
|
||||
else
|
||||
std::cout << target.execpath << "/../../build";
|
||||
|
||||
std::cout << std::endl;
|
||||
|
||||
std::cout << "export OSXCROSS_BUILD_DIR=" << BuildDir.c_str()
|
||||
<< std::endl;
|
||||
std::cout << "export OSXCROSS_CCTOOLS_PATH=" << target.execpath
|
||||
<< std::endl;
|
||||
std::cout << "export OSXCROSS_LIBLTO_PATH=" << ltopath
|
||||
|
Loading…
Reference in New Issue
Block a user