Patchwork valgrind: valgrind/valgrind.h missing if --disable-tls enabled

login
register
mail settings
Submitter Stefan Fröberg
Date Aug. 12, 2012, 7:56 p.m.
Message ID <1344801370-14582-2-git-send-email-stefan.froberg@petroprogram.com>
Download mbox | patch
Permalink /patch/176795/
State Rejected
Headers show

Comments

Stefan Fröberg - Aug. 12, 2012, 7:56 p.m.
Signed-off-by: Stefan Froberg <stefan.froberg@petroprogram.com>
---
 package/valgrind/valgrind.mk |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
Arnout Vandecappelle - Aug. 21, 2012, 10:25 p.m.
On 08/12/12 21:56, Stefan Froberg wrote:
> +ifeq ($(BR2_GCC_ENABLE_TLS),y)
> +	VALGRIND_CONF_OPT = --enable-tls
> +else
> +	VALGRIND_CONF_OPT = --disable-tls
> +endif

  This will only work for buildroot toolchains, not for crosstool-NG or external
toolchains...



  Regards,
  Arnout
Stefan Fröberg - Aug. 22, 2012, 8:58 a.m.
Good morning Arnout

22.8.2012 1:25, Arnout Vandecappelle kirjoitti:
> On 08/12/12 21:56, Stefan Froberg wrote:
>> +ifeq ($(BR2_GCC_ENABLE_TLS),y)
>> +    VALGRIND_CONF_OPT = --enable-tls
>> +else
>> +    VALGRIND_CONF_OPT = --disable-tls
>> +endif
>
>  This will only work for buildroot toolchains, not for crosstool-NG or
> external
> toolchains...
>
>

Hmmm...
How about this then?

ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) && ($(BR2_GCC_ENABLE_TLS),y)
        VALGRIND_CONF_OPT = --enable-tls
else
        VALGRIND_CONF_OPT = --disable-tls
endif

Enabling only tls if using buildroot toolchain and tls selected in gcc
and otherwise disabled.

Stefan

>
>  Regards,
>  Arnout
>

Patch

diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk
index 05f402f..c39da4f 100644
--- a/package/valgrind/valgrind.mk
+++ b/package/valgrind/valgrind.mk
@@ -7,7 +7,12 @@ 
 VALGRIND_VERSION = 3.7.0
 VALGRIND_SITE    = http://valgrind.org/downloads/
 VALGRIND_SOURCE  = valgrind-$(VALGRIND_VERSION).tar.bz2
-VALGRIND_CONF_OPT = --disable-tls
+
+ifeq ($(BR2_GCC_ENABLE_TLS),y)
+	VALGRIND_CONF_OPT = --enable-tls
+else
+	VALGRIND_CONF_OPT = --disable-tls
+endif
 
 # On ARM, Valgrind only supports ARMv7, and uses the arch part of the
 # host tuple to determine whether it's being built for ARMv7 or