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