From f8fcdcc041d547e9ac2b4fe243e8a7febf905097 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 4 Apr 2012 22:08:41 +0200 Subject: lttng-libust: rename cxx-tests patch so the other patches gets used as well Signed-off-by: Peter Korsgaard --- ...2-dont-build-cxx-tests-when-not-available.patch | 50 ---------------------- ...t-dont-build-cxx-tests-when-not-available.patch | 50 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 50 deletions(-) delete mode 100644 package/lttng-libust/lttng-libust-1.9.2-dont-build-cxx-tests-when-not-available.patch create mode 100644 package/lttng-libust/lttng-libust-dont-build-cxx-tests-when-not-available.patch (limited to 'package/lttng-libust') diff --git a/package/lttng-libust/lttng-libust-1.9.2-dont-build-cxx-tests-when-not-available.patch b/package/lttng-libust/lttng-libust-1.9.2-dont-build-cxx-tests-when-not-available.patch deleted file mode 100644 index d7be22d2f..000000000 --- a/package/lttng-libust/lttng-libust-1.9.2-dont-build-cxx-tests-when-not-available.patch +++ /dev/null @@ -1,50 +0,0 @@ -Do not build C++ example if a C++ compiler isn't available - -By default lttng-ust builds a hello.cxx C++ example that demonstrates -the usage of the userspace tracing library in a C++ -program. Unfortunately, when no C++ support is available, the build -of lttng-ust fails just because of this example code. So we make the -compilation of this code conditional on whether a working C++ compiler -was found. - -Signed-off-by: Thomas Petazzoni - -Index: lttng-ust-1.9.2/configure.ac -=================================================================== ---- lttng-ust-1.9.2.orig/configure.ac 2012-02-04 14:49:45.387325814 +0100 -+++ lttng-ust-1.9.2/configure.ac 2012-02-04 14:50:08.156920117 +0100 -@@ -38,6 +38,18 @@ - AC_PROG_MAKE_SET - LT_INIT - -+# rw_PROG_CXX_WORKS -+# Check whether the C++ compiler works. -+AC_CACHE_CHECK([whether the C++ compiler works], -+ [rw_cv_prog_cxx_works], -+ [AC_LANG_PUSH([C++]) -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], -+ [rw_cv_prog_cxx_works=yes], -+ [rw_cv_prog_cxx_works=no]) -+ AC_LANG_POP([C++])]) -+ -+AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"]) -+ - ## Checks for libraries. - AC_CHECK_LIB([dl], [dlopen]) - AC_CHECK_LIB([pthread], [pthread_create]) -Index: lttng-ust-1.9.2/tests/Makefile.am -=================================================================== ---- lttng-ust-1.9.2.orig/tests/Makefile.am 2012-02-04 14:49:49.157258640 +0100 -+++ lttng-ust-1.9.2/tests/Makefile.am 2012-02-04 14:50:15.096796474 +0100 -@@ -1,6 +1,10 @@ --SUBDIRS = . hello fork ust-basic-tracing ust-multi-test demo hello.cxx -+SUBDIRS = . hello fork ust-basic-tracing ust-multi-test demo - #SUBDIRS = . hello2 basic basic_long simple_include snprintf test-nevents test-libustinstr-malloc dlopen same_line_marker trace_event register_test tracepoint libustctl_function_tests exit-fast - -+if CXX_WORKS -+SUBDIRS += hello.cxx -+endif -+ - dist_noinst_SCRIPTS = test_loop runtests trace_matches - - noinst_LIBRARIES = libtap.a diff --git a/package/lttng-libust/lttng-libust-dont-build-cxx-tests-when-not-available.patch b/package/lttng-libust/lttng-libust-dont-build-cxx-tests-when-not-available.patch new file mode 100644 index 000000000..d7be22d2f --- /dev/null +++ b/package/lttng-libust/lttng-libust-dont-build-cxx-tests-when-not-available.patch @@ -0,0 +1,50 @@ +Do not build C++ example if a C++ compiler isn't available + +By default lttng-ust builds a hello.cxx C++ example that demonstrates +the usage of the userspace tracing library in a C++ +program. Unfortunately, when no C++ support is available, the build +of lttng-ust fails just because of this example code. So we make the +compilation of this code conditional on whether a working C++ compiler +was found. + +Signed-off-by: Thomas Petazzoni + +Index: lttng-ust-1.9.2/configure.ac +=================================================================== +--- lttng-ust-1.9.2.orig/configure.ac 2012-02-04 14:49:45.387325814 +0100 ++++ lttng-ust-1.9.2/configure.ac 2012-02-04 14:50:08.156920117 +0100 +@@ -38,6 +38,18 @@ + AC_PROG_MAKE_SET + LT_INIT + ++# rw_PROG_CXX_WORKS ++# Check whether the C++ compiler works. ++AC_CACHE_CHECK([whether the C++ compiler works], ++ [rw_cv_prog_cxx_works], ++ [AC_LANG_PUSH([C++]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], ++ [rw_cv_prog_cxx_works=yes], ++ [rw_cv_prog_cxx_works=no]) ++ AC_LANG_POP([C++])]) ++ ++AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"]) ++ + ## Checks for libraries. + AC_CHECK_LIB([dl], [dlopen]) + AC_CHECK_LIB([pthread], [pthread_create]) +Index: lttng-ust-1.9.2/tests/Makefile.am +=================================================================== +--- lttng-ust-1.9.2.orig/tests/Makefile.am 2012-02-04 14:49:49.157258640 +0100 ++++ lttng-ust-1.9.2/tests/Makefile.am 2012-02-04 14:50:15.096796474 +0100 +@@ -1,6 +1,10 @@ +-SUBDIRS = . hello fork ust-basic-tracing ust-multi-test demo hello.cxx ++SUBDIRS = . hello fork ust-basic-tracing ust-multi-test demo + #SUBDIRS = . hello2 basic basic_long simple_include snprintf test-nevents test-libustinstr-malloc dlopen same_line_marker trace_event register_test tracepoint libustctl_function_tests exit-fast + ++if CXX_WORKS ++SUBDIRS += hello.cxx ++endif ++ + dist_noinst_SCRIPTS = test_loop runtests trace_matches + + noinst_LIBRARIES = libtap.a -- cgit v1.2.3