From 31a3f4bd54e12b8d6de286ab8fb6d9651990e2f5 Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Mon, 2 Nov 2015 00:25:26 +0100 Subject: [PATCH] valgrind: enable tls support Tested with example program from [1] with qemu_x86_64. [1] http://valgrind.10908.n7.nabble.com/Thread-local-storage-TLS-support-td40815.html Signed-off-by: Peter Seiderer Signed-off-by: Thomas Petazzoni --- package/valgrind/valgrind.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk index 75d542add7..5849b498bd 100644 --- a/package/valgrind/valgrind.mk +++ b/package/valgrind/valgrind.mk @@ -9,9 +9,15 @@ VALGRIND_SITE = http://valgrind.org/downloads VALGRIND_SOURCE = valgrind-$(VALGRIND_VERSION).tar.bz2 VALGRIND_LICENSE = GPLv2 GFDLv1.2 VALGRIND_LICENSE_FILES = COPYING COPYING.DOCS -VALGRIND_CONF_OPTS = --disable-tls --disable-ubsan +VALGRIND_CONF_OPTS = --disable-ubsan VALGRIND_INSTALL_STAGING = YES +ifeq ($(BR2_GCC_ENABLE_TLS),y) +VALGRIND_CONF_OPTS += --enable-tls +else +VALGRIND_CONF_OPTS += --disable-tls +endif + # When Valgrind detects a 32-bit MIPS architecture, it forcibly adds # -march=mips32 to CFLAGS; when it detects a 64-bit MIPS architecture, # it forcibly adds -march=mips64. This causes Valgrind to be built -- 2.30.2