libs/libnl: Update to 3.3.0
[openwrt/staging/wigyori.git] / package / libs / libnl / patches / 102-revert-build-enable-building-cli-during-tests.patch
1 From 68f8393bd356a3d0598cf77e1044b7e8b98aa4d8 Mon Sep 17 00:00:00 2001
2 Message-Id: <68f8393bd356a3d0598cf77e1044b7e8b98aa4d8.1493920165.git.baruch@tkos.co.il>
3 From: Baruch Siach <baruch@tkos.co.il>
4 Date: Thu, 4 May 2017 15:56:14 +0300
5 Subject: [PATCH] Revert "build: enable building cli during tests"
6
7 This reverts commit 3cb28534d34392ceec4adead0cfa97039796ccb7.
8
9 Contrary to what 3cb28534d commit log claims, the cli programs depend on
10 dynamic libraries support of the toolchain. Enabling cli programs
11 unconditionally breaks static build as follows:
12
13 In file included from lib/cli/cls/basic.c:12:0:
14 ./include/netlink/cli/utils.h:25:19: fatal error: dlfcn.h: No such file or directory
15 compilation terminated.
16 Makefile:3666: recipe for target 'lib/cli/cls/lib_cli_cls_basic_la-basic.lo' failed
17 make[1]: *** [lib/cli/cls/lib_cli_cls_basic_la-basic.lo] Error 1
18
19 Revert that commit to restore the ability of static only build of libnl, and
20 its dependencies.
21
22 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
23 ---
24 Upstream status: https://github.com/thom311/libnl/pull/141
25
26 Makefile.am | 21 ++++++---------------
27 1 file changed, 6 insertions(+), 15 deletions(-)
28
29 diff --git a/Makefile.am b/Makefile.am
30 index 1b95a559304f..279548394650 100644
31 --- a/Makefile.am
32 +++ b/Makefile.am
33 @@ -3,8 +3,6 @@
34 ACLOCAL_AMFLAGS = -I m4
35
36 lib_LTLIBRARIES =
37 -noinst_LTLIBRARIES =
38 -check_LTLIBRARIES =
39
40 check_PROGRAMS =
41 check_programs =
42 @@ -500,6 +498,8 @@ EXTRA_lib_libnl_xfrm_3_la_DEPENDENCIES = \
43 lib_libnl_xfrm_3_la_LIBADD = \
44 lib/libnl-3.la
45
46 +if ENABLE_CLI
47 +
48 lib_cli_ltlibraries_cls = \
49 lib/cli/cls/basic.la \
50 lib/cli/cls/cgroup.la
51 @@ -513,15 +513,11 @@ lib_cli_ltlibraries_qdisc = \
52 lib/cli/qdisc/pfifo.la \
53 lib/cli/qdisc/plug.la
54
55 -if ENABLE_CLI
56 pkglib_clsdir = $(pkglibdir)/cli/cls
57 pkglib_qdiscdir = $(pkglibdir)/cli/qdisc
58 pkglib_cls_LTLIBRARIES = $(lib_cli_ltlibraries_cls)
59 pkglib_qdisc_LTLIBRARIES = $(lib_cli_ltlibraries_qdisc)
60 -else
61 -noinst_LTLIBRARIES += \
62 - $(lib_cli_ltlibraries_cls) \
63 - $(lib_cli_ltlibraries_qdisc)
64 +
65 endif
66
67 lib_cli_ldflags = \
68 @@ -550,13 +546,8 @@ lib_cli_qdisc_plug_la_LDFLAGS = $(lib_cli_ldflags)
69
70 ###############################################################################
71
72 -src_lib_ldflags =
73 -
74 if ENABLE_CLI
75 lib_LTLIBRARIES += src/lib/libnl-cli-3.la
76 -src_lib_ldflags += -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
77 -else
78 -check_LTLIBRARIES += src/lib/libnl-cli-3.la
79 endif
80
81 src_lib_libnl_cli_3_la_SOURCES = \
82 @@ -583,7 +574,7 @@ src_lib_libnl_cli_3_la_CPPFLAGS = \
83 -I$(srcdir)/include \
84 -I$(builddir)/include
85 src_lib_libnl_cli_3_la_LDFLAGS = \
86 - $(src_lib_ldflags) \
87 + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
88 -Wl,--version-script=$(srcdir)/libnl-cli-3.sym
89 src_lib_libnl_cli_3_la_LIBADD = \
90 lib/libnl-3.la \
91 @@ -668,8 +659,6 @@ else
92 noinst_PROGRAMS += $(cli_programs)
93 endif
94 endif
95 -else
96 -check_PROGRAMS += $(cli_programs)
97 endif
98
99 src_genl_ctrl_list_CPPFLAGS = $(src_cppflags)
100 @@ -847,10 +836,12 @@ tests_test_complex_HTB_with_hash_filters_LDADD = $(tests_ldadd)
101 tests_test_u32_filter_with_actions_CPPFLAGS = $(tests_cppflags)
102 tests_test_u32_filter_with_actions_LDADD = $(tests_ldadd)
103
104 +if ENABLE_CLI
105 check_PROGRAMS += \
106 tests/test-cache-mngr \
107 tests/test-genl \
108 tests/test-nf-cache-mngr
109 +endif
110
111 tests_cli_ldadd = \
112 $(tests_ldadd) \
113 --
114 2.11.0
115