x86: add kernel module for sp5100_tco watchdog
[lede-git/.git] / toolchain / gcc / final / Makefile
index 1212d145abd8bdf3a22fbf6a68d5d05dadeb81b4..01fec380273752d01c10046f476f785ec34b92aa 100644 (file)
@@ -8,13 +8,9 @@ GCC_CONFIGURE += \
        --enable-languages=$(TARGET_LANGUAGES) \
        --enable-shared \
        --enable-threads \
-       --with-slibdir=$(TOOLCHAIN_DIR)/lib
-
-ifneq ($(CONFIG_GCC_VERSION_4_5)$(CONFIG_GCC_VERSION_4_6),)
-  GCC_CONFIGURE += \
+       --with-slibdir=$(TOOLCHAIN_DIR)/lib \
        --enable-lto \
        --with-libelf=$(TOPDIR)/staging_dir/host
-endif
 
 ifdef CONFIG_USE_MUSL
   GCC_MAKE += gcc_cv_libc_provides_ssp=yes
@@ -43,7 +39,16 @@ define Host/Configure
        );
 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