Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitcode_bundle support via llvm/libxar #111

Open
muratmat opened this issue Apr 3, 2017 · 3 comments
Open

bitcode_bundle support via llvm/libxar #111

muratmat opened this issue Apr 3, 2017 · 3 comments

Comments

@muratmat
Copy link

muratmat commented Apr 3, 2017

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:

  • the build of xar library is guarded by a 'if [[ $SDK == *.pkg ]]; then'
  • my osx sdk was a tar.xy
  • I removed the 'if' guard and the xar library was built successfuly
  • anyway the produced 'ld' does not support '-bitcode_bundle'

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
Copy link
Owner

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
Copy link
Author

muratmat commented Apr 3, 2017

Many thanks, it worked!

@tpoechtrager
Copy link
Owner

More on this topic: tpoechtrager/cctools-port#31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants