Makefile 896 B

123456789101112131415161718192021222324252627282930313233343536
  1. GCC_VARIANT:=initial
  2. include ../common.mk
  3. GCC_CONFIGURE += \
  4. --with-newlib \
  5. --with-sysroot=$(TOOLCHAIN_DIR) \
  6. --enable-languages=c \
  7. --disable-shared \
  8. --disable-threads \
  9. define Host/Compile
  10. $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/
  11. +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) \
  12. all-build-libiberty \
  13. all-gcc \
  14. all-target-libgcc
  15. endef
  16. define Host/Install
  17. $(GCC_MAKE) -C $(GCC_BUILD_DIR) \
  18. prefix="$(TOOLCHAIN_DIR)/initial" \
  19. install-gcc \
  20. install-target-libgcc
  21. # XXX: glibc insists on linking against libgcc_eh
  22. ( cd $(TOOLCHAIN_DIR)/initial/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \
  23. [ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \
  24. cp libgcc.a libgcc_initial.a; \
  25. )
  26. $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial)
  27. $$(call file_copy,$(TOOLCHAIN_DIR)/initial/.,$(TOOLCHAIN_DIR)/)
  28. endef
  29. $(eval $(call HostBuild))