aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-10-21 13:54:13 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-10-21 16:26:47 +0200
commit076fd27da721971f44f681d5a06f68496371d96a (patch)
tree8580aa150f1b153af9ee7aecff4b5a3941223131
parentbef30a9f4b58194e02ff5b2b6b78a3095c72c72c (diff)
downloadbuildroot-076fd27da721971f44f681d5a06f68496371d96a.tar.gz
buildroot-076fd27da721971f44f681d5a06f68496371d96a.tar.bz2
package/gcc: disable libcilkrts when there is no thread support
The libcilkrts configure script errors out with "Pthreads are required to build libcilkrts" if the C library doesn't have thread support. To fix that, we disable libcilkrts when thread support is not available. This issue was not noticed until now, because we only regularly build a no-thread toolchain for ARM, and libcilkrts was enabled on ARM only starting in gcc 7.x. This fixes the build of no-thread toolchains on architectures where libcilkrts is supported, i.e x86/x86-64, ARM and Sparc. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/gcc/gcc-final/gcc-final.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 9897d18682..1be0b9bfc9 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -81,6 +81,11 @@ ifeq ($(BR2_sparc),y)
HOST_GCC_FINAL_CONF_OPTS += --disable-libcilkrts
endif
+# Pthreads are required to build libcilkrts
+ifeq ($(BR2_PTHREADS_NONE),y)
+HOST_GCC_FINAL_CONF_OPTS += --disable-libcilkrts
+endif
+
# Disable shared libs like libstdc++ if we do static since it confuses linking
# In that case also disable libcilkrts as there is no static version
ifeq ($(BR2_STATIC_LIBS),y)