How to compile OpenSSL with relative rpath

后端 未结 3 1190
北荒
北荒 2020-12-06 12:34

I have been trying to compile openssl 1.0.0g with the following rpath:

$ORIGIN/../lib64

Everytime I readelf -d apps/openssl, I

3条回答
  •  抹茶落季
    2020-12-06 13:06

    In your makefile try:

    -Wl,-rpath,${ORIGIN}/../lib64
    

    I am assuming that the ORIGIN is a shell variable.

    EDIT

    I have just found an answer to your question (better late then never): You need to prevent make from interpolating variables, to do that you need to use $$ (double dolar sign):

    -Wl,-rpath,'$$ORIGIN/../lib64'
    

    I know that it works because I have tested it with my own application, enjoy :)

提交回复
热议问题