To get a completely env independent setup we may want to install
Clang/LLVM to the target folder as well. So let's allow user
to do it in a scripted way just adding ENABLE_CLANG_INSTALL=1
for execution string.
Other changes:
* Add USE_CLANG_AS build.sh option
* build_clang.sh: Update Clang version to 3.9.1
* build_compiler_rt.sh: Adjustments for Clang 4.0 and Clang 5.0
* handle '-sdk' / 'SDKROOT' (env.) properly.
e.g. 'xcrun -sdk /[...]/MacOSX10.6.sdk clang' will use
the specified 10.6 SDK.
* never execute xcode tools outside target/bin even when
a full path is specified.
e.g. 'xcrun /usr/bin/gcc' will execute target/bin/<triple>-gcc.
other wrapper changes:
* implement 'OSXCROSS_SDKROOT' env. variable for 'xcrun -sdk'.
* error on '-arch x86_64h' + clang <= 3.4.
clang <= 3.4 misinterprets x86_64h as x86_64.
* only create x86_64h symlinks when the 10.8 (or later) SDK
is used.
other changes:
* misc fixes and cleanup