diff mbox

[1/3] ltrace: Explicit enable/disable of libunwind

Message ID 1376041019-26688-2-git-send-email-jezz@sysmic.org
State Superseded
Headers show

Commit Message

Jérôme Pouiller Aug. 9, 2013, 9:36 a.m. UTC
ltrace automaticaly use libunwind if detected. So depending if libunwind was
already compiled or not, ltrcae compile differently. This patch add explicit
dependency to libunwind if detected.

In add, due to limitation of luclibc, ltrace cannot use libunwind with uclib. this patch explicitly compile without libunwind in this case.

Resolve issues detected here:
    http://autobuild.buildroot.net/results/79dae85647526cdeddae5050db0339fbc38c9ae6
    http://autobuild.buildroot.net/results/808569f6bfac059b57eb4f1e692fbc9909e791cf
    http://autobuild.buildroot.net/results/83d0cd13d64053869708c666e2aa533202af67f7

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
---
 package/ltrace/ltrace.mk |    9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Baruch Siach Aug. 9, 2013, 10:23 a.m. UTC | #1
Hi Jérôme,

On Fri, Aug 09, 2013 at 11:36:57AM +0200, Jérôme Pouiller wrote:
> ltrace automaticaly use libunwind if detected. So depending if libunwind was
> already compiled or not, ltrcae compile differently. This patch add explicit
> dependency to libunwind if detected.
> 
> In add, due to limitation of luclibc, ltrace cannot use libunwind with uclib. this patch explicitly compile without libunwind in this case.

s/luclibc/uclibc/

Also, please warp log message lines at about 80 characters.

baruch

> Resolve issues detected here:
>     http://autobuild.buildroot.net/results/79dae85647526cdeddae5050db0339fbc38c9ae6
>     http://autobuild.buildroot.net/results/808569f6bfac059b57eb4f1e692fbc9909e791cf
>     http://autobuild.buildroot.net/results/83d0cd13d64053869708c666e2aa533202af67f7
> 
> Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
> ---
>  package/ltrace/ltrace.mk |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk
> index 7b8d859..4d81121 100644
> --- a/package/ltrace/ltrace.mk
> +++ b/package/ltrace/ltrace.mk
> @@ -13,4 +13,13 @@ LTRACE_CONF_OPT = --disable-werror
>  LTRACE_LICENSE = GPLv2
>  LTRACE_LICENSE_FILES = COPYING
>  
> +LTRACE_LIBUNWIDFLAG = --without-libunwind
> +ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
> +  ifneq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
> +    LTRACE_DEPENDENCIES = libunwind
> +    LTRACE_LIBUNWIDFLAG = --with-libunwind
> +  endif
> +endif
> +LTRACE_CONF_OPT = $(LTRACE_LIBUNWIDFLAG)
> +
>  $(eval $(autotools-package))
> -- 
> 1.7.9.5
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni Aug. 9, 2013, 10:24 a.m. UTC | #2
Dear Jérôme Pouiller,

On Fri,  9 Aug 2013 11:36:57 +0200, Jérôme Pouiller wrote:
> ltrace automaticaly use libunwind if detected. So depending if libunwind was

automatically uses

> already compiled or not, ltrcae compile differently. This patch add explicit

ltrace compiles

This patch adds an

> dependency to libunwind if detected.
> 
> In add, due to limitation of luclibc, ltrace cannot use libunwind with uclib. this patch explicitly compile without libunwind in this case.

Line should be wrapped and fixed from typos.


> diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk
> index 7b8d859..4d81121 100644
> --- a/package/ltrace/ltrace.mk
> +++ b/package/ltrace/ltrace.mk
> @@ -13,4 +13,13 @@ LTRACE_CONF_OPT = --disable-werror
>  LTRACE_LICENSE = GPLv2
>  LTRACE_LICENSE_FILES = COPYING
>  
> +LTRACE_LIBUNWIDFLAG = --without-libunwind
> +ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
> +  ifneq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
> +    LTRACE_DEPENDENCIES = libunwind
> +    LTRACE_LIBUNWIDFLAG = --with-libunwind
> +  endif
> +endif
> +LTRACE_CONF_OPT = $(LTRACE_LIBUNWIDFLAG)

That's not how we typically write such things. We normally do something
like:

ifeq ($(BR2_PACKAGE_LIBUNWIND)$(BR2_TOOLCHAIN_USES_GLIBC),yy)
LTRACE_DEPENDENCIES += libunwind
LTRACE_CONF_OPT += --with-libunwind
else
LTRACE_CONF_OPT += --without-libunwind
endif

Thanks,

Thomas
diff mbox

Patch

diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk
index 7b8d859..4d81121 100644
--- a/package/ltrace/ltrace.mk
+++ b/package/ltrace/ltrace.mk
@@ -13,4 +13,13 @@  LTRACE_CONF_OPT = --disable-werror
 LTRACE_LICENSE = GPLv2
 LTRACE_LICENSE_FILES = COPYING
 
+LTRACE_LIBUNWIDFLAG = --without-libunwind
+ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
+  ifneq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+    LTRACE_DEPENDENCIES = libunwind
+    LTRACE_LIBUNWIDFLAG = --with-libunwind
+  endif
+endif
+LTRACE_CONF_OPT = $(LTRACE_LIBUNWIDFLAG)
+
 $(eval $(autotools-package))