Minimum gcc version required for openssl 3.x?
Thomas Dwyer III
tomiii at tomiii.com
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 libssl.so && \
ln -s libssl.so.3 libssl.so
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/mkdef.pl --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/capi.so -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/capi.so] Error 1
I found that gcc-4.9.2 works fine (odd, see below), as does the following
patch:
$ git diff Configurations/shared-info.pl
diff --git a/Configurations/shared-info.pl b/Configurations/shared-info.pl
index a673c7c..461ce3c 100644
--- a/Configurations/shared-info.pl
+++ b/Configurations/shared-info.pl
@@ -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?
Thanks,
Tom.III
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20200512/5689d315/attachment.html>
More information about the openssl-users
mailing list