X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;ds=sidebyside;f=toolchain%2Fmusl%2FMakefile;h=2b9312bcbf123c03cf8947c52044557e27377e79;hb=4cf991bedb4cbf42fd60af52a730bf52461c7161;hp=79ea175a466d4c48daecf997b94d7f8d578b6c92;hpb=6b63716262b89bec53402817876116898936d5f4;p=openwrt%2F.git diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile index 79ea175a46..2b9312bcbf 100644 --- a/toolchain/musl/Makefile +++ b/toolchain/musl/Makefile @@ -7,6 +7,10 @@ HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.musl_installed HOST_BUILD_PARALLEL:=1 +MUSL_MAKEOPTS = -C $(HOST_BUILD_DIR) \ + DESTDIR="$(TOOLCHAIN_DIR)/" \ + LIBCC="$(subst libgcc.a,libgcc_initial.a,$(shell $(TARGET_CC) -print-libgcc-file-name))" + define Host/SetToolchainInfo $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.musl-libc.org/,' $(TOOLCHAIN_DIR)/info.mk @@ -15,24 +19,13 @@ define Host/SetToolchainInfo endef define Host/Compile - $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all + +$(MAKE) $(HOST_JOBS) $(MUSL_MAKEOPTS) all endef define Host/Install $(call Host/SetToolchainInfo) - $(MAKE) -C $(HOST_BUILD_DIR) DESTDIR="$(TOOLCHAIN_DIR)/" install - ( cd $(TOOLCHAIN_DIR) ; \ - for d in lib usr/lib ; do \ - for f in libc.so libpthread.so libgcc_s.so ; do \ - if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \ - $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \ - fi \ - done \ - done \ - ) - rm -f \ - $(TOOLCHAIN_DIR)/lib/libresolv*.so* \ - $(TOOLCHAIN_DIR)/lib/libnsl*.so* + +$(MAKE) $(HOST_JOBS) $(MUSL_MAKEOPTS) DESTDIR="$(TOOLCHAIN_DIR)/" install + $(CP) ./include $(TOOLCHAIN_DIR)/ endef $(eval $(call HostBuild))