diff options
Diffstat (limited to 'package/gcc')
-rw-r--r-- | package/gcc/Config.in.host | 22 | ||||
-rw-r--r-- | package/gcc/gcc.mk | 19 |
2 files changed, 30 insertions, 11 deletions
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 7ef6ff21de..6f6e582489 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -30,6 +30,8 @@ choice depends on !BR2_x86_jaguar && !BR2_x86_steamroller # Unsupported for MIPS R6 depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # musl ppc64 unsupported + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64el)) select BR2_GCC_NEEDS_MPC select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 @@ -46,6 +48,10 @@ choice depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25_X) # Unsupported for MIPS R6 depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # musl ppc64 unsupported + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64el)) + # musl mips64 unsupported + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_mips64 || BR2_mips64el)) select BR2_GCC_NEEDS_MPC select BR2_GCC_SUPPORTS_GRAPHITE select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 @@ -66,6 +72,10 @@ choice depends on !BR2_cortex_a17 # Unsupported for MIPS R6 depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # musl ppc64 unsupported + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64el)) + # musl mips64 unsupported + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_mips64 || BR2_mips64el)) # PR60102 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102 select BR2_GCC_NEEDS_MPC select BR2_GCC_SUPPORTS_GRAPHITE @@ -75,6 +85,10 @@ choice bool "gcc 5.x" # Broken or unsupported architectures depends on !BR2_arc && !BR2_bfin + # musl ppc64 unsupported + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64el)) + # musl mips64 unsupported + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_mips64 || BR2_mips64el)) select BR2_GCC_NEEDS_MPC select BR2_GCC_SUPPORTS_GRAPHITE select BR2_TOOLCHAIN_GCC_AT_LEAST_5 @@ -140,14 +154,6 @@ config BR2_TOOLCHAIN_BUILDROOT_FORTRAN Fortran language and you want Fortran libraries to be installed on your target system. -config BR2_GCC_ENABLE_TLS - bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC - default y - depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_GLIBC - help - Enable the compiler to generate code for accessing - thread local storage variables - config BR2_GCC_ENABLE_LTO bool "Enable compiler link-time-optimization support" select BR2_BINUTILS_ENABLE_LTO diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 032015c628..82050b4a59 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -133,10 +133,13 @@ ifeq ($(BR2_sparc)$(BR2_sparc64),y) HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer endif -ifeq ($(BR2_GCC_ENABLE_TLS),y) -HOST_GCC_COMMON_CONF_OPTS += --enable-tls -else +# TLS support is not needed on uClibc/no-thread and +# uClibc/linux-threads, otherwise, for all other situations (glibc, +# musl and uClibc/NPTL), we need it. +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC)$(BR2_PTHREADS)$(BR2_PTHREADS_NONE),yy) HOST_GCC_COMMON_CONF_OPTS += --disable-tls +else +HOST_GCC_COMMON_CONF_OPTS += --enable-tls endif ifeq ($(BR2_GCC_ENABLE_LTO),y) @@ -231,6 +234,16 @@ HOST_GCC_COMMON_CONF_OPTS += \ --with-long-double-128 endif +# PowerPC64 big endian by default uses the elfv1 ABI, and PowerPC 64 +# little endian by default uses the elfv2 ABI. However, musl has +# decided to use the elfv2 ABI for both, so we force the elfv2 ABI for +# Power64 big endian when the selected C library is musl. +ifeq ($(BR2_TOOLCHAIN_USES_MUSL)$(BR2_powerpc64),yy) +HOST_GCC_COMMON_CONF_OPTS += \ + --with-abi=elfv2 \ + --without-long-double-128 +endif + HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CROSS_PATH_SUFFIX='".br_real"' ifeq ($(BR2_GCC_ARCH_HAS_CONFIGURABLE_DEFAULTS),) ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),) |