aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2021-01-01 22:04:18 +0100
committerPetr Štetiar <ynezz@true.cz>2021-02-02 10:09:19 +0100
commite9d2aa9dc6a5663e3d43fc817d276582842134bb (patch)
tree63a79773ee20ccf30005e155f78f16c63937fc44 /package
parent2044c01de8f214c43c6c13dcb538e3730f97a7f8 (diff)
downloadupstream-e9d2aa9dc6a5663e3d43fc817d276582842134bb.tar.gz
upstream-e9d2aa9dc6a5663e3d43fc817d276582842134bb.tar.bz2
upstream-e9d2aa9dc6a5663e3d43fc817d276582842134bb.zip
wolfssl: Fix hostapd build with wolfssl 4.6.0
This fixes the following build problem in hostapd: mipsel-openwrt-linux-musl/bin/ld: /builder/shared-workdir/build/tmp/ccN4Wwer.ltrans7.ltrans.o: in function `crypto_ec_point_add': <artificial>:(.text.crypto_ec_point_add+0x170): undefined reference to `ecc_projective_add_point' mipsel-openwrt-linux-musl/bin/ld: <artificial>:(.text.crypto_ec_point_add+0x18c): undefined reference to `ecc_map' mipsel-openwrt-linux-musl/bin/ld: /builder/shared-workdir/build/tmp/ccN4Wwer.ltrans7.ltrans.o: in function `crypto_ec_point_to_bin': <artificial>:(.text.crypto_ec_point_to_bin+0x40): undefined reference to `ecc_map' Fixes: ba40da9045f7 ("wolfssl: Update to v4.6.0-stable") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit e7d0d2e9dcaa0ff1197fb7beee139b6a5bd35c79)
Diffstat (limited to 'package')
-rw-r--r--package/libs/wolfssl/patches/110-Fix-linking-against-hostapd-with-LTO.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/libs/wolfssl/patches/110-Fix-linking-against-hostapd-with-LTO.patch b/package/libs/wolfssl/patches/110-Fix-linking-against-hostapd-with-LTO.patch
new file mode 100644
index 0000000000..c24a15116f
--- /dev/null
+++ b/package/libs/wolfssl/patches/110-Fix-linking-against-hostapd-with-LTO.patch
@@ -0,0 +1,25 @@
+From 391ecbd647c121300dc7dcf209e412ccb7b8d432 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Fri, 1 Jan 2021 21:57:56 +0100
+Subject: [PATCH] Fix linking against hostapd with LTO
+
+When running LTO on wolfssl the ecc_map() function is removed from the
+binary by GCC 8.4.0. This function is used by multiple functions from
+the crypto_wolfssl.c implementation of hostapd master.
+
+Fixes: 780e8a4619b6 ("Fixes for building `--enable-wpas=small` with WPA Supplicant v2.7.")
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -947,6 +947,7 @@ then
+ AM_CFLAGS="$AM_CFLAGS -DOPENSSL_EXTRA_X509_SMALL"
+
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PUBLIC_MP"
++ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PUBLIC_ECC_ADD_DBL"
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DER_LOAD"
+ AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER"
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"