mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
use gcc to compile gcc (there was a weird '-mmacosx-version-min=' issue during gcc compilation with earlier versions)
This commit is contained in:
parent
961a97a32f
commit
867345ed8f
14
README.md
14
README.md
@ -14,11 +14,6 @@ of the [cctools](http://www.opensource.apple.com/tarballs/cctools) (ld, lipo, ..
|
||||
|
||||
If you want, then you can build an up-to-date vanilla GCC as well.
|
||||
|
||||
### WHAT IS NOT WORKING (YET)? ###
|
||||
|
||||
* GCC itself [doesn't build with GCC](https://github.com/tpoechtrager/osxcross/commit/dc8c471),
|
||||
but builds fine when clang is used to build GCC.
|
||||
|
||||
### WHAT CAN I BUILD WITH IT? ###
|
||||
|
||||
Basically everything you can build on OS X with clang/gcc should build with this cross toolchain as well.
|
||||
@ -46,8 +41,13 @@ That's it. See usage examples below.
|
||||
##### Building GCC: #####
|
||||
|
||||
If you want to build GCC as well, then you can do this by running `./build_gcc.sh`.
|
||||
But before you do this, make sure you have got the GCC build depedencies installed on your system,
|
||||
on debian like systems you can run `apt-get install libmpc-dev libmpfr-dev libgmp-dev` to install them.
|
||||
But before you do this, make sure you have got the GCC build depedencies installed on your system.
|
||||
|
||||
On debian like systems you can run:
|
||||
|
||||
`[sudo] apt-get install gcc g++ zlib1g-dev libmpc-dev libmpfr-dev libgmp-dev`
|
||||
|
||||
to install them.
|
||||
|
||||
### PACKAGING THE SDK: ###
|
||||
|
||||
|
@ -5,6 +5,7 @@ pushd "${0%/*}" &>/dev/null
|
||||
unset LIBRARY_PATH
|
||||
|
||||
DESC=gcc
|
||||
USESYSTEMCOMPILER=1
|
||||
source tools/tools.sh
|
||||
|
||||
`tools/osxcross_conf.sh`
|
||||
@ -108,6 +109,9 @@ fi # have gcc
|
||||
|
||||
popd &>/dev/null # build dir
|
||||
|
||||
unset USESYSTEMCOMPILER
|
||||
source tools/tools.sh
|
||||
|
||||
pushd $OSXCROSS_TARGET_DIR/bin &>/dev/null
|
||||
|
||||
if [ ! -f i386-apple-$OSXCROSS_TARGET-base-gcc ]; then
|
||||
|
@ -3,8 +3,14 @@
|
||||
BASE_DIR=`pwd`
|
||||
|
||||
export LC_ALL="C"
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
|
||||
if [ -z "$USESYSTEMCOMPILER" ]; then
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
elif [ -n "$CC" -o -n "$CXX" ]; then
|
||||
echo "CC/CXX should not be set, continuing in 5 seconds..." 1>&2
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
# enable debug messages
|
||||
test -n "$OCDEBUG" && set -x
|
||||
|
Loading…
Reference in New Issue
Block a user