[LLVMdev] LLVM-ar and openssl
Rafael EspĂndola
rafael.espindola at gmail.com
Sat Jun 6 13:16:46 PDT 2015
I think llvm-ar is still missing support of the format used on OS X.
On 5 June 2015 at 07:33, Wehrli Johan <johan.wehrli at heig-vd.ch> wrote:
> Hi everyone,
>
> I encountered a strange bug when I tried to compile openssl (https://www.openssl.org/) with clang and llvm-ar on a 64-bit OS X.
>
> I changed the openssl makefile to use llvm-ar instead of simply ar.
>
> Openssl will then create two static libraries libssl.a and libcrypto.a.
>
> The problem occurs when it tries to link these two static libraries to the final openssl executable.
>
> I get the following error :
>
> ld: warning: ignoring file ../libssl.a, file was built for archive which is not the architecture being linked (x86_64): ../libssl.a
> ld: warning: ignoring file ../libcrypto.a, file was built for archive which is not the architecture being linked (x86_64): ../libcrypto.a
>
> And, of course, a lot of undefined symbols for architecture X86_64 with all the functions from these two libraries.
>
> Openssl correctly compile with ar on OS-X 64 bits and with ar and llvm-ar on Ubuntu 64 bits.
>
> Does anyone knows why? I searched in the llvm-ar doc in order to find if there was an argument or something like that.
>
> For information, I configured openssl with the following parameters :
> ./Configure darwin64-x86_64-cc enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64
>
> And I replaced this line AR= ar $(ARFLAGS) r in the Makefile with this AR= /path/to/llvm-ar $(ARFLAGS) r
>
> Greetings,
>
> Johan Wehrli
>
>
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list