Skip to content
Permalink
Browse files

security/wazuh-agent: Fix linking with openssl on 12.0/amd64

    LINK    libwazuh.a
    RANLIB  libwazuh.a
    CC      libwazuhext.so
/usr/bin/ld: error: can't create dynamic relocation R_X86_64_32 against local symbol in readonly segment; recompile object files with -fPIC
>>> defined in external/openssl/libssl.a(bio_ssl.o)
>>> referenced by bio_ssl.c
>>>               bio_ssl.o:(BIO_f_ssl) in archive external/openssl/libssl.a
  • Loading branch information...
Charlie Root
Charlie Root committed Sep 11, 2019
1 parent 9962448 commit 6d424c57748a16b174d802860fe5a2c7df2dfc80
Showing with 11 additions and 0 deletions.
  1. +11 −0 security/wazuh-agent/files/patch-src_external_openssl_Makefile
@@ -0,0 +1,11 @@
--- src/external/openssl/Makefile.orig 2019-09-11 11:27:31 UTC
+++ src/external/openssl/Makefile
@@ -73,7 +73,7 @@ HTMLSUFFIX=html

CROSS_COMPILE=
CC= $(CROSS_COMPILE)cc
-CFLAGS=-DNDEBUG -DOPENSSL_NO_DYNAMIC_ENGINE -DOPENSSLDIR="\"$(OPENSSLDIR)\"" -DENGINESDIR="\"$(ENGINESDIR)\"" -O
+CFLAGS=-DNDEBUG -DOPENSSL_NO_DYNAMIC_ENGINE -DOPENSSLDIR="\"$(OPENSSLDIR)\"" -DENGINESDIR="\"$(ENGINESDIR)\"" -O -fPIC
CFLAGS_Q=-DNDEBUG -DOPENSSL_NO_DYNAMIC_ENGINE -DOPENSSLDIR=\"\\\"$(OPENSSLDIR)\\\"\" -DENGINESDIR=\"\\\"$(ENGINESDIR)\\\"\"
LDFLAGS=
PLIB_LDFLAGS=

0 comments on commit 6d424c5

Please sign in to comment.
You can’t perform that action at this time.