osxcross/build.sh

372 lines
9.1 KiB
Bash
Raw Normal View History

2013-11-10 17:49:24 +04:00
#!/usr/bin/env bash
pushd "${0%/*}" &>/dev/null
source tools/tools.sh
2013-11-10 17:49:24 +04:00
# find sdk version to use
function guess_sdk_version()
{
2014-04-06 17:58:15 +04:00
tmp1=
tmp2=
tmp3=
file=
sdk=
guess_sdk_version_result=
sdkcount=$(find -L tarballs/ -type f | grep MacOSX | wc -l)
2014-04-06 17:58:15 +04:00
if [ $sdkcount -eq 0 ]; then
echo no SDK found in 'tarballs/'. please see README.md
exit 1
elif [ $sdkcount -gt 1 ]; then
sdks=$(find -L tarballs/ -type f | grep MacOSX)
2014-04-06 17:58:15 +04:00
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)'
exit 1
else
sdk=$(find -L tarballs/ -type f | grep MacOSX)
2015-07-20 22:13:36 +03:00
tmp2=$(echo ${sdk/bz2/} | $SED s/[^0-9.]//g)
tmp3=$(echo $tmp2 | $SED s/\\\.*$//g)
2014-04-06 17:58:15 +04:00
guess_sdk_version_result=$tmp3
echo 'found SDK version' $guess_sdk_version_result 'at tarballs/'$(basename $sdk)
2014-04-06 17:58:15 +04:00
fi
if [ $guess_sdk_version_result ]; then
if [ $guess_sdk_version_result = 10.4 ]; then
guess_sdk_version_result=10.4u
fi
2014-04-06 17:58:15 +04:00
fi
export guess_sdk_version_result
}
# make sure there is actually a file with the given SDK_VERSION
function verify_sdk_version()
{
2014-04-06 17:58:15 +04:00
sdkv=$1
for file in tarballs/*; do
if [ -f "$file" ] && [ $(echo $file | grep OSX.*$sdkv) ]; then
2014-04-06 17:58:15 +04:00
echo "verified at "$file
sdk=$file
fi
2014-04-06 17:58:15 +04:00
done
if [ ! $sdk ] ; then
echo cant find SDK for OSX $sdkv in tarballs. exiting
exit
fi
}
if [ $SDK_VERSION ]; then
2014-04-06 17:58:15 +04:00
echo 'SDK VERSION set in environment variable:' $SDK_VERSION
test $SDK_VERSION = 10.4 && SDK_VERSION=10.4u
else
2014-04-06 17:58:15 +04:00
guess_sdk_version
SDK_VERSION=$guess_sdk_version_result
fi
verify_sdk_version $SDK_VERSION
2013-11-10 17:49:24 +04:00
# Minimum targeted OS X version
# Must be <= SDK_VERSION
if [ -z "$OSX_VERSION_MIN" ]; then
2014-04-06 17:58:15 +04:00
if [ $SDK_VERSION = 10.4u ]; then
OSX_VERSION_MIN=10.4
else
OSX_VERSION_MIN=10.5
fi
fi
2013-11-10 17:49:24 +04:00
OSXCROSS_VERSION=0.10
2013-11-10 17:49:24 +04:00
X86_64H_SUPPORTED=0
2013-11-10 17:49:24 +04:00
case $SDK_VERSION in
2014-04-06 17:58:15 +04:00
10.4*) TARGET=darwin8 ;;
10.5*) TARGET=darwin9 ;;
10.6*) TARGET=darwin10 ;;
10.7*) TARGET=darwin11 ;;
10.8*) TARGET=darwin12; X86_64H_SUPPORTED=1; ;;
10.9*) TARGET=darwin13; X86_64H_SUPPORTED=1; ;;
10.10*) TARGET=darwin14; X86_64H_SUPPORTED=1; ;;
2014-04-06 17:58:15 +04:00
*) echo "Invalid SDK Version" && exit 1 ;;
2013-11-10 17:49:24 +04:00
esac
export TARGET
2013-11-10 17:49:24 +04:00
echo ""
echo "Building OSXCross toolchain, Version: $OSXCROSS_VERSION"
2013-11-10 17:49:24 +04:00
echo ""
echo "OS X SDK Version: $SDK_VERSION, Target: $TARGET"
echo "Minimum targeted OS X Version: $OSX_VERSION_MIN"
echo "Tarball Directory: $TARBALL_DIR"
echo "Build Directory: $BUILD_DIR"
echo "Install Directory: $TARGET_DIR"
echo "SDK Install Directory: $SDK_DIR"
if [ -z "$UNATTENDED" ]; then
echo ""
read -p "Press enter to start building"
fi
2013-11-10 17:49:24 +04:00
echo ""
export PATH=$TARGET_DIR/bin:$PATH
mkdir -p $BUILD_DIR
mkdir -p $TARGET_DIR
mkdir -p $SDK_DIR
2013-11-10 17:49:24 +04:00
require $CC
require $CXX
update cctools to 870 and ld64 to 242 OSXCross *should* now work on Linux ARM devices with this update. Port changes: * commit f7818cbf61074ea6fbb56de1b50c0973afe3428f | Author: Thomas Pöchtrager | Date: Fri Jul 17 19:34:57 2015 +0200 | | add preliminary llvm-3.8 support | * commit 8482a95745f54062de974e65fdd28b0389f3c6a5 | Author: Thomas Pöchtrager | Date: Sat Jul 11 09:32:55 2015 +0200 | | * get rid of the openssl dependency | * make libuuid optional (based on http://git.io/vqbwu) | * commit a8e002367d64c5e3e3a195bba37aa1ccb306f897 | Author: Thomas Pöchtrager | Date: Sat Jul 11 08:45:49 2015 +0200 | | * undo unnecessary changes done by the original porter | * add cctools-port comments to changed code | * add codelite project | * commit 2b050dc41d1ae375a5af36b751d479be4513a6f3 | Author: Thomas Pöchtrager | Date: Tue Jun 23 19:31:00 2015 +0200 | | ios-toolchain: remove 'CC=cc' - just causes troubles | * commit f7f7c6180e5b7ae2897e3617e3475811c88a5173 | Author: Thomas Pöchtrager | Date: Sat May 30 15:51:27 2015 +0200 | | silence gcc 5.1 warnings | * commit 359b40b5bd40d86e0d1c9d40fb7bb2297130e903 | Author: Thomas Pöchtrager | Date: Sun Apr 19 21:33:15 2015 +0200 | | use KERN_PROC_ARGV instead of KERN_PROC_ENV | * commit 7a9b23fbb24c7250cb4caae2d97b79afbdefe503 | Author: Thomas Pöchtrager | Date: Sun Apr 19 20:35:01 2015 +0200 | | _NSGetExecutablePath() should now work properly on openbsd | * commit 47c29e6a7701a16268da57412a68e133818a32dd | Author: Thomas Pöchtrager | Date: Sat Apr 11 18:34:58 2015 +0200 | | clang 3.6 miscompiles ld64 on armhf (even at -O0); enforce gcc on arm until | i can figure out what's going on there | | probably related: | https://github.com/raspberrypi/linux/issues/766 | https://github.com/tpoechtrager/cctools-port/issues/1#issuecomment-59118615 | | backtrace: | | https://gist.github.com/tpoechtrager/d68c8352a3fd32165af4 | * commit 5e5b511a3eebd3fa9ece49bead85a1be29a25dfb | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:28:44 2015 +0100 | | fix more potential -D_FORTIFY_SOURCE crashers | * commit 5098fc9f6dfba7eac18f5ae55b7e361314e0fb7b | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:14:13 2015 +0100 | | strip: don't crash with -D_FORTIFY_SOURCE enabled (ubuntu gcc) | * commit 268c3de73b173673dc9ae932ab802f42247570ff | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:21 2015 +0100 | | add arm to the tested host architectures | * commit ade8d819ad8fd2d04978a2da22e5efe06dc40dad | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:06 2015 +0100 | | ios-toolchain: set COMPILER_PATH | * commit 700c6fd644f78b9427163e9f444fc15f2c73ed28 | Author: Thomas Pöchtrager | Date: Wed Mar 18 20:28:27 2015 +0100 | | configure.ac: target_cpu -> host_cpu | * commit bf9ac6a2c5846af3c2112c483a612937d8e3a037 | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Sun Mar 15 22:43:36 2015 +0100 | | update README | * commit 253ec0ff238ebc3b359d7f4fe2edc38b0aa3e428 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:26:45 2015 +0100 | | typo | * commit 42109667d4b080bbc8091235c036ed418d369d13 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:21:16 2015 +0100 | | * linux ppc/ppc64 & arm/arm64/aarch64 port | (compiles now - everything else is *untested*) | | other changes: | | * rename 'machochecker' to 'machocheck' | * get rid of duplicate $CFLAGS | * fix a typo in the ios toolchain README | * package.sh: remove the autom4te.cache directory | * commit 0c32be78e979641095a92480786a621e65282b92 | Author: Thomas Pöchtrager | Date: Mon Mar 9 20:01:33 2015 +0100 | | misc fixes: | * fix gcc warnings (even though they are not my fault) | * fix a typo in include/foreign/i386/_types.h (__INT64_TYPE_ -> __INT64_TYPE__) | * fix the cygwin + clang<=3.4 build | * commit 3f00c16b0fce9a7a151a88114209f17a46711637 | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:49:50 2015 +0100 | | be more precise about the gcc requirement | * commit 1b9a93057b856c92190f3f8d32e507539f4669cd | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:09:11 2015 +0100 | | update README | * commit 3cc1ba6fc7c862de258e7a29c840ea7d5eb04be1 | Author: Thomas Pöchtrager | Date: Sun Mar 8 17:47:09 2015 +0100 | | * windows (cygwin), openbsd and dragonflybsd port | * gcc compiler support | * add --with-llvm-config option | * fix 'ld: malformed 32-bit x.y.z version number: 3.19.0-7-generic' | * commit 7a2d21ca7f4e42c70c8ff85ec3e37ac6ef9d0de7 | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:58:10 2015 +0100 | | map -> version-script | * commit 5135fb2541876f0af185589890f9e21b98ceb39c | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:49:55 2015 +0100 | | an attempt to fix the otool disassembler | * commit 219f5f53ea42361ccb2c75bed311f1d57ce68966 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:47 2015 +0100 | | ar, lipo, otool (etc.) should also be linked with -rpath for libLTO | * commit 1efff3733f1cb483b27e18d6d14cd7ccf5571627 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:11 2015 +0100 | | add support for llvm 3.7 | * commit 8b6beadd337ac7e5d1d58d438e9afcd5165d1200 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:31:34 2015 +0100 | | silence/fix -Wabsolute-value warnings | * commit 59d21d2c793c51d205c8b4ab14b9b28e63c72445 (tag: 862-ld64-241.9-2) | Author: Thomas Pöchtrager | Date: Sun Dec 28 18:09:43 2014 +0100 | | ios-toolchain: build.sh: ignore 'git clean' return status | * commit 3d198530ae4c031e904f29414c7c46ac547d90b7 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:45 2014 +0100 | | ios-toolchain: take care of IPHONEOS_DEPLOYMENT_TARGET (env) | * commit 23658f2f20778374b43dcd80717b4f47845c2297 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:28 2014 +0100 | | the ios 8.1 sdk has mach_vm_trunc_page and mach_vm_round_page already defined | * commit 70b87ceec059f632641b41dfd2d9e63dbd069a0c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:33:50 2014 +0100 | | ios-toolchain: cleanup | * commit 9c0f520110f7f57a1060ac66329c55f8f71ecd8c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:25:26 2014 +0100 | | ios-toolchain: use -mlinker-version=241.9 in the 241.9 branch | * commit 8b0cbdaf820ee40fcb1e2e209cb6f858ffb8aa90 | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:00:19 2014 +0100 | | strchr -> strrchr | * commit e9f701822aa209cf435c4b26eb4c7ab01001f5cb | Author: Thomas Pöchtrager | Date: Sat Dec 27 11:47:02 2014 +0100 | | add scripts / wrapper to build a simple ios toolchain | * commit cf456225d3551a8782c5222133455bb9139ecad5 | Author: Thomas Pöchtrager | Date: Fri Dec 26 10:55:34 2014 +0100 | | define _GNU_SOURCE for strnlen() | * commit 211fe3927f5d6c132d72164e898d146fcdf7577e | Author: sezero <sezero@users.noreply.github.com> | Date: Wed Dec 24 12:20:01 2014 +0200 | | autogen.sh fixes: run libtoolize 'after' creating the m4 directory. run aclocal with '-I m4' switches. | * commit a4f9fd8ad09cafb94bf465ae4e914f086458e5cc | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Wed Dec 24 11:35:37 2014 +0100 | | Update README.md | * commit 2201b7b4cbc3a3b29aa7d8e7ccf2576f1847a3e6 | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:58:16 2014 +0100 | | add '-L/usr/pkg/lib' for NetBSD | * commit a303cc27ace751059caa27a34e5d9ae5cd0825ac | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:10:18 2014 +0100 | | update README |
2015-07-18 00:25:59 +03:00
2013-11-10 17:49:24 +04:00
require clang
require patch
require gunzip
2014-04-14 23:59:03 +04:00
pushd $BUILD_DIR &>/dev/null
2013-11-10 17:49:24 +04:00
function remove_locks()
{
2014-04-06 17:58:15 +04:00
rm -rf $BUILD_DIR/have_cctools*
}
source $BASE_DIR/tools/trap_exit.sh
2014-04-14 23:59:03 +04:00
# CCTOOLS
if [ "$PLATFORM" == "Darwin" ]; then
PREVCXX=$CXX
CXX+=" -stdlib=libc++"
fi
update cctools to 870 and ld64 to 242 OSXCross *should* now work on Linux ARM devices with this update. Port changes: * commit f7818cbf61074ea6fbb56de1b50c0973afe3428f | Author: Thomas Pöchtrager | Date: Fri Jul 17 19:34:57 2015 +0200 | | add preliminary llvm-3.8 support | * commit 8482a95745f54062de974e65fdd28b0389f3c6a5 | Author: Thomas Pöchtrager | Date: Sat Jul 11 09:32:55 2015 +0200 | | * get rid of the openssl dependency | * make libuuid optional (based on http://git.io/vqbwu) | * commit a8e002367d64c5e3e3a195bba37aa1ccb306f897 | Author: Thomas Pöchtrager | Date: Sat Jul 11 08:45:49 2015 +0200 | | * undo unnecessary changes done by the original porter | * add cctools-port comments to changed code | * add codelite project | * commit 2b050dc41d1ae375a5af36b751d479be4513a6f3 | Author: Thomas Pöchtrager | Date: Tue Jun 23 19:31:00 2015 +0200 | | ios-toolchain: remove 'CC=cc' - just causes troubles | * commit f7f7c6180e5b7ae2897e3617e3475811c88a5173 | Author: Thomas Pöchtrager | Date: Sat May 30 15:51:27 2015 +0200 | | silence gcc 5.1 warnings | * commit 359b40b5bd40d86e0d1c9d40fb7bb2297130e903 | Author: Thomas Pöchtrager | Date: Sun Apr 19 21:33:15 2015 +0200 | | use KERN_PROC_ARGV instead of KERN_PROC_ENV | * commit 7a9b23fbb24c7250cb4caae2d97b79afbdefe503 | Author: Thomas Pöchtrager | Date: Sun Apr 19 20:35:01 2015 +0200 | | _NSGetExecutablePath() should now work properly on openbsd | * commit 47c29e6a7701a16268da57412a68e133818a32dd | Author: Thomas Pöchtrager | Date: Sat Apr 11 18:34:58 2015 +0200 | | clang 3.6 miscompiles ld64 on armhf (even at -O0); enforce gcc on arm until | i can figure out what's going on there | | probably related: | https://github.com/raspberrypi/linux/issues/766 | https://github.com/tpoechtrager/cctools-port/issues/1#issuecomment-59118615 | | backtrace: | | https://gist.github.com/tpoechtrager/d68c8352a3fd32165af4 | * commit 5e5b511a3eebd3fa9ece49bead85a1be29a25dfb | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:28:44 2015 +0100 | | fix more potential -D_FORTIFY_SOURCE crashers | * commit 5098fc9f6dfba7eac18f5ae55b7e361314e0fb7b | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:14:13 2015 +0100 | | strip: don't crash with -D_FORTIFY_SOURCE enabled (ubuntu gcc) | * commit 268c3de73b173673dc9ae932ab802f42247570ff | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:21 2015 +0100 | | add arm to the tested host architectures | * commit ade8d819ad8fd2d04978a2da22e5efe06dc40dad | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:06 2015 +0100 | | ios-toolchain: set COMPILER_PATH | * commit 700c6fd644f78b9427163e9f444fc15f2c73ed28 | Author: Thomas Pöchtrager | Date: Wed Mar 18 20:28:27 2015 +0100 | | configure.ac: target_cpu -> host_cpu | * commit bf9ac6a2c5846af3c2112c483a612937d8e3a037 | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Sun Mar 15 22:43:36 2015 +0100 | | update README | * commit 253ec0ff238ebc3b359d7f4fe2edc38b0aa3e428 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:26:45 2015 +0100 | | typo | * commit 42109667d4b080bbc8091235c036ed418d369d13 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:21:16 2015 +0100 | | * linux ppc/ppc64 & arm/arm64/aarch64 port | (compiles now - everything else is *untested*) | | other changes: | | * rename 'machochecker' to 'machocheck' | * get rid of duplicate $CFLAGS | * fix a typo in the ios toolchain README | * package.sh: remove the autom4te.cache directory | * commit 0c32be78e979641095a92480786a621e65282b92 | Author: Thomas Pöchtrager | Date: Mon Mar 9 20:01:33 2015 +0100 | | misc fixes: | * fix gcc warnings (even though they are not my fault) | * fix a typo in include/foreign/i386/_types.h (__INT64_TYPE_ -> __INT64_TYPE__) | * fix the cygwin + clang<=3.4 build | * commit 3f00c16b0fce9a7a151a88114209f17a46711637 | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:49:50 2015 +0100 | | be more precise about the gcc requirement | * commit 1b9a93057b856c92190f3f8d32e507539f4669cd | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:09:11 2015 +0100 | | update README | * commit 3cc1ba6fc7c862de258e7a29c840ea7d5eb04be1 | Author: Thomas Pöchtrager | Date: Sun Mar 8 17:47:09 2015 +0100 | | * windows (cygwin), openbsd and dragonflybsd port | * gcc compiler support | * add --with-llvm-config option | * fix 'ld: malformed 32-bit x.y.z version number: 3.19.0-7-generic' | * commit 7a2d21ca7f4e42c70c8ff85ec3e37ac6ef9d0de7 | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:58:10 2015 +0100 | | map -> version-script | * commit 5135fb2541876f0af185589890f9e21b98ceb39c | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:49:55 2015 +0100 | | an attempt to fix the otool disassembler | * commit 219f5f53ea42361ccb2c75bed311f1d57ce68966 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:47 2015 +0100 | | ar, lipo, otool (etc.) should also be linked with -rpath for libLTO | * commit 1efff3733f1cb483b27e18d6d14cd7ccf5571627 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:11 2015 +0100 | | add support for llvm 3.7 | * commit 8b6beadd337ac7e5d1d58d438e9afcd5165d1200 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:31:34 2015 +0100 | | silence/fix -Wabsolute-value warnings | * commit 59d21d2c793c51d205c8b4ab14b9b28e63c72445 (tag: 862-ld64-241.9-2) | Author: Thomas Pöchtrager | Date: Sun Dec 28 18:09:43 2014 +0100 | | ios-toolchain: build.sh: ignore 'git clean' return status | * commit 3d198530ae4c031e904f29414c7c46ac547d90b7 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:45 2014 +0100 | | ios-toolchain: take care of IPHONEOS_DEPLOYMENT_TARGET (env) | * commit 23658f2f20778374b43dcd80717b4f47845c2297 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:28 2014 +0100 | | the ios 8.1 sdk has mach_vm_trunc_page and mach_vm_round_page already defined | * commit 70b87ceec059f632641b41dfd2d9e63dbd069a0c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:33:50 2014 +0100 | | ios-toolchain: cleanup | * commit 9c0f520110f7f57a1060ac66329c55f8f71ecd8c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:25:26 2014 +0100 | | ios-toolchain: use -mlinker-version=241.9 in the 241.9 branch | * commit 8b0cbdaf820ee40fcb1e2e209cb6f858ffb8aa90 | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:00:19 2014 +0100 | | strchr -> strrchr | * commit e9f701822aa209cf435c4b26eb4c7ab01001f5cb | Author: Thomas Pöchtrager | Date: Sat Dec 27 11:47:02 2014 +0100 | | add scripts / wrapper to build a simple ios toolchain | * commit cf456225d3551a8782c5222133455bb9139ecad5 | Author: Thomas Pöchtrager | Date: Fri Dec 26 10:55:34 2014 +0100 | | define _GNU_SOURCE for strnlen() | * commit 211fe3927f5d6c132d72164e898d146fcdf7577e | Author: sezero <sezero@users.noreply.github.com> | Date: Wed Dec 24 12:20:01 2014 +0200 | | autogen.sh fixes: run libtoolize 'after' creating the m4 directory. run aclocal with '-I m4' switches. | * commit a4f9fd8ad09cafb94bf465ae4e914f086458e5cc | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Wed Dec 24 11:35:37 2014 +0100 | | Update README.md | * commit 2201b7b4cbc3a3b29aa7d8e7ccf2576f1847a3e6 | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:58:16 2014 +0100 | | add '-L/usr/pkg/lib' for NetBSD | * commit a303cc27ace751059caa27a34e5d9ae5cd0825ac | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:10:18 2014 +0100 | | update README |
2015-07-18 00:25:59 +03:00
res=$(check_cxx_stdlib)
if [ "$PLATFORM" == "Darwin" ]; then
CXX=$PREVCXX
unset PREVCXX
fi
if [ $res -ne 0 ]; then
update cctools to 870 and ld64 to 242 OSXCross *should* now work on Linux ARM devices with this update. Port changes: * commit f7818cbf61074ea6fbb56de1b50c0973afe3428f | Author: Thomas Pöchtrager | Date: Fri Jul 17 19:34:57 2015 +0200 | | add preliminary llvm-3.8 support | * commit 8482a95745f54062de974e65fdd28b0389f3c6a5 | Author: Thomas Pöchtrager | Date: Sat Jul 11 09:32:55 2015 +0200 | | * get rid of the openssl dependency | * make libuuid optional (based on http://git.io/vqbwu) | * commit a8e002367d64c5e3e3a195bba37aa1ccb306f897 | Author: Thomas Pöchtrager | Date: Sat Jul 11 08:45:49 2015 +0200 | | * undo unnecessary changes done by the original porter | * add cctools-port comments to changed code | * add codelite project | * commit 2b050dc41d1ae375a5af36b751d479be4513a6f3 | Author: Thomas Pöchtrager | Date: Tue Jun 23 19:31:00 2015 +0200 | | ios-toolchain: remove 'CC=cc' - just causes troubles | * commit f7f7c6180e5b7ae2897e3617e3475811c88a5173 | Author: Thomas Pöchtrager | Date: Sat May 30 15:51:27 2015 +0200 | | silence gcc 5.1 warnings | * commit 359b40b5bd40d86e0d1c9d40fb7bb2297130e903 | Author: Thomas Pöchtrager | Date: Sun Apr 19 21:33:15 2015 +0200 | | use KERN_PROC_ARGV instead of KERN_PROC_ENV | * commit 7a9b23fbb24c7250cb4caae2d97b79afbdefe503 | Author: Thomas Pöchtrager | Date: Sun Apr 19 20:35:01 2015 +0200 | | _NSGetExecutablePath() should now work properly on openbsd | * commit 47c29e6a7701a16268da57412a68e133818a32dd | Author: Thomas Pöchtrager | Date: Sat Apr 11 18:34:58 2015 +0200 | | clang 3.6 miscompiles ld64 on armhf (even at -O0); enforce gcc on arm until | i can figure out what's going on there | | probably related: | https://github.com/raspberrypi/linux/issues/766 | https://github.com/tpoechtrager/cctools-port/issues/1#issuecomment-59118615 | | backtrace: | | https://gist.github.com/tpoechtrager/d68c8352a3fd32165af4 | * commit 5e5b511a3eebd3fa9ece49bead85a1be29a25dfb | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:28:44 2015 +0100 | | fix more potential -D_FORTIFY_SOURCE crashers | * commit 5098fc9f6dfba7eac18f5ae55b7e361314e0fb7b | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:14:13 2015 +0100 | | strip: don't crash with -D_FORTIFY_SOURCE enabled (ubuntu gcc) | * commit 268c3de73b173673dc9ae932ab802f42247570ff | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:21 2015 +0100 | | add arm to the tested host architectures | * commit ade8d819ad8fd2d04978a2da22e5efe06dc40dad | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:06 2015 +0100 | | ios-toolchain: set COMPILER_PATH | * commit 700c6fd644f78b9427163e9f444fc15f2c73ed28 | Author: Thomas Pöchtrager | Date: Wed Mar 18 20:28:27 2015 +0100 | | configure.ac: target_cpu -> host_cpu | * commit bf9ac6a2c5846af3c2112c483a612937d8e3a037 | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Sun Mar 15 22:43:36 2015 +0100 | | update README | * commit 253ec0ff238ebc3b359d7f4fe2edc38b0aa3e428 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:26:45 2015 +0100 | | typo | * commit 42109667d4b080bbc8091235c036ed418d369d13 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:21:16 2015 +0100 | | * linux ppc/ppc64 & arm/arm64/aarch64 port | (compiles now - everything else is *untested*) | | other changes: | | * rename 'machochecker' to 'machocheck' | * get rid of duplicate $CFLAGS | * fix a typo in the ios toolchain README | * package.sh: remove the autom4te.cache directory | * commit 0c32be78e979641095a92480786a621e65282b92 | Author: Thomas Pöchtrager | Date: Mon Mar 9 20:01:33 2015 +0100 | | misc fixes: | * fix gcc warnings (even though they are not my fault) | * fix a typo in include/foreign/i386/_types.h (__INT64_TYPE_ -> __INT64_TYPE__) | * fix the cygwin + clang<=3.4 build | * commit 3f00c16b0fce9a7a151a88114209f17a46711637 | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:49:50 2015 +0100 | | be more precise about the gcc requirement | * commit 1b9a93057b856c92190f3f8d32e507539f4669cd | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:09:11 2015 +0100 | | update README | * commit 3cc1ba6fc7c862de258e7a29c840ea7d5eb04be1 | Author: Thomas Pöchtrager | Date: Sun Mar 8 17:47:09 2015 +0100 | | * windows (cygwin), openbsd and dragonflybsd port | * gcc compiler support | * add --with-llvm-config option | * fix 'ld: malformed 32-bit x.y.z version number: 3.19.0-7-generic' | * commit 7a2d21ca7f4e42c70c8ff85ec3e37ac6ef9d0de7 | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:58:10 2015 +0100 | | map -> version-script | * commit 5135fb2541876f0af185589890f9e21b98ceb39c | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:49:55 2015 +0100 | | an attempt to fix the otool disassembler | * commit 219f5f53ea42361ccb2c75bed311f1d57ce68966 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:47 2015 +0100 | | ar, lipo, otool (etc.) should also be linked with -rpath for libLTO | * commit 1efff3733f1cb483b27e18d6d14cd7ccf5571627 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:11 2015 +0100 | | add support for llvm 3.7 | * commit 8b6beadd337ac7e5d1d58d438e9afcd5165d1200 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:31:34 2015 +0100 | | silence/fix -Wabsolute-value warnings | * commit 59d21d2c793c51d205c8b4ab14b9b28e63c72445 (tag: 862-ld64-241.9-2) | Author: Thomas Pöchtrager | Date: Sun Dec 28 18:09:43 2014 +0100 | | ios-toolchain: build.sh: ignore 'git clean' return status | * commit 3d198530ae4c031e904f29414c7c46ac547d90b7 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:45 2014 +0100 | | ios-toolchain: take care of IPHONEOS_DEPLOYMENT_TARGET (env) | * commit 23658f2f20778374b43dcd80717b4f47845c2297 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:28 2014 +0100 | | the ios 8.1 sdk has mach_vm_trunc_page and mach_vm_round_page already defined | * commit 70b87ceec059f632641b41dfd2d9e63dbd069a0c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:33:50 2014 +0100 | | ios-toolchain: cleanup | * commit 9c0f520110f7f57a1060ac66329c55f8f71ecd8c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:25:26 2014 +0100 | | ios-toolchain: use -mlinker-version=241.9 in the 241.9 branch | * commit 8b0cbdaf820ee40fcb1e2e209cb6f858ffb8aa90 | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:00:19 2014 +0100 | | strchr -> strrchr | * commit e9f701822aa209cf435c4b26eb4c7ab01001f5cb | Author: Thomas Pöchtrager | Date: Sat Dec 27 11:47:02 2014 +0100 | | add scripts / wrapper to build a simple ios toolchain | * commit cf456225d3551a8782c5222133455bb9139ecad5 | Author: Thomas Pöchtrager | Date: Fri Dec 26 10:55:34 2014 +0100 | | define _GNU_SOURCE for strnlen() | * commit 211fe3927f5d6c132d72164e898d146fcdf7577e | Author: sezero <sezero@users.noreply.github.com> | Date: Wed Dec 24 12:20:01 2014 +0200 | | autogen.sh fixes: run libtoolize 'after' creating the m4 directory. run aclocal with '-I m4' switches. | * commit a4f9fd8ad09cafb94bf465ae4e914f086458e5cc | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Wed Dec 24 11:35:37 2014 +0100 | | Update README.md | * commit 2201b7b4cbc3a3b29aa7d8e7ccf2576f1847a3e6 | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:58:16 2014 +0100 | | add '-L/usr/pkg/lib' for NetBSD | * commit a303cc27ace751059caa27a34e5d9ae5cd0825ac | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:10:18 2014 +0100 | | update README |
2015-07-18 00:25:59 +03:00
echo "Your C++ standard library is either broken or too old to build ld64-241.9" 1>&2
echo "Building ld64-134.9 instead" 1>&2
echo "" 1>&2
sleep 3
LINKER_VERSION=134.9
else
update cctools to 870 and ld64 to 242 OSXCross *should* now work on Linux ARM devices with this update. Port changes: * commit f7818cbf61074ea6fbb56de1b50c0973afe3428f | Author: Thomas Pöchtrager | Date: Fri Jul 17 19:34:57 2015 +0200 | | add preliminary llvm-3.8 support | * commit 8482a95745f54062de974e65fdd28b0389f3c6a5 | Author: Thomas Pöchtrager | Date: Sat Jul 11 09:32:55 2015 +0200 | | * get rid of the openssl dependency | * make libuuid optional (based on http://git.io/vqbwu) | * commit a8e002367d64c5e3e3a195bba37aa1ccb306f897 | Author: Thomas Pöchtrager | Date: Sat Jul 11 08:45:49 2015 +0200 | | * undo unnecessary changes done by the original porter | * add cctools-port comments to changed code | * add codelite project | * commit 2b050dc41d1ae375a5af36b751d479be4513a6f3 | Author: Thomas Pöchtrager | Date: Tue Jun 23 19:31:00 2015 +0200 | | ios-toolchain: remove 'CC=cc' - just causes troubles | * commit f7f7c6180e5b7ae2897e3617e3475811c88a5173 | Author: Thomas Pöchtrager | Date: Sat May 30 15:51:27 2015 +0200 | | silence gcc 5.1 warnings | * commit 359b40b5bd40d86e0d1c9d40fb7bb2297130e903 | Author: Thomas Pöchtrager | Date: Sun Apr 19 21:33:15 2015 +0200 | | use KERN_PROC_ARGV instead of KERN_PROC_ENV | * commit 7a9b23fbb24c7250cb4caae2d97b79afbdefe503 | Author: Thomas Pöchtrager | Date: Sun Apr 19 20:35:01 2015 +0200 | | _NSGetExecutablePath() should now work properly on openbsd | * commit 47c29e6a7701a16268da57412a68e133818a32dd | Author: Thomas Pöchtrager | Date: Sat Apr 11 18:34:58 2015 +0200 | | clang 3.6 miscompiles ld64 on armhf (even at -O0); enforce gcc on arm until | i can figure out what's going on there | | probably related: | https://github.com/raspberrypi/linux/issues/766 | https://github.com/tpoechtrager/cctools-port/issues/1#issuecomment-59118615 | | backtrace: | | https://gist.github.com/tpoechtrager/d68c8352a3fd32165af4 | * commit 5e5b511a3eebd3fa9ece49bead85a1be29a25dfb | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:28:44 2015 +0100 | | fix more potential -D_FORTIFY_SOURCE crashers | * commit 5098fc9f6dfba7eac18f5ae55b7e361314e0fb7b | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:14:13 2015 +0100 | | strip: don't crash with -D_FORTIFY_SOURCE enabled (ubuntu gcc) | * commit 268c3de73b173673dc9ae932ab802f42247570ff | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:21 2015 +0100 | | add arm to the tested host architectures | * commit ade8d819ad8fd2d04978a2da22e5efe06dc40dad | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:06 2015 +0100 | | ios-toolchain: set COMPILER_PATH | * commit 700c6fd644f78b9427163e9f444fc15f2c73ed28 | Author: Thomas Pöchtrager | Date: Wed Mar 18 20:28:27 2015 +0100 | | configure.ac: target_cpu -> host_cpu | * commit bf9ac6a2c5846af3c2112c483a612937d8e3a037 | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Sun Mar 15 22:43:36 2015 +0100 | | update README | * commit 253ec0ff238ebc3b359d7f4fe2edc38b0aa3e428 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:26:45 2015 +0100 | | typo | * commit 42109667d4b080bbc8091235c036ed418d369d13 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:21:16 2015 +0100 | | * linux ppc/ppc64 & arm/arm64/aarch64 port | (compiles now - everything else is *untested*) | | other changes: | | * rename 'machochecker' to 'machocheck' | * get rid of duplicate $CFLAGS | * fix a typo in the ios toolchain README | * package.sh: remove the autom4te.cache directory | * commit 0c32be78e979641095a92480786a621e65282b92 | Author: Thomas Pöchtrager | Date: Mon Mar 9 20:01:33 2015 +0100 | | misc fixes: | * fix gcc warnings (even though they are not my fault) | * fix a typo in include/foreign/i386/_types.h (__INT64_TYPE_ -> __INT64_TYPE__) | * fix the cygwin + clang<=3.4 build | * commit 3f00c16b0fce9a7a151a88114209f17a46711637 | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:49:50 2015 +0100 | | be more precise about the gcc requirement | * commit 1b9a93057b856c92190f3f8d32e507539f4669cd | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:09:11 2015 +0100 | | update README | * commit 3cc1ba6fc7c862de258e7a29c840ea7d5eb04be1 | Author: Thomas Pöchtrager | Date: Sun Mar 8 17:47:09 2015 +0100 | | * windows (cygwin), openbsd and dragonflybsd port | * gcc compiler support | * add --with-llvm-config option | * fix 'ld: malformed 32-bit x.y.z version number: 3.19.0-7-generic' | * commit 7a2d21ca7f4e42c70c8ff85ec3e37ac6ef9d0de7 | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:58:10 2015 +0100 | | map -> version-script | * commit 5135fb2541876f0af185589890f9e21b98ceb39c | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:49:55 2015 +0100 | | an attempt to fix the otool disassembler | * commit 219f5f53ea42361ccb2c75bed311f1d57ce68966 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:47 2015 +0100 | | ar, lipo, otool (etc.) should also be linked with -rpath for libLTO | * commit 1efff3733f1cb483b27e18d6d14cd7ccf5571627 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:11 2015 +0100 | | add support for llvm 3.7 | * commit 8b6beadd337ac7e5d1d58d438e9afcd5165d1200 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:31:34 2015 +0100 | | silence/fix -Wabsolute-value warnings | * commit 59d21d2c793c51d205c8b4ab14b9b28e63c72445 (tag: 862-ld64-241.9-2) | Author: Thomas Pöchtrager | Date: Sun Dec 28 18:09:43 2014 +0100 | | ios-toolchain: build.sh: ignore 'git clean' return status | * commit 3d198530ae4c031e904f29414c7c46ac547d90b7 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:45 2014 +0100 | | ios-toolchain: take care of IPHONEOS_DEPLOYMENT_TARGET (env) | * commit 23658f2f20778374b43dcd80717b4f47845c2297 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:28 2014 +0100 | | the ios 8.1 sdk has mach_vm_trunc_page and mach_vm_round_page already defined | * commit 70b87ceec059f632641b41dfd2d9e63dbd069a0c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:33:50 2014 +0100 | | ios-toolchain: cleanup | * commit 9c0f520110f7f57a1060ac66329c55f8f71ecd8c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:25:26 2014 +0100 | | ios-toolchain: use -mlinker-version=241.9 in the 241.9 branch | * commit 8b0cbdaf820ee40fcb1e2e209cb6f858ffb8aa90 | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:00:19 2014 +0100 | | strchr -> strrchr | * commit e9f701822aa209cf435c4b26eb4c7ab01001f5cb | Author: Thomas Pöchtrager | Date: Sat Dec 27 11:47:02 2014 +0100 | | add scripts / wrapper to build a simple ios toolchain | * commit cf456225d3551a8782c5222133455bb9139ecad5 | Author: Thomas Pöchtrager | Date: Fri Dec 26 10:55:34 2014 +0100 | | define _GNU_SOURCE for strnlen() | * commit 211fe3927f5d6c132d72164e898d146fcdf7577e | Author: sezero <sezero@users.noreply.github.com> | Date: Wed Dec 24 12:20:01 2014 +0200 | | autogen.sh fixes: run libtoolize 'after' creating the m4 directory. run aclocal with '-I m4' switches. | * commit a4f9fd8ad09cafb94bf465ae4e914f086458e5cc | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Wed Dec 24 11:35:37 2014 +0100 | | Update README.md | * commit 2201b7b4cbc3a3b29aa7d8e7ccf2576f1847a3e6 | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:58:16 2014 +0100 | | add '-L/usr/pkg/lib' for NetBSD | * commit a303cc27ace751059caa27a34e5d9ae5cd0825ac | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:10:18 2014 +0100 | | update README |
2015-07-18 00:25:59 +03:00
LINKER_VERSION=242
fi
update cctools to 870 and ld64 to 242 OSXCross *should* now work on Linux ARM devices with this update. Port changes: * commit f7818cbf61074ea6fbb56de1b50c0973afe3428f | Author: Thomas Pöchtrager | Date: Fri Jul 17 19:34:57 2015 +0200 | | add preliminary llvm-3.8 support | * commit 8482a95745f54062de974e65fdd28b0389f3c6a5 | Author: Thomas Pöchtrager | Date: Sat Jul 11 09:32:55 2015 +0200 | | * get rid of the openssl dependency | * make libuuid optional (based on http://git.io/vqbwu) | * commit a8e002367d64c5e3e3a195bba37aa1ccb306f897 | Author: Thomas Pöchtrager | Date: Sat Jul 11 08:45:49 2015 +0200 | | * undo unnecessary changes done by the original porter | * add cctools-port comments to changed code | * add codelite project | * commit 2b050dc41d1ae375a5af36b751d479be4513a6f3 | Author: Thomas Pöchtrager | Date: Tue Jun 23 19:31:00 2015 +0200 | | ios-toolchain: remove 'CC=cc' - just causes troubles | * commit f7f7c6180e5b7ae2897e3617e3475811c88a5173 | Author: Thomas Pöchtrager | Date: Sat May 30 15:51:27 2015 +0200 | | silence gcc 5.1 warnings | * commit 359b40b5bd40d86e0d1c9d40fb7bb2297130e903 | Author: Thomas Pöchtrager | Date: Sun Apr 19 21:33:15 2015 +0200 | | use KERN_PROC_ARGV instead of KERN_PROC_ENV | * commit 7a9b23fbb24c7250cb4caae2d97b79afbdefe503 | Author: Thomas Pöchtrager | Date: Sun Apr 19 20:35:01 2015 +0200 | | _NSGetExecutablePath() should now work properly on openbsd | * commit 47c29e6a7701a16268da57412a68e133818a32dd | Author: Thomas Pöchtrager | Date: Sat Apr 11 18:34:58 2015 +0200 | | clang 3.6 miscompiles ld64 on armhf (even at -O0); enforce gcc on arm until | i can figure out what's going on there | | probably related: | https://github.com/raspberrypi/linux/issues/766 | https://github.com/tpoechtrager/cctools-port/issues/1#issuecomment-59118615 | | backtrace: | | https://gist.github.com/tpoechtrager/d68c8352a3fd32165af4 | * commit 5e5b511a3eebd3fa9ece49bead85a1be29a25dfb | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:28:44 2015 +0100 | | fix more potential -D_FORTIFY_SOURCE crashers | * commit 5098fc9f6dfba7eac18f5ae55b7e361314e0fb7b | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:14:13 2015 +0100 | | strip: don't crash with -D_FORTIFY_SOURCE enabled (ubuntu gcc) | * commit 268c3de73b173673dc9ae932ab802f42247570ff | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:21 2015 +0100 | | add arm to the tested host architectures | * commit ade8d819ad8fd2d04978a2da22e5efe06dc40dad | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:06 2015 +0100 | | ios-toolchain: set COMPILER_PATH | * commit 700c6fd644f78b9427163e9f444fc15f2c73ed28 | Author: Thomas Pöchtrager | Date: Wed Mar 18 20:28:27 2015 +0100 | | configure.ac: target_cpu -> host_cpu | * commit bf9ac6a2c5846af3c2112c483a612937d8e3a037 | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Sun Mar 15 22:43:36 2015 +0100 | | update README | * commit 253ec0ff238ebc3b359d7f4fe2edc38b0aa3e428 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:26:45 2015 +0100 | | typo | * commit 42109667d4b080bbc8091235c036ed418d369d13 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:21:16 2015 +0100 | | * linux ppc/ppc64 & arm/arm64/aarch64 port | (compiles now - everything else is *untested*) | | other changes: | | * rename 'machochecker' to 'machocheck' | * get rid of duplicate $CFLAGS | * fix a typo in the ios toolchain README | * package.sh: remove the autom4te.cache directory | * commit 0c32be78e979641095a92480786a621e65282b92 | Author: Thomas Pöchtrager | Date: Mon Mar 9 20:01:33 2015 +0100 | | misc fixes: | * fix gcc warnings (even though they are not my fault) | * fix a typo in include/foreign/i386/_types.h (__INT64_TYPE_ -> __INT64_TYPE__) | * fix the cygwin + clang<=3.4 build | * commit 3f00c16b0fce9a7a151a88114209f17a46711637 | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:49:50 2015 +0100 | | be more precise about the gcc requirement | * commit 1b9a93057b856c92190f3f8d32e507539f4669cd | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:09:11 2015 +0100 | | update README | * commit 3cc1ba6fc7c862de258e7a29c840ea7d5eb04be1 | Author: Thomas Pöchtrager | Date: Sun Mar 8 17:47:09 2015 +0100 | | * windows (cygwin), openbsd and dragonflybsd port | * gcc compiler support | * add --with-llvm-config option | * fix 'ld: malformed 32-bit x.y.z version number: 3.19.0-7-generic' | * commit 7a2d21ca7f4e42c70c8ff85ec3e37ac6ef9d0de7 | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:58:10 2015 +0100 | | map -> version-script | * commit 5135fb2541876f0af185589890f9e21b98ceb39c | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:49:55 2015 +0100 | | an attempt to fix the otool disassembler | * commit 219f5f53ea42361ccb2c75bed311f1d57ce68966 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:47 2015 +0100 | | ar, lipo, otool (etc.) should also be linked with -rpath for libLTO | * commit 1efff3733f1cb483b27e18d6d14cd7ccf5571627 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:11 2015 +0100 | | add support for llvm 3.7 | * commit 8b6beadd337ac7e5d1d58d438e9afcd5165d1200 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:31:34 2015 +0100 | | silence/fix -Wabsolute-value warnings | * commit 59d21d2c793c51d205c8b4ab14b9b28e63c72445 (tag: 862-ld64-241.9-2) | Author: Thomas Pöchtrager | Date: Sun Dec 28 18:09:43 2014 +0100 | | ios-toolchain: build.sh: ignore 'git clean' return status | * commit 3d198530ae4c031e904f29414c7c46ac547d90b7 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:45 2014 +0100 | | ios-toolchain: take care of IPHONEOS_DEPLOYMENT_TARGET (env) | * commit 23658f2f20778374b43dcd80717b4f47845c2297 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:28 2014 +0100 | | the ios 8.1 sdk has mach_vm_trunc_page and mach_vm_round_page already defined | * commit 70b87ceec059f632641b41dfd2d9e63dbd069a0c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:33:50 2014 +0100 | | ios-toolchain: cleanup | * commit 9c0f520110f7f57a1060ac66329c55f8f71ecd8c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:25:26 2014 +0100 | | ios-toolchain: use -mlinker-version=241.9 in the 241.9 branch | * commit 8b0cbdaf820ee40fcb1e2e209cb6f858ffb8aa90 | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:00:19 2014 +0100 | | strchr -> strrchr | * commit e9f701822aa209cf435c4b26eb4c7ab01001f5cb | Author: Thomas Pöchtrager | Date: Sat Dec 27 11:47:02 2014 +0100 | | add scripts / wrapper to build a simple ios toolchain | * commit cf456225d3551a8782c5222133455bb9139ecad5 | Author: Thomas Pöchtrager | Date: Fri Dec 26 10:55:34 2014 +0100 | | define _GNU_SOURCE for strnlen() | * commit 211fe3927f5d6c132d72164e898d146fcdf7577e | Author: sezero <sezero@users.noreply.github.com> | Date: Wed Dec 24 12:20:01 2014 +0200 | | autogen.sh fixes: run libtoolize 'after' creating the m4 directory. run aclocal with '-I m4' switches. | * commit a4f9fd8ad09cafb94bf465ae4e914f086458e5cc | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Wed Dec 24 11:35:37 2014 +0100 | | Update README.md | * commit 2201b7b4cbc3a3b29aa7d8e7ccf2576f1847a3e6 | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:58:16 2014 +0100 | | add '-L/usr/pkg/lib' for NetBSD | * commit a303cc27ace751059caa27a34e5d9ae5cd0825ac | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:10:18 2014 +0100 | | update README |
2015-07-18 00:25:59 +03:00
CCTOOLS="cctools-870-ld64-$LINKER_VERSION"
2015-07-05 22:04:15 +03:00
CCTOOLS_TARBALL=$(ls $TARBALL_DIR/$CCTOOLS*.tar.* | head -n1)
update cctools to 870 and ld64 to 242 OSXCross *should* now work on Linux ARM devices with this update. Port changes: * commit f7818cbf61074ea6fbb56de1b50c0973afe3428f | Author: Thomas Pöchtrager | Date: Fri Jul 17 19:34:57 2015 +0200 | | add preliminary llvm-3.8 support | * commit 8482a95745f54062de974e65fdd28b0389f3c6a5 | Author: Thomas Pöchtrager | Date: Sat Jul 11 09:32:55 2015 +0200 | | * get rid of the openssl dependency | * make libuuid optional (based on http://git.io/vqbwu) | * commit a8e002367d64c5e3e3a195bba37aa1ccb306f897 | Author: Thomas Pöchtrager | Date: Sat Jul 11 08:45:49 2015 +0200 | | * undo unnecessary changes done by the original porter | * add cctools-port comments to changed code | * add codelite project | * commit 2b050dc41d1ae375a5af36b751d479be4513a6f3 | Author: Thomas Pöchtrager | Date: Tue Jun 23 19:31:00 2015 +0200 | | ios-toolchain: remove 'CC=cc' - just causes troubles | * commit f7f7c6180e5b7ae2897e3617e3475811c88a5173 | Author: Thomas Pöchtrager | Date: Sat May 30 15:51:27 2015 +0200 | | silence gcc 5.1 warnings | * commit 359b40b5bd40d86e0d1c9d40fb7bb2297130e903 | Author: Thomas Pöchtrager | Date: Sun Apr 19 21:33:15 2015 +0200 | | use KERN_PROC_ARGV instead of KERN_PROC_ENV | * commit 7a9b23fbb24c7250cb4caae2d97b79afbdefe503 | Author: Thomas Pöchtrager | Date: Sun Apr 19 20:35:01 2015 +0200 | | _NSGetExecutablePath() should now work properly on openbsd | * commit 47c29e6a7701a16268da57412a68e133818a32dd | Author: Thomas Pöchtrager | Date: Sat Apr 11 18:34:58 2015 +0200 | | clang 3.6 miscompiles ld64 on armhf (even at -O0); enforce gcc on arm until | i can figure out what's going on there | | probably related: | https://github.com/raspberrypi/linux/issues/766 | https://github.com/tpoechtrager/cctools-port/issues/1#issuecomment-59118615 | | backtrace: | | https://gist.github.com/tpoechtrager/d68c8352a3fd32165af4 | * commit 5e5b511a3eebd3fa9ece49bead85a1be29a25dfb | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:28:44 2015 +0100 | | fix more potential -D_FORTIFY_SOURCE crashers | * commit 5098fc9f6dfba7eac18f5ae55b7e361314e0fb7b | Author: Thomas Pöchtrager | Date: Thu Mar 19 21:14:13 2015 +0100 | | strip: don't crash with -D_FORTIFY_SOURCE enabled (ubuntu gcc) | * commit 268c3de73b173673dc9ae932ab802f42247570ff | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:21 2015 +0100 | | add arm to the tested host architectures | * commit ade8d819ad8fd2d04978a2da22e5efe06dc40dad | Author: Thomas Pöchtrager | Date: Wed Mar 18 21:29:06 2015 +0100 | | ios-toolchain: set COMPILER_PATH | * commit 700c6fd644f78b9427163e9f444fc15f2c73ed28 | Author: Thomas Pöchtrager | Date: Wed Mar 18 20:28:27 2015 +0100 | | configure.ac: target_cpu -> host_cpu | * commit bf9ac6a2c5846af3c2112c483a612937d8e3a037 | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Sun Mar 15 22:43:36 2015 +0100 | | update README | * commit 253ec0ff238ebc3b359d7f4fe2edc38b0aa3e428 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:26:45 2015 +0100 | | typo | * commit 42109667d4b080bbc8091235c036ed418d369d13 | Author: Thomas Pöchtrager | Date: Sun Mar 15 22:21:16 2015 +0100 | | * linux ppc/ppc64 & arm/arm64/aarch64 port | (compiles now - everything else is *untested*) | | other changes: | | * rename 'machochecker' to 'machocheck' | * get rid of duplicate $CFLAGS | * fix a typo in the ios toolchain README | * package.sh: remove the autom4te.cache directory | * commit 0c32be78e979641095a92480786a621e65282b92 | Author: Thomas Pöchtrager | Date: Mon Mar 9 20:01:33 2015 +0100 | | misc fixes: | * fix gcc warnings (even though they are not my fault) | * fix a typo in include/foreign/i386/_types.h (__INT64_TYPE_ -> __INT64_TYPE__) | * fix the cygwin + clang<=3.4 build | * commit 3f00c16b0fce9a7a151a88114209f17a46711637 | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:49:50 2015 +0100 | | be more precise about the gcc requirement | * commit 1b9a93057b856c92190f3f8d32e507539f4669cd | Author: Thomas Pöchtrager | Date: Sun Mar 8 20:09:11 2015 +0100 | | update README | * commit 3cc1ba6fc7c862de258e7a29c840ea7d5eb04be1 | Author: Thomas Pöchtrager | Date: Sun Mar 8 17:47:09 2015 +0100 | | * windows (cygwin), openbsd and dragonflybsd port | * gcc compiler support | * add --with-llvm-config option | * fix 'ld: malformed 32-bit x.y.z version number: 3.19.0-7-generic' | * commit 7a2d21ca7f4e42c70c8ff85ec3e37ac6ef9d0de7 | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:58:10 2015 +0100 | | map -> version-script | * commit 5135fb2541876f0af185589890f9e21b98ceb39c | Author: Thomas Pöchtrager | Date: Tue Feb 24 21:49:55 2015 +0100 | | an attempt to fix the otool disassembler | * commit 219f5f53ea42361ccb2c75bed311f1d57ce68966 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:47 2015 +0100 | | ar, lipo, otool (etc.) should also be linked with -rpath for libLTO | * commit 1efff3733f1cb483b27e18d6d14cd7ccf5571627 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:32:11 2015 +0100 | | add support for llvm 3.7 | * commit 8b6beadd337ac7e5d1d58d438e9afcd5165d1200 | Author: Thomas Pöchtrager | Date: Mon Feb 23 21:31:34 2015 +0100 | | silence/fix -Wabsolute-value warnings | * commit 59d21d2c793c51d205c8b4ab14b9b28e63c72445 (tag: 862-ld64-241.9-2) | Author: Thomas Pöchtrager | Date: Sun Dec 28 18:09:43 2014 +0100 | | ios-toolchain: build.sh: ignore 'git clean' return status | * commit 3d198530ae4c031e904f29414c7c46ac547d90b7 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:45 2014 +0100 | | ios-toolchain: take care of IPHONEOS_DEPLOYMENT_TARGET (env) | * commit 23658f2f20778374b43dcd80717b4f47845c2297 | Author: Thomas Pöchtrager | Date: Sun Dec 28 17:48:28 2014 +0100 | | the ios 8.1 sdk has mach_vm_trunc_page and mach_vm_round_page already defined | * commit 70b87ceec059f632641b41dfd2d9e63dbd069a0c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:33:50 2014 +0100 | | ios-toolchain: cleanup | * commit 9c0f520110f7f57a1060ac66329c55f8f71ecd8c | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:25:26 2014 +0100 | | ios-toolchain: use -mlinker-version=241.9 in the 241.9 branch | * commit 8b0cbdaf820ee40fcb1e2e209cb6f858ffb8aa90 | Author: Thomas Pöchtrager | Date: Sat Dec 27 12:00:19 2014 +0100 | | strchr -> strrchr | * commit e9f701822aa209cf435c4b26eb4c7ab01001f5cb | Author: Thomas Pöchtrager | Date: Sat Dec 27 11:47:02 2014 +0100 | | add scripts / wrapper to build a simple ios toolchain | * commit cf456225d3551a8782c5222133455bb9139ecad5 | Author: Thomas Pöchtrager | Date: Fri Dec 26 10:55:34 2014 +0100 | | define _GNU_SOURCE for strnlen() | * commit 211fe3927f5d6c132d72164e898d146fcdf7577e | Author: sezero <sezero@users.noreply.github.com> | Date: Wed Dec 24 12:20:01 2014 +0200 | | autogen.sh fixes: run libtoolize 'after' creating the m4 directory. run aclocal with '-I m4' switches. | * commit a4f9fd8ad09cafb94bf465ae4e914f086458e5cc | Author: Thomas Pöchtrager <tpoechtrager@users.noreply.github.com> | Date: Wed Dec 24 11:35:37 2014 +0100 | | Update README.md | * commit 2201b7b4cbc3a3b29aa7d8e7ccf2576f1847a3e6 | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:58:16 2014 +0100 | | add '-L/usr/pkg/lib' for NetBSD | * commit a303cc27ace751059caa27a34e5d9ae5cd0825ac | Author: Thomas Pöchtrager | Date: Fri Nov 21 22:10:18 2014 +0100 | | update README |
2015-07-18 00:25:59 +03:00
CCTOOLS_REVHASH=$(echo $(basename "$CCTOOLS_TARBALL") | tr '_' '\n' | \
tr '.' '\n' | tail -n3 | head -n1)
if [ ! -f "have_cctools_${CCTOOLS_REVHASH}_$TARGET" ]; then
rm -rf cctools*
rm -rf xar*
2013-11-10 17:49:24 +04:00
extract $CCTOOLS_TARBALL 1
2013-11-10 17:49:24 +04:00
pushd cctools*/cctools &>/dev/null
pushd .. &>/dev/null
./tools/fix_unistd_issue.sh 1>/dev/null
popd &>/dev/null
patch -p0 < $PATCH_DIR/cctools-ld64-1.patch
patch -p0 < $PATCH_DIR/cctools-ld64-2.patch
if [ $PLATFORM == "OpenBSD" ] || [ $PLATFORM == "DragonFly" ]; then
pushd .. &>/dev/null
patch -p0 < $PATCH_DIR/cctools-ld64-epath.patch
popd &>/dev/null
fi
echo ""
CONFFLAGS="--prefix=$TARGET_DIR --target=x86_64-apple-$TARGET"
[ -n "$DISABLE_LTO_SUPPORT" ] && CONFFLAGS+=" --enable-lto=no"
./configure $CONFFLAGS
$MAKE -j$JOBS
$MAKE install -j$JOBS
popd &>/dev/null
2013-11-10 17:49:24 +04:00
pushd $TARGET_DIR/bin &>/dev/null
CCTOOLS=$(find . -name "x86_64-apple-darwin*")
2013-11-10 17:49:24 +04:00
CCTOOLS=($CCTOOLS)
if [ $X86_64H_SUPPORTED -eq 1 ]; then
for CCTOOL in ${CCTOOLS[@]}; do
2015-07-20 22:13:36 +03:00
CCTOOL_X86_64H=$(echo "$CCTOOL" | $SED 's/x86_64/x86_64h/g')
ln -sf $CCTOOL $CCTOOL_X86_64H
done
fi
2013-11-10 17:49:24 +04:00
for CCTOOL in ${CCTOOLS[@]}; do
2015-07-20 22:13:36 +03:00
CCTOOL_I386=$(echo "$CCTOOL" | $SED 's/x86_64/i386/g')
2014-04-06 17:58:15 +04:00
ln -sf $CCTOOL $CCTOOL_I386
2013-11-10 17:49:24 +04:00
done
popd &>/dev/null
2013-11-10 17:49:24 +04:00
fi
# CCTOOLS END
# MacPorts symlinks
pushd $TARGET_DIR/bin &>/dev/null # The BSD ln command doesn't support '-r'
ln -sf ../../tools/osxcross-macports osxcross-macports
ln -sf ../../tools/osxcross-macports osxcross-mp
ln -sf ../../tools/osxcross-macports omp
popd &>/dev/null
SDK=$(ls $TARBALL_DIR/MacOSX$SDK_VERSION*)
2013-11-10 17:49:24 +04:00
# XAR
if [[ $SDK == *.pkg ]]; then
set +e
which xar &>/dev/null
NEED_XAR=$?
set -e
if [ $NEED_XAR -ne 0 ]; then
extract $TARBALL_DIR/xar*.tar.gz 2
pushd xar* &>/dev/null
[ $PLATFORM == "NetBSD" ] && patch -p0 -l < $PATCH_DIR/xar-netbsd.patch
CFLAGS+=" -w" ./configure --prefix=$TARGET_DIR
$MAKE -j$JOBS
$MAKE install -j$JOBS
popd &>/dev/null
2013-11-10 17:49:24 +04:00
fi
fi
# XAR END
2015-07-05 22:04:15 +03:00
if [ ! -f "have_cctools_${CCTOOLS_REVHASH}_$TARGET" ]; then
function check_cctools()
2013-11-10 17:49:24 +04:00
{
[ -f "$TARGET_DIR/bin/$1-apple-$TARGET-lipo" ] || exit 1
[ -f "$TARGET_DIR/bin/$1-apple-$TARGET-ld" ] || exit 1
[ -f "$TARGET_DIR/bin/$1-apple-$TARGET-nm" ] || exit 1
[ -f "$TARGET_DIR/bin/$1-apple-$TARGET-ar" ] || exit 1
[ -f "$TARGET_DIR/bin/$1-apple-$TARGET-ranlib" ] || exit 1
[ -f "$TARGET_DIR/bin/$1-apple-$TARGET-strip" ] || exit 1
2013-11-10 17:49:24 +04:00
}
check_cctools i386
check_cctools x86_64
2013-11-10 17:49:24 +04:00
touch "have_cctools_${CCTOOLS_REVHASH}_$TARGET"
2013-11-10 17:49:24 +04:00
echo ""
2013-11-10 17:49:24 +04:00
fi # HAVE_CCTOOLS
set +e
2013-11-10 17:49:24 +04:00
ls $TARBALL_DIR/MacOSX$SDK_VERSION* &>/dev/null
while [ $? -ne 0 ]
do
2014-04-06 17:58:15 +04:00
echo ""
echo "Get the MacOSX$SDK_VERSION SDK and move it into $TARBALL_DIR"
echo "(see README for SDK download links)"
echo ""
echo "You can press ctrl-c to break the build process,"
echo "if you restart ./build.sh then we will continue from here"
echo ""
if [ -z "$UNATTENDED" ]; then
read -p "Press enter to continue"
2015-06-21 20:44:49 +03:00
else
exit 1
fi
2014-04-06 17:58:15 +04:00
ls $TARBALL_DIR/MacOSX$SDK_VERSION* &>/dev/null
2013-11-10 17:49:24 +04:00
done
set -e
2013-11-10 17:49:24 +04:00
extract $SDK 1 1
2013-11-10 17:49:24 +04:00
rm -rf $SDK_DIR/MacOSX$SDK_VERSION* 2>/dev/null
if [ "$(ls -l SDKs/*$SDK_VERSION* 2>/dev/null | wc -l | tr -d ' ')" != "0" ]; then
2014-04-06 17:58:15 +04:00
mv -f SDKs/*$SDK_VERSION* $SDK_DIR
else
2014-04-06 17:58:15 +04:00
mv -f *OSX*$SDK_VERSION*sdk* $SDK_DIR
fi
2013-11-10 17:49:24 +04:00
pushd $SDK_DIR/MacOSX$SDK_VERSION.sdk &>/dev/null
set +e
ln -s \
$SDK_DIR/MacOSX$SDK_VERSION.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/std*.h \
usr/include 2>/dev/null
[ ! -f "usr/include/float.h" ] && cp -f $BASE_DIR/oclang/quirks/float.h usr/include
[ $PLATFORM == "FreeBSD" ] && cp -f $BASE_DIR/oclang/quirks/tgmath.h usr/include
set -e
popd &>/dev/null
2013-11-10 17:49:24 +04:00
popd &>/dev/null
2013-11-10 17:49:24 +04:00
OSXCROSS_CONF="$TARGET_DIR/bin/osxcross-conf"
OSXCROSS_ENV="$TARGET_DIR/bin/osxcross-env"
rm -f $OSXCROSS_CONF $OSXCROSS_ENV
echo "compiling wrapper ..."
export X86_64H_SUPPORTED
export OSXCROSS_VERSION
export OSXCROSS_TARGET=$TARGET
export OSXCROSS_OSX_VERSION_MIN=$OSX_VERSION_MIN
export OSXCROSS_LINKER_VERSION=$LINKER_VERSION
2014-04-14 23:59:03 +04:00
if [ "$PLATFORM" != "Darwin" ]; then
# libLTO.so
set +e
eval $(cat $BUILD_DIR/cctools*/cctools/config.log | grep LLVM_LIB_DIR | head -n1)
set -e
export OSXCROSS_LIBLTO_PATH=$LLVM_LIB_DIR
2014-04-14 23:59:03 +04:00
fi
$BASE_DIR/wrapper/build.sh 1>/dev/null
2013-11-10 17:49:24 +04:00
echo ""
if [ $(osxcross-cmp ${SDK_VERSION/u/} "<" $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"
trap "" EXIT
exit 1
fi
unset MACOSX_DEPLOYMENT_TARGET
2013-11-10 17:49:24 +04:00
test_compiler o32-clang $BASE_DIR/oclang/test.c
test_compiler o64-clang $BASE_DIR/oclang/test.c
test_compiler o32-clang++ $BASE_DIR/oclang/test.cpp
test_compiler o64-clang++ $BASE_DIR/oclang/test.cpp
if [ $(osxcross-cmp ${SDK_VERSION/u/} ">=" 10.7) -eq 1 ]; then
2014-04-06 17:58:15 +04:00
if [ ! -d "$SDK_DIR/MacOSX$SDK_VERSION.sdk/usr/include/c++/v1" ]; then
echo ""
2014-04-06 17:58:15 +04:00
echo -n "Given SDK does not contain libc++ headers "
echo "(-stdlib=libc++ test may fail)"
echo -n "You may want to re-package your SDK using "
echo "'tools/gen_sdk_package.sh' on OS X"
fi
echo ""
test_compiler_cxx11 o32-clang++ $BASE_DIR/oclang/test_libcxx.cpp
test_compiler_cxx11 o64-clang++ $BASE_DIR/oclang/test_libcxx.cpp
fi
2013-11-10 17:49:24 +04:00
echo ""
2015-02-24 23:19:27 +03:00
echo "Do not forget to add"
2013-11-10 17:49:24 +04:00
echo ""
2015-02-24 23:19:27 +03:00
echo -e "\x1B[32m${TARGET_DIR}/bin\x1B[0m"
echo ""
2015-02-24 23:19:27 +03:00
echo "to your PATH variable."
2013-11-10 17:49:24 +04:00
echo ""
2015-02-24 23:19:27 +03:00
echo "All done! Now you can use o32-clang(++) and o64-clang(++) like a normal compiler."
2013-11-10 17:49:24 +04:00
echo ""
echo "Example usage:"
echo ""
echo "Example 1: CC=o32-clang ./configure --host=i386-apple-$TARGET"
echo "Example 2: CC=i386-apple-$TARGET-clang ./configure --host=i386-apple-$TARGET"
echo "Example 3: o64-clang -Wall test.c -o test"
echo "Example 4: x86_64-apple-$TARGET-strip -x test"
echo ""