[PATCH] openssl: use --cross-compile-prefix in Configure

Eneas U de Queiroz cotequeiroz at gmail.com
Sat Nov 28 15:27:25 EST 2020


This sets the --cross-compile-prefix option when running Configure, so
that that it will not use the host gcc to figure out, among other
things, compiler defines.  It avoids an error, when the host 'gcc' is
handled by clang:

mips-openwrt-linux-musl-gcc: error: unrecognized command-line option
'-Qunused-arguments'

Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>

---

neheb, or anyone else affected, please test this patch to see if what
I'm claiming is actually true.  At least it does not appear to break
compilation in my case ;-)

Compile-tested using a Gentoo host, and mvebu as target.

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 9696748106..3c0e8c5d2d 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -11,7 +11,7 @@ PKG_NAME:=openssl
 PKG_BASE:=1.1.1
 PKG_BUGFIX:=h
 PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_USE_MIPS16:=0
 ENGINES_DIR=engines-1.1
 
@@ -333,6 +333,7 @@ define Build/Configure
 			--prefix=/usr \
 			--libdir=lib \
 			--openssldir=/etc/ssl \
+			--cross-compile-prefix="$(TARGET_CROSS)" \
 			$(TARGET_CPPFLAGS) \
 			$(TARGET_LDFLAGS) \
 			$(OPENSSL_OPTIONS) && \



More information about the openwrt-devel mailing list