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