default n
help
Build/install GNU fortran compiler ?
+
+config INSTALL_GCCGO
+ bool
+ prompt "Build/install Go compiler?" if TOOLCHAINOPTS
+ depends on !GCC_VERSION_4_8 && (USE_GLIBC || BROKEN)
+ default n
+ help
+ Build/install GNU gccgo compiler ?
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
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
);
endef
+ifeq ($(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yy)
+define FixGogccCrt
+ # link crtX.o for gotools
+ mkdir -p $(GCC_BUILD_DIR)/gotools
+ $(foreach crt, i 1 n, ln -sf ../../glibc-dev/lib/crt$(crt).o $(GCC_BUILD_DIR)/gotools/ ; )
+endef
+endif
+
define Host/Compile
+ $(FixGogccCrt)
+$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) all
endef
--- /dev/null
+--- a/gcc/go/Make-lang.in
++++ b/gcc/go/Make-lang.in
+@@ -74,7 +74,7 @@ go_OBJS = $(GO_OBJS) go/gospec.o
+
+ go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS)
+ +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
+- $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
++ $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -lm
+
+ # Documentation.
+
--- /dev/null
+--- a/libgo/runtime/mprof.goc
++++ b/libgo/runtime/mprof.goc
+@@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int
+
+ func Stack(b Slice, all bool) (n int) {
+ byte *pc, *sp;
+- bool enablegc;
++ bool enablegc = false; /* workaround GCC bug #36550 */
+
+ sp = runtime_getcallersp(&b);
+ pc = (byte*)(uintptr)runtime_getcallerpc(&b);