FiloSottile / homebrew-musl-cross

Homebrew Formula for static-friendly musl-based GCC macOS-to-Linux cross-compilers
https://blog.filippo.io/easy-windows-and-linux-cross-compilers-for-macos/
ISC License
547 stars 45 forks source link

Compiling Staticaly linked OpenSSL for linux-x86_64 #7

Closed ghost closed 6 years ago

ghost commented 6 years ago

Any one succeeded to make this usable at all? I tried every option I can think of but it's not linking statically like with GregorR/musl-cross in ubuntu

CC="/usr/local/bin/x86_64-linux-musl-gcc -static" LD="/usr/local/bin/x86_64-linux-musl-ld -static" \
AR="/usr/local/bin/x86_64-linux-musl-ar" PERL="/usr/bin/perl" ./Configure no-shared \ 
no-async no-zlib no-zlib-dynamic linux-x86_64

/usr/local/bin/gmake

I get loads of :(.text+0x21c): undefined reference to at linking stage

ghost commented 6 years ago

never mind I had to also export ranlib binary RANLIB="/usr/local/bin/x86_64-linux-musl-ranlib"