mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-08 02:55:56 +01:00
Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
building gcc with gcc (targeting OS X on linux) causes the following errors: error 1: g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o xg++ \ gcc.o ggc-none.o g++spec.o driver-i386.o darwin-driver.o libcommon-target.a \ libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a /usr/bin/ld: unrecognised emulation mode: acosx_version_min Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om i386pep i386pe error 2: g++ -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace cc1-checksum.c -o cc1-checksum.o cc1plus: error: unrecognized command line option '-mmacosx-version-min=10.4' after fixing the -mmacosx-version-min issue in the gcc/specs file, I get the following weird error (gmp is indeed installed): g++ -c -DIN_GCC_FRONTEND -g -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace cc1-checksum.c -o cc1-checksum.o In file included from cc1-checksum.c:2:0: ../../gcc/system.h:641:17: fatal error: gmp.h: No such file or directory #include <gmp.h> all these errors do not appear when clang is used for building gcc. |
||
---|---|---|
oclang | ||
ogcc | ||
patches | ||
tarballs | ||
AUTHORS | ||
build_gcc.sh | ||
build.sh | ||
CHANGELOG | ||
cleanup.sh | ||
LICENSE | ||
package.sh | ||
README | ||
README.gcc | ||
TODO |
- OSXCross: OS X cross toolchain for linux - OSXCross is a tool which helps you to cross compile source code easily with clang on linux for OS X. After the installation you will have "o32-clang", "o32-clang++", "o64-clang" and "o64-clang++" available as compiler. You can optionally build an update-to-date gcc as well, please see README.gcc. Make sure you have the following installed on your linux-system: Clang 3.2+, llvm-devel, automake, autogen, libtool, libxml2-devel, libuuid-devel, openssl-devel and the bash shell Then edit TARGET and so on in build.sh, so it fits your requirements. Then run ./build.sh to build the OS X cross toolchain (it will guide you through the installation). SDK Download: * Links: * Installation: -> Download the SDK to the tarballs/ directory and do not forget to adjust -> the SDK_VERSION in build.sh! LICENSE: bash scripts: GPLv2 cctools: APSL 2.0 xar: New BSD CREDITS: cjacker for the CCTOOLS linux port, checkout his ios-toolchain-based-on-clang-for-linux project: https://code.google.com/p/ios-toolchain-based-on-clang-for-linux