Skip to contentSkip to conversation

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

PATCH New Stefan Froberg 2 participants 4 messages Aug 12, 2012 – Aug 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 valgrind: valgrind/valgrind.h missing if --disable-tls enabled

Enabling valgrind support and then doing debug build of Firefox started configure script nagging about missing valgrind/valgrind.h file.

Found out that if --disable-tls is in VALGRIND_CONF_OPT then
the valgrind installation process will not include the previously mentioned file.

So this patch will enable/disable TLS for valgrind depending of what you have in your compiler BR2_GCC_ENABLE_TLS setting.

#1 lore raw

PATCH 1/1 valgrind: valgrind/valgrind.h missing if --disable-tls enabled

---
 package/valgrind/valgrind.mk |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
package/valgrind/valgrind.mk +6 -1
index 05f402f..c39da4f 100644
@@ -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
Signature · 1 line
1.7.7.6
#2 lore raw

PATCH 1/1 valgrind: valgrind/valgrind.h missing if --disable-tls enabled

package/valgrind/valgrind.mk line 15

Quoted 5 lines · Stefan Froberg
package/valgrind/valgrind.mk +5 -0
+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

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#3 lore raw

PATCH 1/1 valgrind: valgrind/valgrind.h missing if --disable-tls enabled

Good morning Arnout

22.8.2012 1:25, Arnout Vandecappelle kirjoitti:

Quoted 12 lines · Stefan Froberg

package/valgrind/valgrind.mk line 15

Quoted 5 lines
package/valgrind/valgrind.mk +5 -0
+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

Quoted 4 lines

Regards,
Arnout