2010-07-21 04:57:21 +08:00
|
|
|
GCC_VARIANT:=initial
|
2016-07-07 20:12:30 +08:00
|
|
|
GCC_PREPARE=$(CONFIG_USE_MUSL)
|
2010-07-21 04:57:21 +08:00
|
|
|
|
|
|
|
include ../common.mk
|
|
|
|
|
|
|
|
GCC_CONFIGURE += \
|
|
|
|
--with-newlib \
|
2010-08-19 20:49:51 +08:00
|
|
|
--with-sysroot=$(TOOLCHAIN_DIR) \
|
2010-07-21 04:57:21 +08:00
|
|
|
--enable-languages=c \
|
|
|
|
--disable-shared \
|
|
|
|
--disable-threads \
|
|
|
|
|
|
|
|
define Host/Compile
|
2012-09-23 17:50:01 +08:00
|
|
|
+$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) \
|
2010-07-21 04:57:21 +08:00
|
|
|
all-build-libiberty \
|
|
|
|
all-gcc \
|
2013-04-01 23:43:23 +08:00
|
|
|
all-target-libgcc
|
2010-07-21 04:57:21 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
|
|
|
$(GCC_MAKE) -C $(GCC_BUILD_DIR) \
|
2012-07-01 02:12:15 +08:00
|
|
|
prefix="$(TOOLCHAIN_DIR)/initial" \
|
2010-07-21 04:57:21 +08:00
|
|
|
install-gcc \
|
2013-04-01 23:43:23 +08:00
|
|
|
install-target-libgcc
|
2010-07-21 04:57:21 +08:00
|
|
|
|
|
|
|
# XXX: glibc insists on linking against libgcc_eh
|
2012-07-01 02:12:15 +08:00
|
|
|
( cd $(TOOLCHAIN_DIR)/initial/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \
|
2010-07-21 04:57:21 +08:00
|
|
|
[ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \
|
|
|
|
cp libgcc.a libgcc_initial.a; \
|
|
|
|
)
|
2012-07-01 02:12:15 +08:00
|
|
|
|
2012-07-01 05:43:59 +08:00
|
|
|
$(call FixupLibdir,$(TOOLCHAIN_DIR)/initial)
|
2012-12-02 20:20:47 +08:00
|
|
|
$$(call file_copy,$(TOOLCHAIN_DIR)/initial/.,$(TOOLCHAIN_DIR)/)
|
2010-07-21 04:57:21 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|