From 026f14c1353b599546cec24b6b779ff872ff890e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 11 May 2016 10:35:35 -0700 Subject: libunwind: Add a confgure option for tests Tests dont compile on musl due to its use of {get|set}context APIs, adding this option to disable tests helps it to compile Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- .../0001-add-knobs-to-disable-enable-tests.patch | 69 ++++++++++++++++++++++ meta/recipes-support/libunwind/libunwind_git.bb | 5 +- 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch (limited to 'meta/recipes-support/libunwind') diff --git a/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch b/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch new file mode 100644 index 00000000000..673a5bb9951 --- /dev/null +++ b/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch @@ -0,0 +1,69 @@ +From 459e471fcc33d300f7bbcdaf3e0dc338d9dc15b9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Apr 2016 16:56:34 +0000 +Subject: [PATCH] add knobs to disable/enable tests + +Some tests do not compile on musl libc +in general its good to have such a knob +since not all builds may want to enable +tests + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + Makefile.am | 6 +++++- + configure.ac | 12 ++++++++++-- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 6a3ed9e..0c29b3e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -42,7 +42,11 @@ endif + + nodist_include_HEADERS = include/libunwind-common.h + +-SUBDIRS = src tests ++SUBDIRS = src ++ ++if CONFIG_TESTS ++SUBDIRS += tests ++endif + + if CONFIG_DOCS + SUBDIRS += doc +diff --git a/configure.ac b/configure.ac +index 85d78f8..d362387 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -129,6 +129,10 @@ AC_ARG_ENABLE(documentation, + AS_HELP_STRING([--disable-documentation],[Disable generating the man pages]),, + [enable_documentation=yes]) + ++AC_ARG_ENABLE(tests, ++ AS_HELP_STRING([--disable-tests],[Disable building tests]),, ++ [enable_tests=yes]) ++ + AC_MSG_CHECKING([if we should build libunwind-setjmp]) + AC_MSG_RESULT([$enable_setjmp]) + +@@ -395,9 +399,13 @@ AM_CONDITIONAL([CONFIG_DOCS], [test x$enable_documentation = xyes]) + if test "x$enable_documentation" = "xyes"; then + AC_CONFIG_FILES(doc/Makefile doc/common.tex) + fi ++AM_CONDITIONAL([CONFIG_TESTS], [test x$enable_tests = xyes]) ++if test "x$enable_tests" = "xyes"; then ++ AC_CONFIG_FILES(tests/Makefile tests/check-namespace.sh) ++fi ++ + +-AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh +- include/libunwind-common.h ++AC_CONFIG_FILES(Makefile src/Makefile include/libunwind-common.h + include/libunwind.h include/tdep/libunwind_i.h) + AC_CONFIG_FILES(src/unwind/libunwind.pc src/coredump/libunwind-coredump.pc + src/ptrace/libunwind-ptrace.pc src/setjmp/libunwind-setjmp.pc +-- +1.8.3.1 + diff --git a/meta/recipes-support/libunwind/libunwind_git.bb b/meta/recipes-support/libunwind/libunwind_git.bb index 0949a3277cc..cc8c2b541ce 100644 --- a/meta/recipes-support/libunwind/libunwind_git.bb +++ b/meta/recipes-support/libunwind/libunwind_git.bb @@ -9,9 +9,10 @@ SRC_URI = "git://git.sv.gnu.org/libunwind.git \ file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \ file://0001-x86-Stub-out-x86_local_resume.patch \ file://0001-Fix-build-on-mips-musl.patch \ -" + file://0001-add-knobs-to-disable-enable-tests.patch \ + " -EXTRA_OECONF_append_libc-musl = " --disable-documentation" +EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests " # http://errors.yoctoproject.org/Errors/Details/20487/ ARM_INSTRUCTION_SET_armv4 = "arm" -- cgit 1.2.3-korg