procd: update to latest git HEAD
[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 --- a/Makefile.am
30 +++ b/Makefile.am
31 @@ -3,8 +3,6 @@
32 ACLOCAL_AMFLAGS = -I m4
33
34 lib_LTLIBRARIES =
35 -noinst_LTLIBRARIES =
36 -check_LTLIBRARIES =
37
38 check_PROGRAMS =
39 check_programs =
40 @@ -511,6 +509,8 @@ EXTRA_lib_libnl_xfrm_3_la_DEPENDENCIES =
41 lib_libnl_xfrm_3_la_LIBADD = \
42 lib/libnl-3.la
43
44 +if ENABLE_CLI
45 +
46 lib_cli_ltlibraries_cls = \
47 lib/cli/cls/basic.la \
48 lib/cli/cls/cgroup.la
49 @@ -524,15 +524,11 @@ lib_cli_ltlibraries_qdisc = \
50 lib/cli/qdisc/pfifo.la \
51 lib/cli/qdisc/plug.la
52
53 -if ENABLE_CLI
54 pkglib_clsdir = $(pkglibdir)/cli/cls
55 pkglib_qdiscdir = $(pkglibdir)/cli/qdisc
56 pkglib_cls_LTLIBRARIES = $(lib_cli_ltlibraries_cls)
57 pkglib_qdisc_LTLIBRARIES = $(lib_cli_ltlibraries_qdisc)
58 -else
59 -check_LTLIBRARIES += \
60 - $(lib_cli_ltlibraries_cls) \
61 - $(lib_cli_ltlibraries_qdisc)
62 +
63 endif
64
65 lib_cli_ldflags = \
66 @@ -565,9 +561,6 @@ src_lib_ldflags =
67
68 if ENABLE_CLI
69 lib_LTLIBRARIES += src/lib/libnl-cli-3.la
70 -src_lib_ldflags += -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
71 -else
72 -check_LTLIBRARIES += src/lib/libnl-cli-3.la
73 endif
74
75 src_lib_libnl_cli_3_la_SOURCES = \
76 @@ -594,7 +587,7 @@ src_lib_libnl_cli_3_la_CPPFLAGS = \
77 -I$(srcdir)/include \
78 -I$(builddir)/include
79 src_lib_libnl_cli_3_la_LDFLAGS = \
80 - $(src_lib_ldflags) \
81 + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
82 -Wl,--version-script=$(srcdir)/libnl-cli-3.sym
83 src_lib_libnl_cli_3_la_LIBADD = \
84 lib/libnl-3.la \
85 @@ -679,8 +672,6 @@ else
86 noinst_PROGRAMS += $(cli_programs)
87 endif
88 endif
89 -else
90 -check_PROGRAMS += $(cli_programs)
91 endif
92
93 src_genl_ctrl_list_CPPFLAGS = $(src_cppflags)
94 @@ -858,10 +849,12 @@ tests_test_complex_HTB_with_hash_filters
95 tests_test_u32_filter_with_actions_CPPFLAGS = $(tests_cppflags)
96 tests_test_u32_filter_with_actions_LDADD = $(tests_ldadd)
97
98 +if ENABLE_CLI
99 check_PROGRAMS += \
100 tests/test-cache-mngr \
101 tests/test-genl \
102 tests/test-nf-cache-mngr
103 +endif
104
105 tests_cli_ldadd = \
106 $(tests_ldadd) \