0003-Revert-build-enable-building-cli-during-tests.patch 3.3 KB

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