Minimum gcc version required for openssl 3.x?

Thomas Dwyer III tomiii at
Tue May 12 23:21:46 UTC 2020

I searched all the docs I could find but I was unable to locate any
statements regarding gcc compatibility for openssl 3.x. I'm having a
problem cross-compiling for arm using gcc-4.4.5:

rm -f && \
        ln -s
arm-linux-gnueabi-gcc  -Iinclude  -fPIC -pthread -Wall -O3 -DNDEBUG
-DL_ENDIAN -DOPENSSL_NO_COMP -MMD -MF engines/capi-dso-e_capi.d.tmp -MT
engines/capi-dso-e_capi.o -c -o engines/capi-dso-e_capi.o engines/e_capi.c
/workspace/XXXXXX/perl/bin/perl ./util/ --ordinals util/engines.num
 --name engines/capi --OS linux > engines/capi.ld
arm-linux-gnueabi-gcc -fPIC -pthread -Wall -O3 -L. -z defs -Wl,-znodelete
-shared -Wl,-Bsymbolic   \
                -o engines/ -Wl,--version-script=engines/capi.ld \
                engines/capi-dso-e_capi.o \
                -lcrypto -ldl -pthread
arm-linux-gnueabi-gcc: defs: No such file or directory
gmake[5]: *** [engines/] Error 1

I found that gcc-4.9.2 works fine (odd, see below), as does the following

$ git diff Configurations/
diff --git a/Configurations/ b/Configurations/
index a673c7c..461ce3c 100644
--- a/Configurations/
+++ b/Configurations/
@@ -36,7 +36,7 @@ my %shared_info;
                 (grep /(?:^|\s)-fsanitize/,
                  @{$config{CFLAGS}}, @{$config{cflags}})
                 ? ''
-                : '-z defs',
+                : '-Wl,-z,defs',
     'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; },

Although this works in gcc-4.9.2, it appears that the -z flag wasn't
documented until gcc-5.5. All Google hits I get for "-z defs" take me to
pages that show "-Wl,-z,defs" so it's curious that this particular option
isn't being passed with -Wl like the others. Is there a minimum supported
gcc version for openssl 3.x?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the openssl-users mailing list