tpoechtrager / osxcross

Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
GNU General Public License v2.0
2.8k stars 318 forks source link

bitcode_bundle support via llvm/libxar #111

Open muratmat opened 7 years ago

muratmat commented 7 years ago

Hello, I've a Debian 64bit machine (testing) and installed all development tools needed by osxcross (gcc, clang 3.9, llvm 3.9, llvm-3.9-dev, libxml2, libxml2-dev, libcrypto++-dev, zlib1g, zlib1g-dev). I need the produced osx cross tools to support '-bitcode_bundle'. The standard build.sh scripts works fine but the produced ld (linker) does not support '-bitcode_bundle' (I get a 'ld: -bitcode_bundle support via llvm/libxar not compiled in'). I backtraced building script (i.e. build.sh), and found the following:

I've seen (within build.sh) that cctools are built before xar library. Maybe the two sections must be exchanged? Any idea on how to get '-bitcode_bundle' support?

Many thanks in advance. Matteo.

tpoechtrager commented 7 years ago

The bundled xar is only used for SDK extraction atm.

Install libxar on your system before building OSXCross:

cd build
mkdir tmp
cd tmp
tar xf ../../tarballs/xar-1.6.1.tar.gz
cd xar-1.6.1
patch -p0 < ../../..//patches/xar-ext2.patch
ac_cv_lib_crypto_OpenSSL_add_all_ciphers=yes ./configure
make
[sudo] make install
export LD_LIBRARY_PATH=/usr/local/lib
muratmat commented 7 years ago

Many thanks, it worked!

tpoechtrager commented 5 years ago

More on this topic: https://github.com/tpoechtrager/cctools-port/issues/31