[1/1] package/libopenssl: fix static build on x86_64
diff mbox series

Message ID 20191015214644.31476-1-fontaine.fabrice@gmail.com
State Superseded
Headers show
Series
  • [1/1] package/libopenssl: fix static build on x86_64
Related show

Commit Message

Fabrice Fontaine Oct. 15, 2019, 9:46 p.m. UTC
Use no-asm when building statically on x86_64, see
https://github.com/openssl/openssl/issues/9839

Fixes:
 - http://autobuild.buildroot.org/results/e4f04bb13ec1b82b73db645bea4933e52bca4185

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libopenssl/libopenssl.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thomas Petazzoni Oct. 16, 2019, 7:15 a.m. UTC | #1
On Tue, 15 Oct 2019 23:46:44 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Use no-asm when building statically on x86_64, see
> https://github.com/openssl/openssl/issues/9839
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/e4f04bb13ec1b82b73db645bea4933e52bca4185
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Is the problem specific to x86-64 ? Reading the Github issue, the
OpenSSL developer apparently says that whenever the "generic"
architecture variants are used, no-asm should be passed as well. This
is not really what your patch is doing.

Could you clarify this ?

Thomas

Patch
diff mbox series

diff --git a/package/libopenssl/libopenssl.mk b/package/libopenssl/libopenssl.mk
index 4a430bcb4d..ff9b52a002 100644
--- a/package/libopenssl/libopenssl.mk
+++ b/package/libopenssl/libopenssl.mk
@@ -56,6 +56,10 @@  endif
 ifeq ($(BR2_STATIC_LIBS),y)
 # Use "gcc" minimalistic target to disable DSO
 LIBOPENSSL_TARGET_ARCH = gcc
+# See https://github.com/openssl/openssl/issues/9839
+ifeq ($(ARCH),x86_64)
+LIBOPENSSL_TARGET_ARCH += no-asm
+endif
 else
 # Some architectures are optimized in OpenSSL
 # Doesn't work for thumb-only (Cortex-M?)