From 78d2b7319521d0e37cf454cdc5499a4899104a9b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 24 Feb 2020 17:04:00 +0200 Subject: [PATCH] wpa_supplicant: Link statically to libnl-tiny --- extra/wpa_supplicant/build | 12 +++++++++++- extra/wpa_supplicant/checksums | 3 ++- extra/wpa_supplicant/depends | 1 - extra/wpa_supplicant/files/.config | 5 +++-- extra/wpa_supplicant/sources | 1 + extra/wpa_supplicant/version | 2 +- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/extra/wpa_supplicant/build b/extra/wpa_supplicant/build index 46f5b9ac..a9f3dcec 100755 --- a/extra/wpa_supplicant/build +++ b/extra/wpa_supplicant/build @@ -1,6 +1,16 @@ #!/bin/sh -e +# The wpa_supplicant package is built statically using +# libnl-tiny which is a minimal version of libnl maintained +# by OpenWRT. +make ALL_LIBS=libnl-tiny.a -C libnl + +# The CFLAGS must be set to link to the above locally built +# libnl-tiny library. +export CFLAGS="$CFLAGS -I$PWD/libnl/include -L$PWD/libnl -lnl-tiny" +export CFLAGS="$CFLAGS -static -D_GNU_SOURCE -DLIBNL1_COMPAT" + cd wpa_supplicant -make LIBDIR=/usr/lib BINDIR=/usr/bin +make LIBDIR=/usr/lib BINDIR=/usr/bin DRV_LIBS="$CFLAGS" make LIBDIR=/usr/lib BINDIR=/usr/bin DESTDIR="$1" install diff --git a/extra/wpa_supplicant/checksums b/extra/wpa_supplicant/checksums index 8be19a91..06ed6d3b 100644 --- a/extra/wpa_supplicant/checksums +++ b/extra/wpa_supplicant/checksums @@ -1,2 +1,3 @@ fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17 wpa_supplicant-2.9.tar.gz -6a753cde8110f38580ed8e73a50b344c9249aabcef9f1fc689900e9f0c424640 .config +d2b57597b234c84b113e7640064c3273616c0bf086ad223d71f49aaea086ad59 4225e93bec5304abee3386213213718367e54a93.tar.gz +ea81361a44cede64fb42309e783f26ca1d0a4f6677a21550aad925b25405eeb0 .config diff --git a/extra/wpa_supplicant/depends b/extra/wpa_supplicant/depends index 2e0bc712..af76e9c4 100644 --- a/extra/wpa_supplicant/depends +++ b/extra/wpa_supplicant/depends @@ -1,3 +1,2 @@ -libnl libressl pkgconf make diff --git a/extra/wpa_supplicant/files/.config b/extra/wpa_supplicant/files/.config index 5851a44f..97808b57 100644 --- a/extra/wpa_supplicant/files/.config +++ b/extra/wpa_supplicant/files/.config @@ -41,10 +41,11 @@ CONFIG_DRIVER_NL80211=y #LIBS += -L$ # Use libnl v2.0 (or 3.0) libraries. -#CONFIG_LIBNL20=y +CONFIG_LIBNL20=y +CONFIG_LIBNL_TINY=y # Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) -CONFIG_LIBNL32=y +#CONFIG_LIBNL32 is not set # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) diff --git a/extra/wpa_supplicant/sources b/extra/wpa_supplicant/sources index f106958d..14ad689f 100644 --- a/extra/wpa_supplicant/sources +++ b/extra/wpa_supplicant/sources @@ -1,2 +1,3 @@ https://w1.fi/releases/wpa_supplicant-2.9.tar.gz +https://github.com/sabotage-linux/libnl-tiny/archive/4225e93bec5304abee3386213213718367e54a93.tar.gz libnl files/.config wpa_supplicant/ diff --git a/extra/wpa_supplicant/version b/extra/wpa_supplicant/version index 6c795bbb..a9b81dbb 100644 --- a/extra/wpa_supplicant/version +++ b/extra/wpa_supplicant/version @@ -1 +1 @@ -2.9 2 +2.9 3