0001-Disable-test-static-link-in-case-of-shared-only-buil.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 8cef0e4a9e0412db6fa37f5fae30efa57e94136f Mon Sep 17 00:00:00 2001
  2. From: Peter Seiderer <ps.report@gmx.net>
  3. Date: Mon, 9 Mar 2015 22:01:52 +0100
  4. Subject: [PATCH] Disable test-static-link in case of shared only build.
  5. Fixes the following buildroot compile failure:
  6. libtool: link: [..]/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -o test-static-link test_static_link-test-link.o ../libevdev/.libs/libevdev.so -Wl,-rpath -Wl,[...]/build/libevdev-1.4/libevdev/.libs
  7. [...]/arm-buildroot-linux-uclibcgnueabi/bin/ld: attempted static link of dynamic object `../libevdev/.libs/libevdev.so'
  8. collect2: error: ld returned 1 exit status
  9. Makefile:719: recipe for target 'test-static-link' failed
  10. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  11. ---
  12. configure.ac | 1 +
  13. test/Makefile.am | 7 ++++++-
  14. 2 files changed, 7 insertions(+), 1 deletion(-)
  15. diff --git a/configure.ac b/configure.ac
  16. index c25b36f..be2e157 100644
  17. --- a/configure.ac
  18. +++ b/configure.ac
  19. @@ -75,6 +75,7 @@ else
  20. fi
  21. AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
  22. AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x$HAVE_CHECK" = "xyes"])
  23. +AM_CONDITIONAL(ENABLE_STATIC_LINK_TEST, [test "x$enable_static" = "xyes"])
  24. with_cflags=""
  25. if test "x$GCC" = "xyes"; then
  26. diff --git a/test/Makefile.am b/test/Makefile.am
  27. index ab4752e..1fe1e7e 100644
  28. --- a/test/Makefile.am
  29. +++ b/test/Makefile.am
  30. @@ -1,4 +1,9 @@
  31. -build_tests = test-compile-pedantic test-link test-static-link
  32. +build_tests = test-compile-pedantic test-link
  33. +
  34. +if ENABLE_STATIC_LINK_TEST
  35. +build_tests += test-static-link
  36. +endif
  37. +
  38. noinst_PROGRAMS = $(build_tests)
  39. AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/libevdev
  40. --
  41. 2.1.4