1
0

Makefile 863 B

123456789101112131415161718192021222324252627282930313233343536
  1. GCC_VARIANT:=initial
  2. GCC_PREPARE=$(CONFIG_USE_MUSL)
  3. include ../common.mk
  4. GCC_CONFIGURE += \
  5. --with-newlib \
  6. --with-sysroot=$(TOOLCHAIN_DIR) \
  7. --enable-languages=c \
  8. --disable-shared \
  9. --disable-threads \
  10. define Host/Compile
  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) $(HOST_JOBS) -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))