From 360fd10ac9cb92425709c76ded0cd418662e121e Mon Sep 17 00:00:00 2001 From: Matteo Croce Date: Fri, 15 Jul 2016 12:17:20 +0200 Subject: gcc: optionally build gccgo compiler Tested with eglibc on x86 and armv7 so far Signed-off-by: Matteo Croce --- toolchain/gcc/common.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'toolchain/gcc/common.mk') diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 14b6682df1..4220cf54f3 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -69,12 +69,15 @@ HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.gcc_$(GCC_VARIANT)_installed SEP:=, -TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)" +TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go)" export libgcc_cv_fixed_point=no ifdef CONFIG_USE_UCLIBC export glibcxx_cv_c99_math_tr1=no endif +ifdef CONFIG_INSTALL_GCCGO + export libgo_cv_c_split_stack_supported=no +endif ifdef CONFIG_GCC_USE_GRAPHITE ifdef CONFIG_GCC_VERSION_4_8 @@ -164,12 +167,17 @@ ifneq ($(CONFIG_SOFT_FLOAT),y) endif endif +ifeq ($(CONFIG_TARGET_x86)$(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yyy) + TARGET_CFLAGS+=-fno-split-stack +endif + GCC_MAKE:= \ export SHELL="$(BASH)"; \ $(MAKE) \ CFLAGS="$(HOST_CFLAGS)" \ CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ - CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" + CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ + GOCFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" define Host/SetToolchainInfo $(SED) 's,TARGET_CROSS=.*,TARGET_CROSS=$(REAL_GNU_TARGET_NAME)-,' $(TOOLCHAIN_DIR)/info.mk -- cgit v1.2.3