Selaa lähdekoodia

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>
(cherry picked from commit 076fd27da721971f44f681d5a06f68496371d96a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Thomas Petazzoni 6 vuotta sitten
vanhempi
commit
d7ed6c7ce7
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      package/gcc/gcc-final/gcc-final.mk

+ 5 - 0
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)