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