summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-04-06 11:38:10 -0700
committerKhem Raj <raj.khem@gmail.com>2019-04-06 16:59:58 -0700
commit82b8ae6bd2167748ca3ffb4cd5d251f20ed30af1 (patch)
tree2b7d34c20fe8bd0a51f8c4defb0024a60e2f8a3a
parente57fe0b07ebbffce7aaae759cd062e1001c366fd (diff)
downloadmeta-openembedded-82b8ae6bd2167748ca3ffb4cd5d251f20ed30af1.tar.gz
networkmanager: Fix build with clang
Detecting libdl for dlopen when failed returns "none required", which then gets added to linker commandline and inturn fails to link with errors obviously because "-lnone required" is no such library. This patch is not musl dependent, earlier patches clubbed it into musl patch however this is needed with clang too regardless of the C library the reason is clang automatically brings in libdl in OE and hence this test is failing. This is noop with gcc since the first check will pass thats why it works in first place Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Andreas Müller <schnitzeltony@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-dlopen-failure.patch34
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch13
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb1
3 files changed, 35 insertions, 13 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-dlopen-failure.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-dlopen-failure.patch
new file mode 100644
index 000000000..e99c22710
--- /dev/null
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-dlopen-failure.patch
@@ -0,0 +1,34 @@
1From 57239fda56b68a8f3e413f7b6af5290ba0d86636 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Thu, 22 Mar 2018 18:18:06 +0100
4Subject: [PATCH] musl: dlopen is included so LD_LIBS="" instead of
5 LD_LIBS="none required"
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Upstream-Status: Pending
11
12Stolen from [1] and prettyfied slightly
13
14[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
15
16Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
17---
18 configure.ac | 1 +
19 1 file changed, 1 insertion(+)
20
21diff --git a/configure.ac b/configure.ac
22index 487a266..96ae4f7 100644
23--- a/configure.ac
24+++ b/configure.ac
25@@ -235,6 +235,7 @@ dnl
26 dnl Checks for libdl - on certain platforms its part of libc
27 dnl
28 AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=])
29+AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""])
30 AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen")
31
32 PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
33--
342.14.3
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch
index 21e9a16d6..b3f93ff92 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch
@@ -11,7 +11,6 @@ Upstream-Status: Pending
11Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> 11Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
12--- 12---
13 clients/cli/connections.c | 1 - 13 clients/cli/connections.c | 1 -
14 configure.ac | 1 +
15 libnm-core/nm-utils.c | 2 +- 14 libnm-core/nm-utils.c | 2 +-
16 shared/n-acd/src/n-acd.c | 1 - 15 shared/n-acd/src/n-acd.c | 1 -
17 shared/systemd/src/basic/in-addr-util.c | 1 + 16 shared/systemd/src/basic/in-addr-util.c | 1 +
@@ -43,18 +42,6 @@ index 6db44f8..36e51cc 100644
43 #include <readline/readline.h> 42 #include <readline/readline.h>
44 #include <readline/history.h> 43 #include <readline/history.h>
45 #include <fcntl.h> 44 #include <fcntl.h>
46diff --git a/configure.ac b/configure.ac
47index 872c292..b1d7a68 100644
48--- a/configure.ac
49+++ b/configure.ac
50@@ -241,6 +241,7 @@ dnl
51 dnl Checks for libdl - on certain platforms its part of libc
52 dnl
53 AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=])
54+AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""])
55 AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen")
56
57 PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
58diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c 45diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
59index d276cfe..2aec785 100644 46index d276cfe..2aec785 100644
60--- a/libnm-core/nm-utils.c 47--- a/libnm-core/nm-utils.c
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb
index 90792ff4e..9f57908e9 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb
@@ -26,6 +26,7 @@ SRC_URI = " \
26 ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ 26 ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
27 file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ 27 file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
28 file://0002-Do-not-create-settings-settings-property-documentati.patch \ 28 file://0002-Do-not-create-settings-settings-property-documentati.patch \
29 file://0003-dlopen-failure.patch \
29" 30"
30SRC_URI_append_libc-musl = " file://musl/0001-Fix-build-with-musl.patch" 31SRC_URI_append_libc-musl = " file://musl/0001-Fix-build-with-musl.patch"
31 32