mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 04:47:17 +04:00
openssl: probe the cross compiler regardless of the host CC
libopenssl3 differs between builds depending on the environment of the build host, e.g. in the images of the Turris Omnia: -compiler: arm-openwrt-linux-muslgnueabi-gcc -fPIC -pthread -Os ... +compiler: arm-openwrt-linux-muslgnueabi-gcc -fPIC -pthread -Wa,--noexecstack -Os ... - GNU_STACK ... RWE 0x10 + GNU_STACK ... RW 0x10 Configure probes whether the assembler supports --noexecstack by running $CROSS_COMPILE$CC, with CC taken from the environment. A host which sets CC to select its compiler, e.g. CC=gcc-13, makes it run arm-openwrt-linux-muslgnueabi-gcc-13, which does not exist, so the flag is silently dropped and libcrypto ends up with an executable stack. Pass CC=gcc to Configure, so that it always probes the cross compiler. With CC=gcc-13 in the environment, the configuration now gets -Wa,--noexecstack like a build without CC set. Link: https://github.com/openwrt/openwrt/pull/25719 Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
1 file changed
+2
-1
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_VERSION:=3.5.9
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
@@ -366,6 +366,7 @@ TARGET_LDFLAGS += -Wl,--as-needed
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR); \
|
||||
CC="gcc" \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
|
||||
Reference in new issue
Block a user