1
0

102-revert-build-enable-building-cli-during-tests.patch 3.0 KB

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