creating Linux "portable" x64 binary

Juan Isoza jisoza at gmail.com
Fri Feb 22 10:28:33 UTC 2019


Hello,
I want create for one of my application a Linux binary which run on all
current linux system running x86_64 processor.

by example, I uses -static-libgcc -static-libstdc++ when I link my app ,
because I'm not sure found recent version of this lib
I also use -lrt to prevent search some tims function added on recent GLIBC

With openssl 1.1.0, I had no problem related to openssl

With openssl 1.1.1, there is somes modern function searched at compile on
recent library

So, I just run these command
sed -i -e 's/__ELF__/__ELF_and_sure_modern__/g' ./crypto/rand/rand_unix.c
sed -i -e 's/__GLIBC_PREREQ/__GLIBC__not_use_PREREQ/g'
./crypto/rand/rand_unix.c
sed -i -e 's/__GLIBC_PREREQ/__GLIBC__not_use_PREREQ/g' ./crypto/getenv.c
sed -i -e 's/__GLIBC_PREREQ/__GLIBC__not_use_PREREQ/g' ./crypto/crypto.c
sed -i -e 's/__GLIBC_PREREQ/__GLIBC__not_use_PREREQ/g' ./crypto/uid.c

with this modification, I'm sure that checking of modern API fail, and I
use previous api (like if I compile on oldest linux).

I suggest offering an option to not trying using these modern GLICBC_PREREQ
, or pehaps uses dl (when openssl is compiled to uses dl)

regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20190222/582053b0/attachment.html>


More information about the openssl-users mailing list