X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=toolchain%2Fgcc%2Ffinal%2FMakefile;h=b815f677d669c8cac479d365f52449f64564637c;hb=3056122bf7d5a227b4c581a3b7f47680ac999952;hp=e8c32f629dc77af1eeaae99df135cd54ca407905;hpb=348cae15d2934f07a6c584261c2bee49cc43bbbd;p=openwrt%2Fopenwrt.git diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile index e8c32f629d..b815f677d6 100644 --- a/toolchain/gcc/final/Makefile +++ b/toolchain/gcc/final/Makefile @@ -4,23 +4,16 @@ include ../common.mk GCC_CONFIGURE += \ --with-headers=$(TOOLCHAIN_DIR)/include \ + --disable-libsanitizer \ --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 -ifneq ($(CONFIG_TLS_SUPPORT),) - GCC_CONFIGURE += \ - --enable-tls -else - GCC_CONFIGURE += \ - --disable-tls +ifdef CONFIG_USE_MUSL + GCC_MAKE += gcc_cv_libc_provides_ssp=yes endif ifneq ($(CONFIG_SJLJ_EXCEPTIONS),) @@ -46,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 @@ -65,7 +67,7 @@ endef define Host/Install $(CleanupToolchain) - $(_SINGLE)$(GCC_MAKE) -C $(GCC_BUILD_DIR) install + +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) install # Set up the symlinks to enable lying about target name. set -e; \ (cd $(TOOLCHAIN_DIR); \ @@ -77,6 +79,7 @@ define Host/Install done; \ ); $(if $(CONFIG_EXTRA_TARGET_ARCH),$(call SetupExtraArch)) + $(RM) $(TOOLCHAIN_DIR)/lib/libiberty.a $(SCRIPT_DIR)/patch-specs.sh "$(TOOLCHAIN_DIR)" endef