tweaks for osx cross compile

This commit is contained in:
Dave Murphy
2018-05-11 10:28:05 +01:00
parent ecf9b7ff35
commit fec333d757
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
export CPPFLAGS=-I/opt/osx/x86_64-apple-darwin15/include
export LDFLAGS=-L/opt/osx/x86_64-apple-darwin15/lib
export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1
export CC=x86_64-apple-darwin15-clang
export CXX=x86_64-apple-darwin15-clang++
export CROSSBUILD=x86_64-apple-darwin15
export CROSSPATH=/opt/osx/x86_64-apple-darwin15
export CROSSLIBPATH=$CROSSPATH/lib
export CROSSBINPATH=$CROSSPATH/bin
export PATH=/opt/osx/bin:$PATH
export PKG_CONFIG_PATH=
export PKG_CONFIG_LIBDIR=$CROSSLIBPATH/pkgconfig

View File

@@ -84,6 +84,11 @@ fi
unset CFLAGS
cd $BUILDDIR
OLD_CC=$CC
OLDCXX=$CXX
unset CC
unset CXX
#---------------------------------------------------------------------------------
# build and install newlib
#---------------------------------------------------------------------------------
@@ -116,6 +121,9 @@ then
touch installed-newlib
fi
CC=$OLD_CC
CXX=$OLD_CXX
#---------------------------------------------------------------------------------
# build and install the final compiler
#---------------------------------------------------------------------------------