fix relocation issues

This commit is contained in:
Thomas Pöchtrager 2015-08-21 23:32:37 +02:00
parent 31a9707629
commit 03e904d5f1
5 changed files with 18 additions and 6 deletions

View File

@ -202,9 +202,9 @@ fi
# 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
ln -sf $BASE_DIR/tools/osxcross-macports osxcross-macports
ln -sf $BASE_DIR/tools/osxcross-macports osxcross-mp
ln -sf $BASE_DIR/tools/osxcross-macports omp
popd &>/dev/null
SDK=$(ls $TARBALL_DIR/MacOSX$SDK_VERSION*)
@ -308,6 +308,7 @@ export OSXCROSS_VERSION
export OSXCROSS_TARGET=$TARGET
export OSXCROSS_OSX_VERSION_MIN=$OSX_VERSION_MIN
export OSXCROSS_LINKER_VERSION=$LINKER_VERSION
export OSXCROSS_BUILD_DIR=$BUILD_DIR
if [ "$PLATFORM" != "Darwin" ]; then
# libLTO.so

View File

@ -22,6 +22,7 @@ override CXXFLAGS+=-DOSXCROSS_TARGET="\"$(OSXCROSS_TARGET)\""
override CXXFLAGS+=-DOSXCROSS_OSX_VERSION_MIN="\"$(OSXCROSS_OSX_VERSION_MIN)\""
override CXXFLAGS+=-DOSXCROSS_LINKER_VERSION="\"$(OSXCROSS_LINKER_VERSION)\""
override CXXFLAGS+=-DOSXCROSS_LIBLTO_PATH="\"$(OSXCROSS_LIBLTO_PATH)\""
override CXXFLAGS+=-DOSXCROSS_BUILD_DIR="\"$(OSXCROSS_BUILD_DIR)\""
override CXXFLAGS+= $(OSXCROSS_CXXFLAGS)

View File

@ -127,7 +127,7 @@ if [ -n "$BWCOMPILEONLY" ]; then
exit 0
fi
verbose_cmd mv wrapper "../target/bin/${TARGETTRIPLE}-wrapper${EXESUFFIX}"
verbose_cmd mv wrapper "${TARGET_DIR}/bin/${TARGETTRIPLE}-wrapper${EXESUFFIX}"
pushd "../target/bin" &>/dev/null

View File

@ -31,6 +31,7 @@ int conf(Target &target) {
std::string SDKPath;
OSVersion OSXVersionMin = getDefaultMinTarget();
const char *ltopath = getLibLTOPath();
const char *builddir = getBuildDir();
if (!target.getSDKPath(SDKPath))
return 1;
@ -59,8 +60,16 @@ int conf(Target &target) {
<< std::endl;
std::cout << "export OSXCROSS_TARGET_DIR=" << target.execpath << "/.."
<< std::endl;
std::cout << "export OSXCROSS_BUILD_DIR=" << target.execpath << "/../../build"
<< 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_CCTOOLS_PATH=" << target.execpath
<< std::endl;
std::cout << "export OSXCROSS_LIBLTO_PATH=" << ltopath

View File

@ -32,6 +32,7 @@ constexpr const char *getDefaultTarget() { return OSXCROSS_TARGET; }
constexpr const char *getDefaultCompiler() { return "clang"; }
constexpr const char *getDefaultCXXCompiler() { return "clang++"; }
constexpr const char *getLinkerVersion() { return OSXCROSS_LINKER_VERSION; }
constexpr const char *getBuildDir() { return OSXCROSS_BUILD_DIR; }
constexpr const char *getLibLTOPath() {
#ifdef OSXCROSS_LIBLTO_PATH