Closed dwmw2 closed 3 years ago
You've got to "flavour" it, perl <script> mingw64
. As for sed-ing, another possibility is to change suffix to .S, capital S, and use -D at compiler line.
Thanks, that works. I'm dusting off the OpenConnect AES-NI support, at https://gitlab.com/openconnect/openconnect/-/commits/hacks2/
I have bigger problems with OPEN{SSL,CONNECT}_ia32cap_P anyway... now the Android build is failing because it wants PIC support:
/opt/android-sdk-linux_x86/toolchains/x86_64-linux-android-23/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: .libs/aesni-sha1-x86_64.o: requires dynamic R_X86_64_PC32 reloc against 'OPENCONNECT_ia32cap_P' which may overflow at runtime; recompile with -fPIC
/opt/android-sdk-linux_x86/toolchains/x86_64-linux-android-23/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: .libs/aesni-x86_64.o: requires dynamic R_X86_64_PC32 reloc against 'OPENCONNECT_ia32cap_P' which may overflow at runtime; recompile with -fPIC
/opt/android-sdk-linux_x86/toolchains/x86_64-linux-android-23/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: .libs/sha1-x86_64.o: requires dynamic R_X86_64_PC32 reloc against 'OPENCONNECT_ia32cap_P' which may overflow at runtime; recompile with -fPIC
/opt/android-sdk-linux_x86/toolchains/x86_64-linux-android-23/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: warning: shared library text segment is not shareable
recompile with -fPIC
I for one argue that it should be a warning, not error. But anyway. Declare the affected symbol hidden, for example with __attribute__((visibility("hidden")))
, or use -Wl,-Bsymbolic
flag when linking shared object. -Wl,-Bsymbolic
is generally better for security, because other shared libraries won't override internal symbols in your shared library, unintentionally or not.
Got it, thanks. In fact OpenSSL's x86_64cpuid.pl
was doing precisely that, but I'd ripped it out along with a lot of other things from that file, and kept only the OPENSSL_ia32_cpuid() function. I put it back , and my Android CI builds are now passing again; thanks.
This is giving me a 40% update on ESP performance; I'd love to have the licence issue resolved (#7) so that I can merge it for real into my LGPLv2.1-licensed project :)
Building for Win64, I get: