Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes
@ 2012-02-04 14:48 Thomas Petazzoni
  2012-02-04 14:48 ` [Buildroot] [PATCH 1/7] liburcu: add patch to fix build with uClibc Thomas Petazzoni
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-04 14:48 UTC (permalink / raw)
  To: buildroot

The following changes since commit 2ba094de31bbc9f986b6d5bce7932d5bb7443829:

  crosstool-ng: bump version (2012-02-03 15:24:39 +0100)

are available in the git repository at:
  http://free-electrons.com/~thomas/buildroot.git for-2012.02/lttng-uclibc-fixes

Thomas Petazzoni (7):
      liburcu: add patch to fix build with uClibc
      lttng-tools: fix build on uClibc due to sync_file_range()
      lttng-babeltrace: make sure WCHAR and LARGEFILE are enabled
      lttng-libust: add the dependency on util-linux
      lttng-tools: make the dependency on lttng-libust optional
      lttng-libust: add patch to fix build issue when C++ support is not available
      lttng-babeltrace: fix build on uClibc due to missing posix_fallocate()

 .../liburcu/liburcu-0.6.7-missing-gnu-source.patch |   13 +++
 package/lttng-babeltrace/Config.in                 |    8 ++
 ...beltrace-0.8-no-posix-fallocate-in-uclibc.patch |   25 ++++++
 package/lttng-libust/Config.in                     |    8 ++
 ...2-dont-build-cxx-tests-when-not-available.patch |   50 +++++++++++
 package/lttng-libust/lttng-libust.mk               |    4 +-
 package/lttng-tools/Config.in                      |    4 +-
 ...ls-2.0-pre15-no-sync-file-range-in-uclibc.patch |   87 ++++++++++++++++++++
 package/lttng-tools/lttng-tools.mk                 |   11 ++-
 9 files changed, 207 insertions(+), 3 deletions(-)
 create mode 100644 package/liburcu/liburcu-0.6.7-missing-gnu-source.patch
 create mode 100644 package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch
 create mode 100644 package/lttng-libust/lttng-libust-1.9.2-dont-build-cxx-tests-when-not-available.patch
 create mode 100644 package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch

Thanks,
-- 
Thomas Petazzoni

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1/7] liburcu: add patch to fix build with uClibc
  2012-02-04 14:48 [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes Thomas Petazzoni
@ 2012-02-04 14:48 ` Thomas Petazzoni
  2012-02-05 10:00   ` Peter Korsgaard
  2012-02-04 14:48 ` [Buildroot] [PATCH 2/7] lttng-tools: fix build on uClibc due to sync_file_range() Thomas Petazzoni
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-04 14:48 UTC (permalink / raw)
  To: buildroot

Under uClibc, defining _GNU_SOURCE is strictly needed to access the
CPU_*() macros.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../liburcu/liburcu-0.6.7-missing-gnu-source.patch |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 package/liburcu/liburcu-0.6.7-missing-gnu-source.patch

diff --git a/package/liburcu/liburcu-0.6.7-missing-gnu-source.patch b/package/liburcu/liburcu-0.6.7-missing-gnu-source.patch
new file mode 100644
index 0000000..f34120c
--- /dev/null
+++ b/package/liburcu/liburcu-0.6.7-missing-gnu-source.patch
@@ -0,0 +1,13 @@
+Define _GNU_SOURCE to access CPU_ZERO() macro in uClibc
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: userspace-rcu-0.6.7/tests/urcutorture.c
+===================================================================
+--- userspace-rcu-0.6.7.orig/tests/urcutorture.c	2012-02-01 10:17:09.938804402 +0100
++++ userspace-rcu-0.6.7/tests/urcutorture.c	2012-02-01 10:17:15.308713372 +0100
+@@ -1,3 +1,4 @@
++#define _GNU_SOURCE
+ #include <string.h>
+ #include <sys/time.h>
+ #include <poll.h>
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/7] lttng-tools: fix build on uClibc due to sync_file_range()
  2012-02-04 14:48 [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes Thomas Petazzoni
  2012-02-04 14:48 ` [Buildroot] [PATCH 1/7] liburcu: add patch to fix build with uClibc Thomas Petazzoni
@ 2012-02-04 14:48 ` Thomas Petazzoni
  2012-02-05 10:11   ` Peter Korsgaard
  2012-02-04 14:48 ` [Buildroot] [PATCH 3/7] lttng-babeltrace: make sure WCHAR and LARGEFILE are enabled Thomas Petazzoni
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-04 14:48 UTC (permalink / raw)
  To: buildroot

Add a patch to use fdatasync() instead of sync_file_range() when the
latter is not available.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...ls-2.0-pre15-no-sync-file-range-in-uclibc.patch |   87 ++++++++++++++++++++
 package/lttng-tools/lttng-tools.mk                 |    2 +
 2 files changed, 89 insertions(+), 0 deletions(-)
 create mode 100644 package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch

diff --git a/package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch b/package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch
new file mode 100644
index 0000000..861686b
--- /dev/null
+++ b/package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch
@@ -0,0 +1,87 @@
+Make sync_file_range() usage optional
+
+Under uClibc, sync_file_range() is not available under all
+architectures, so we fall back to fdatasync() in this case.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: lttng-tools-2.0-pre15/configure.ac
+===================================================================
+--- lttng-tools-2.0-pre15.orig/configure.ac	2012-02-01 16:31:31.140978817 +0100
++++ lttng-tools-2.0-pre15/configure.ac	2012-02-01 16:31:42.110783708 +0100
+@@ -96,7 +96,7 @@
+ 
+ AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [ test "x$ac_cv_lib_lttng_ust_ctl_ustctl_create_session" = "xyes" ])
+ 
+-AC_CHECK_FUNCS([sched_getcpu sysconf])
++AC_CHECK_FUNCS([sched_getcpu sysconf sync_file_range])
+ 
+ # Option to only build the consumer daemon and its libraries
+ AC_ARG_WITH([consumerd-only],
+Index: lttng-tools-2.0-pre15/liblttng-consumer/lttng-consumer.c
+===================================================================
+--- lttng-tools-2.0-pre15.orig/liblttng-consumer/lttng-consumer.c	2012-02-01 16:36:00.876292596 +0100
++++ lttng-tools-2.0-pre15/liblttng-consumer/lttng-consumer.c	2012-02-01 16:36:23.435901163 +0100
+@@ -527,11 +527,15 @@
+ 	if (orig_offset < stream->chan->max_sb_size) {
+ 		return;
+ 	}
++#ifdef HAVE_SYNC_FILE_RANGE
+ 	sync_file_range(outfd, orig_offset - stream->chan->max_sb_size,
+ 			stream->chan->max_sb_size,
+ 			SYNC_FILE_RANGE_WAIT_BEFORE
+ 			| SYNC_FILE_RANGE_WRITE
+ 			| SYNC_FILE_RANGE_WAIT_AFTER);
++#else
++	fdatasync(outfd);
++#endif
+ 	/*
+ 	 * Give hints to the kernel about how we access the file:
+ 	 * POSIX_FADV_DONTNEED : we won't re-access data in a near future after
+Index: lttng-tools-2.0-pre15/liblttng-kconsumer/lttng-kconsumer.c
+===================================================================
+--- lttng-tools-2.0-pre15.orig/liblttng-kconsumer/lttng-kconsumer.c	2012-02-01 16:36:36.215679416 +0100
++++ lttng-tools-2.0-pre15/liblttng-kconsumer/lttng-kconsumer.c	2012-02-01 16:59:08.622203348 +0100
+@@ -71,8 +71,12 @@
+ 			goto end;
+ 		}
+ 		/* This won't block, but will start writeout asynchronously */
++#ifdef HAVE_SYNC_FILE_RANGE
+ 		sync_file_range(outfd, stream->out_fd_offset, ret,
+ 				SYNC_FILE_RANGE_WRITE);
++#else
++		fdatasync(outfd);
++#endif
+ 		stream->out_fd_offset += ret;
+ 	}
+ 
+@@ -121,8 +125,12 @@
+ 		}
+ 		len -= ret;
+ 		/* This won't block, but will start writeout asynchronously */
++#ifdef HAVE_SYNC_FILE_RANGE
+ 		sync_file_range(outfd, stream->out_fd_offset, ret,
+ 				SYNC_FILE_RANGE_WRITE);
++#else
++		fdatasync(outfd);
++#endif
+ 		stream->out_fd_offset += ret;
+ 	}
+ 	lttng_consumer_sync_trace_file(stream, orig_offset);
+Index: lttng-tools-2.0-pre15/liblttng-ustconsumer/lttng-ustconsumer.c
+===================================================================
+--- lttng-tools-2.0-pre15.orig/liblttng-ustconsumer/lttng-ustconsumer.c	2012-02-01 16:37:11.495067263 +0100
++++ lttng-tools-2.0-pre15/liblttng-ustconsumer/lttng-ustconsumer.c	2012-02-01 16:37:31.224724916 +0100
+@@ -70,8 +70,12 @@
+ 			goto end;
+ 		}
+ 		/* This won't block, but will start writeout asynchronously */
++#ifdef HAVE_SYNC_FILE_RANGE
+ 		sync_file_range(outfd, stream->out_fd_offset, ret,
+ 				SYNC_FILE_RANGE_WRITE);
++#else
++		fdatasync(outfd);
++#endif
+ 		stream->out_fd_offset += ret;
+ 	}
+ 
diff --git a/package/lttng-tools/lttng-tools.mk b/package/lttng-tools/lttng-tools.mk
index 9e87480..bcf2f67 100644
--- a/package/lttng-tools/lttng-tools.mk
+++ b/package/lttng-tools/lttng-tools.mk
@@ -8,4 +8,6 @@ LTTNG_TOOLS_SOURCE  = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2
 # trace format into an human readable format.
 LTTNG_TOOLS_DEPENDENCIES = liburcu popt host-lttng-babeltrace lttng-libust
 
+LTTNG_AUTORECONF = YES
+
 $(eval $(call AUTOTARGETS))
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3/7] lttng-babeltrace: make sure WCHAR and LARGEFILE are enabled
  2012-02-04 14:48 [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes Thomas Petazzoni
  2012-02-04 14:48 ` [Buildroot] [PATCH 1/7] liburcu: add patch to fix build with uClibc Thomas Petazzoni
  2012-02-04 14:48 ` [Buildroot] [PATCH 2/7] lttng-tools: fix build on uClibc due to sync_file_range() Thomas Petazzoni
@ 2012-02-04 14:48 ` Thomas Petazzoni
  2012-02-05 10:15   ` Peter Korsgaard
  2012-02-04 14:48 ` [Buildroot] [PATCH 4/7] lttng-libust: add the dependency on util-linux Thomas Petazzoni
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-04 14:48 UTC (permalink / raw)
  To: buildroot

Since lttng-babeltrace depends on util-linux and libglib2, we need to
make sure WCHAR and LARGEFILE are enabled.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lttng-babeltrace/Config.in |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/package/lttng-babeltrace/Config.in b/package/lttng-babeltrace/Config.in
index e6f3845..6f47304 100644
--- a/package/lttng-babeltrace/Config.in
+++ b/package/lttng-babeltrace/Config.in
@@ -4,6 +4,11 @@ config BR2_PACKAGE_LTTNG_BABELTRACE
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
 	select BR2_PACKAGE_LIBGLIB2
+	# libglib2 needs gettext which needs wchar support, and we
+	# also depends on util-linux which needs wchar
+	depends on BR2_USE_WCHAR
+	# util-linux depends on largefile support
+	depends on BR2_LARGEFILE
 	help
 	  Babeltrace is part of the LTTng 2.x project.
 
@@ -20,3 +25,6 @@ config BR2_PACKAGE_LTTNG_BABELTRACE
 	  lttng-tools package.
 
 	  http://lttng.org
+
+comment "lttng-babeltrace needs WCHAR and LARGEFILE support"
+	depends on BR2_PACKAGE_LTTNG_TOOLS && !(BR2_USE_WCHAR || BR2_LARGEFILE)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 4/7] lttng-libust: add the dependency on util-linux
  2012-02-04 14:48 [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2012-02-04 14:48 ` [Buildroot] [PATCH 3/7] lttng-babeltrace: make sure WCHAR and LARGEFILE are enabled Thomas Petazzoni
@ 2012-02-04 14:48 ` Thomas Petazzoni
  2012-02-05 10:15   ` Peter Korsgaard
  2012-02-04 14:48 ` [Buildroot] [PATCH 5/7] lttng-tools: make the dependency on lttng-libust optional Thomas Petazzoni
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-04 14:48 UTC (permalink / raw)
  To: buildroot

This dependency was missing in the initial addition of the package to
Buildroot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lttng-libust/Config.in       |    8 ++++++++
 package/lttng-libust/lttng-libust.mk |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/package/lttng-libust/Config.in b/package/lttng-libust/Config.in
index 335a956..ae74bed 100644
--- a/package/lttng-libust/Config.in
+++ b/package/lttng-libust/Config.in
@@ -1,6 +1,11 @@
 config BR2_PACKAGE_LTTNG_LIBUST
 	bool "lttng-libust"
 	select BR2_PACKAGE_LIBURCU
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	# util-linux needs wchar and largefile
+	depends on BR2_USE_WCHAR
+	depends on BR2_LARGEFILE
 	help
 	  Userspace tracing library for the Lttng tracing
 	  infrastructure. It allows userspace programs to create
@@ -8,3 +13,6 @@ config BR2_PACKAGE_LTTNG_LIBUST
 	  events gathered by LTTng.
 
 	  http://lttng.org
+
+comment "lttng-libust needs WCHAR and LARGEFILE support"
+	depends on !(BR2_USE_WCHAR || BR2_LARGEFILE)
diff --git a/package/lttng-libust/lttng-libust.mk b/package/lttng-libust/lttng-libust.mk
index a2cef2a..ebe14ca 100644
--- a/package/lttng-libust/lttng-libust.mk
+++ b/package/lttng-libust/lttng-libust.mk
@@ -3,6 +3,6 @@ LTTNG_LIBUST_VERSION = 1.9.2
 LTTNG_LIBUST_SOURCE  = lttng-ust-$(LTTNG_LIBUST_VERSION).tar.gz
 
 LTTNG_LIBUST_INSTALL_STAGING = YES
-LTTNG_LIBUST_DEPENDENCIES    = liburcu
+LTTNG_LIBUST_DEPENDENCIES    = liburcu util-linux
 
 $(eval $(call AUTOTARGETS))
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 5/7] lttng-tools: make the dependency on lttng-libust optional
  2012-02-04 14:48 [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2012-02-04 14:48 ` [Buildroot] [PATCH 4/7] lttng-libust: add the dependency on util-linux Thomas Petazzoni
@ 2012-02-04 14:48 ` Thomas Petazzoni
  2012-02-05 10:17   ` Peter Korsgaard
  2012-02-04 14:48 ` [Buildroot] [PATCH 6/7] lttng-libust: add patch to fix build issue when C++ support is not available Thomas Petazzoni
  2012-02-04 14:48 ` [Buildroot] [PATCH 7/7] lttng-babeltrace: fix build on uClibc due to missing posix_fallocate() Thomas Petazzoni
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-04 14:48 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lttng-tools/Config.in      |    4 +++-
 package/lttng-tools/lttng-tools.mk |    9 ++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/package/lttng-tools/Config.in b/package/lttng-tools/Config.in
index cc74966..3040af6 100644
--- a/package/lttng-tools/Config.in
+++ b/package/lttng-tools/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_LTTNG_TOOLS
 	depends on BR2_PACKAGE_LTTNG_MODULES
 	select BR2_PACKAGE_LIBURCU
 	select BR2_PACKAGE_POPT
-	select BR2_PACKAGE_LTTNG_LIBUST
 	help
 	  Userspace utilities for the LTTng 2.0 tracing
 	  infrastructure.
@@ -17,4 +16,7 @@ config BR2_PACKAGE_LTTNG_TOOLS
 	  package for the target, if babeltrace on the target is
 	  interesting.
 
+	  If userspace tracing is desired, you need to enable
+	  lttng-libust.
+
 	  http://lttng.org
diff --git a/package/lttng-tools/lttng-tools.mk b/package/lttng-tools/lttng-tools.mk
index bcf2f67..8e6fc1a 100644
--- a/package/lttng-tools/lttng-tools.mk
+++ b/package/lttng-tools/lttng-tools.mk
@@ -6,8 +6,15 @@ LTTNG_TOOLS_SOURCE  = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2
 # dependency. However, having the babeltrace utilities built for the
 # host is very useful, since those tools allow to convert the binary
 # trace format into an human readable format.
-LTTNG_TOOLS_DEPENDENCIES = liburcu popt host-lttng-babeltrace lttng-libust
+LTTNG_TOOLS_DEPENDENCIES = liburcu popt host-lttng-babeltrace
 
 LTTNG_AUTORECONF = YES
 
+ifeq ($(BR2_PACKAGE_LTTNG_LIBUST),y)
+LTTNG_TOOLS_CONF_OPT += --enable-lttng-ust
+LTTNG_TOOLS_DEPENDENCIES += lttng-libust
+else
+LTTNG_TOOLS_CONF_OPT += --disable-lttng-ust
+endif
+
 $(eval $(call AUTOTARGETS))
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 6/7] lttng-libust: add patch to fix build issue when C++ support is not available
  2012-02-04 14:48 [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2012-02-04 14:48 ` [Buildroot] [PATCH 5/7] lttng-tools: make the dependency on lttng-libust optional Thomas Petazzoni
@ 2012-02-04 14:48 ` Thomas Petazzoni
  2012-02-05 10:28   ` Peter Korsgaard
  2012-02-04 14:48 ` [Buildroot] [PATCH 7/7] lttng-babeltrace: fix build on uClibc due to missing posix_fallocate() Thomas Petazzoni
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-04 14:48 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...2-dont-build-cxx-tests-when-not-available.patch |   50 ++++++++++++++++++++
 package/lttng-libust/lttng-libust.mk               |    2 +
 2 files changed, 52 insertions(+), 0 deletions(-)
 create mode 100644 package/lttng-libust/lttng-libust-1.9.2-dont-build-cxx-tests-when-not-available.patch

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
new file mode 100644
index 0000000..b1b94b0
--- /dev/null
+++ b/package/lttng-libust/lttng-libust-1.9.2-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 isa 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 <thomas.petazzoni@free-electrons.com>
+
+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.mk b/package/lttng-libust/lttng-libust.mk
index ebe14ca..f54999e 100644
--- a/package/lttng-libust/lttng-libust.mk
+++ b/package/lttng-libust/lttng-libust.mk
@@ -5,4 +5,6 @@ LTTNG_LIBUST_SOURCE  = lttng-ust-$(LTTNG_LIBUST_VERSION).tar.gz
 LTTNG_LIBUST_INSTALL_STAGING = YES
 LTTNG_LIBUST_DEPENDENCIES    = liburcu util-linux
 
+LTTNG_LIBUST_AUTORECONF = YES
+
 $(eval $(call AUTOTARGETS))
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 7/7] lttng-babeltrace: fix build on uClibc due to missing posix_fallocate()
  2012-02-04 14:48 [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2012-02-04 14:48 ` [Buildroot] [PATCH 6/7] lttng-libust: add patch to fix build issue when C++ support is not available Thomas Petazzoni
@ 2012-02-04 14:48 ` Thomas Petazzoni
  2012-02-05 13:41   ` Peter Korsgaard
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-04 14:48 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...beltrace-0.8-no-posix-fallocate-in-uclibc.patch |   25 ++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch

diff --git a/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch b/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch
new file mode 100644
index 0000000..5ba7f1d
--- /dev/null
+++ b/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch
@@ -0,0 +1,25 @@
+Do not call posix_fallocate() on uClibc
+
+uClibc does not implement posix_fallocate(), and posix_fallocate() is
+mostly only an hint to the kernel that we will need such or such
+amount of space inside a file. So we just don't call posix_fallocate()
+when building against uClibc.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: lttng-babeltrace-0.8/formats/ctf/ctf.c
+===================================================================
+--- lttng-babeltrace-0.8.orig/formats/ctf/ctf.c	2012-02-04 09:01:16.788552141 +0100
++++ lttng-babeltrace-0.8/formats/ctf/ctf.c	2012-02-04 09:01:33.638258644 +0100
+@@ -384,9 +384,11 @@
+ 		}
+ 		pos->content_size = -1U;	/* Unknown at this point */
+ 		pos->packet_size = WRITE_PACKET_LEN;
++#ifndef __UCLIBC__
+ 		off = posix_fallocate(pos->fd, pos->mmap_offset,
+ 				      pos->packet_size / CHAR_BIT);
+ 		assert(off >= 0);
++#endif
+ 		pos->offset = 0;
+ 	} else {
+ 	read_next_packet:
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1/7] liburcu: add patch to fix build with uClibc
  2012-02-04 14:48 ` [Buildroot] [PATCH 1/7] liburcu: add patch to fix build with uClibc Thomas Petazzoni
@ 2012-02-05 10:00   ` Peter Korsgaard
  2012-02-05 10:07     ` Thomas Petazzoni
  0 siblings, 1 reply; 16+ messages in thread
From: Peter Korsgaard @ 2012-02-05 10:00 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Under uClibc, defining _GNU_SOURCE is strictly needed to access the
 Thomas> CPU_*() macros.

Committed, thanks. Don't forget to send patch upstream.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1/7] liburcu: add patch to fix build with uClibc
  2012-02-05 10:00   ` Peter Korsgaard
@ 2012-02-05 10:07     ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2012-02-05 10:07 UTC (permalink / raw)
  To: buildroot

Le Sun, 05 Feb 2012 11:00:57 +0100,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> >>>>> "Thomas" == Thomas Petazzoni
> >>>>> <thomas.petazzoni@free-electrons.com> writes:
> 
>  Thomas> Under uClibc, defining _GNU_SOURCE is strictly needed to
>  Thomas> access the CPU_*() macros.
> 
> Committed, thanks. Don't forget to send patch upstream.

This is done:
http://lists.lttng.org/pipermail/lttng-dev/2012-February/017509.html

The other ones need some update, as the upstream version has evolved
compared to the version we have in Buildroot, but I intend to send
them upstream after updating the patches.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/7] lttng-tools: fix build on uClibc due to sync_file_range()
  2012-02-04 14:48 ` [Buildroot] [PATCH 2/7] lttng-tools: fix build on uClibc due to sync_file_range() Thomas Petazzoni
@ 2012-02-05 10:11   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2012-02-05 10:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Add a patch to use fdatasync() instead of sync_file_range() when the
 Thomas> latter is not available.

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  ...ls-2.0-pre15-no-sync-file-range-in-uclibc.patch |   87 ++++++++++++++++++++
 Thomas>  package/lttng-tools/lttng-tools.mk                 |    2 +
 Thomas>  2 files changed, 89 insertions(+), 0 deletions(-)
 Thomas>  create mode 100644 package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch

 Thomas> diff --git a/package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch b/package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch
 Thomas> new file mode 100644
 Thomas> index 0000000..861686b
 Thomas> --- /dev/null
 Thomas> +++ b/package/lttng-tools/lttng-tools-2.0-pre15-no-sync-file-range-in-uclibc.patch
 Thomas> @@ -0,0 +1,87 @@
 Thomas> +Make sync_file_range() usage optional
 Thomas> +
 Thomas> +Under uClibc, sync_file_range() is not available under all
 Thomas> +architectures, so we fall back to fdatasync() in this case.

And as far as I can see, it's also only available if LFS support is
present.

Committed, thanks. Don't forget to send patch upstream.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3/7] lttng-babeltrace: make sure WCHAR and LARGEFILE are enabled
  2012-02-04 14:48 ` [Buildroot] [PATCH 3/7] lttng-babeltrace: make sure WCHAR and LARGEFILE are enabled Thomas Petazzoni
@ 2012-02-05 10:15   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2012-02-05 10:15 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Since lttng-babeltrace depends on util-linux and libglib2, we need to
 Thomas> make sure WCHAR and LARGEFILE are enabled.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 4/7] lttng-libust: add the dependency on util-linux
  2012-02-04 14:48 ` [Buildroot] [PATCH 4/7] lttng-libust: add the dependency on util-linux Thomas Petazzoni
@ 2012-02-05 10:15   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2012-02-05 10:15 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> This dependency was missing in the initial addition of the package to
 Thomas> Buildroot.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 5/7] lttng-tools: make the dependency on lttng-libust optional
  2012-02-04 14:48 ` [Buildroot] [PATCH 5/7] lttng-tools: make the dependency on lttng-libust optional Thomas Petazzoni
@ 2012-02-05 10:17   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2012-02-05 10:17 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 6/7] lttng-libust: add patch to fix build issue when C++ support is not available
  2012-02-04 14:48 ` [Buildroot] [PATCH 6/7] lttng-libust: add patch to fix build issue when C++ support is not available Thomas Petazzoni
