1 ################################################################################
5 ################################################################################
7 GCC_INITIAL_VERSION = $(GCC_VERSION)
8 GCC_INITIAL_SITE = $(GCC_SITE)
9 GCC_INITIAL_SOURCE = $(GCC_SOURCE)
11 HOST_GCC_INITIAL_DEPENDENCIES = $(HOST_GCC_COMMON_DEPENDENCIES)
13 HOST_GCC_INITIAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS)
15 ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
16 HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
19 HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES
21 # gcc doesn't support in-tree build, so we create a 'build'
22 # subdirectory in the gcc sources, and build from there.
23 HOST_GCC_INITIAL_SUBDIR = build
25 HOST_GCC_INITIAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
27 # gcc on ARC has a bug: in its libgcc, even when no C library is
28 # available (--with-newlib is passed, and therefore inhibit_libc is
29 # defined), it tries to use the C library for the libgmon
30 # library. Since it's not needed in gcc-initial, we disabled it here.
31 ifeq ($(BR2_GCC_VERSION_4_8_ARC),y)
32 define HOST_GCC_INITIAL_DISABLE_LIBGMON
33 $(SED) 's/crtbeginS.o libgmon.a crtg.o/crtbeginS.o crtg.o/' \
34 $(@D)/libgcc/config.host
36 HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_INITIAL_DISABLE_LIBGMON
39 HOST_GCC_INITIAL_CONF_OPTS = \
40 $(HOST_GCC_COMMON_CONF_OPTS) \
41 --enable-languages=c \
48 $(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
50 HOST_GCC_INITIAL_CONF_ENV = \
51 $(HOST_GCC_COMMON_CONF_ENV)
53 # We need to tell gcc that the C library will be providing the ssp
54 # support, as it can't guess it since the C library hasn't been built
55 # yet (we're gcc-initial).
56 HOST_GCC_INITIAL_MAKE_OPTS = $(if $(BR2_TOOLCHAIN_HAS_SSP),gcc_cv_libc_provides_ssp=yes) all-gcc
57 HOST_GCC_INITIAL_INSTALL_OPTS = install-gcc
59 ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
60 HOST_GCC_INITIAL_MAKE_OPTS += all-target-libgcc
61 HOST_GCC_INITIAL_INSTALL_OPTS += install-target-libgcc
64 $(eval $(host-autotools-package))