@ 2012-02-05 10:28   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2012-02-05 10:28 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  ...2-dont-build-cxx-tests-when-not-available.patch |   50 ++++++++++++++++++++
 Thomas>  package/lttng-libust/lttng-libust.mk               |    2 +
 Thomas>  2 files changed, 52 insertions(+), 0 deletions(-)
 Thomas>  create mode 100644 package/lttng-libust/lttng-libust-1.9.2-dont-build-cxx-tests-when-not-available.patch

 Thomas> 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
 Thomas> new file mode 100644
 Thomas> index 0000000..b1b94b0
 Thomas> --- /dev/null
 Thomas> +++ b/package/lttng-libust/lttng-libust-1.9.2-dont-build-cxx-tests-when-not-available.patch
 Thomas> @@ -0,0 +1,50 @@
 Thomas> +Do not build C++ example if a C++ compiler isn't available
 Thomas> +
 Thomas> +By default lttng-ust builds a hello.cxx C++ example that demonstrates
 Thomas> +the usage of the userspace tracing library in a C++
 Thomas> +program. Unfortunately, when no C++ support isa available, the build

s/isa/is/. Otherwise it looks good, committed - Thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 7/7] lttng-babeltrace: fix build on uClibc due to missing posix_fallocate()
  2012-02-04 14:48 ` [Buildroot] [PATCH 7/7] lttng-babeltrace: fix build on uClibc due to missing posix_fallocate() Thomas Petazzoni
@ 2012-02-05 13:41   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2012-02-05 13:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  ...beltrace-0.8-no-posix-fallocate-in-uclibc.patch |   25 ++++++++++++++++++++
 Thomas>  1 files changed, 25 insertions(+), 0 deletions(-)
 Thomas>  create mode 100644 package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch

 Thomas> diff --git a/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch b/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch
 Thomas> new file mode 100644
 Thomas> index 0000000..5ba7f1d
 Thomas> --- /dev/null
 Thomas> +++ b/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch
 Thomas> @@ -0,0 +1,25 @@
 Thomas> +Do not call posix_fallocate() on uClibc
 Thomas> +
 Thomas> +uClibc does not implement posix_fallocate(), and posix_fallocate() is
 Thomas> +mostly only an hint to the kernel that we will need such or such
 Thomas> +amount of space inside a file. So we just don't call posix_fallocate()
 Thomas> +when building against uClibc.
 Thomas> +
 Thomas> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Normally you need to #include <features.h> to get the __UCLIBC__
define. I don't see any explicit includes of it anywhere in babeltrace,
but presumably some of the headers indirectly include it.

I've added the explicit include to the patch and committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-02-05 13:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-04 14:48 [Buildroot] [pull request] Pull request for branch for-2012.02/lttng-uclibc-fixes Thomas Petazzoni
2012-02-04 14:48 ` [Buildroot] [PATCH 1/7] liburcu: add patch to fix build with uClibc Thomas Petazzoni
2012-02-05 10:00   ` Peter Korsgaard
2012-02-05 10:07     ` Thomas Petazzoni
2012-02-04 14:48 ` [Buildroot] [PATCH 2/7] lttng-tools: fix build on uClibc due to sync_file_range() Thomas Petazzoni
2012-02-05 10:11   ` Peter Korsgaard
2012-02-04 14:48 ` [Buildroot] [PATCH 3/7] lttng-babeltrace: make sure WCHAR and LARGEFILE are enabled Thomas Petazzoni
2012-02-05 10:15   ` Peter Korsgaard
2012-02-04 14:48 ` [Buildroot] [PATCH 4/7] lttng-libust: add the dependency on util-linux Thomas Petazzoni
2012-02-05 10:15   ` Peter Korsgaard
2012-02-04 14:48 ` [Buildroot] [PATCH 5/7] lttng-tools: make the dependency on lttng-libust optional Thomas Petazzoni
2012-02-05 10:17   ` Peter Korsgaard
2012-02-04 14:48 ` [Buildroot] [PATCH 6/7] lttng-libust: add patch to fix build issue when C++ support is not available Thomas Petazzoni
2012-02-05 10:28   ` Peter Korsgaard
2012-02-04 14:48 ` [Buildroot] [PATCH 7/7] lttng-babeltrace: fix build on uClibc due to missing posix_fallocate() Thomas Petazzoni
2012-02-05 13:41   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox