mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-12 01:44:54 +00:00
74c9b9cfeb
No extra libc header build step is done, so no extra toolchain is needed for preparing it. This saves a significant amount of build time and disk space Signed-off-by: Felix Fietkau <nbd@nbd.name>
29 lines
751 B
Makefile
29 lines
751 B
Makefile
PATH_PREFIX:=..
|
|
VARIANT:=headers
|
|
|
|
include ../common.mk
|
|
|
|
define Host/Compile
|
|
|
|
endef
|
|
|
|
define Host/Install
|
|
$(call Host/SetToolchainInfo)
|
|
mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/{include,lib}
|
|
$(MAKE) -C $(CUR_BUILD_DIR) \
|
|
BUILD_CFLAGS="$(HOST_CFLAGS)" \
|
|
install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \
|
|
install-bootstrap-headers=yes \
|
|
install-headers
|
|
$(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/
|
|
$(MAKE) -C $(CUR_BUILD_DIR) \
|
|
csu/subdir_lib
|
|
( cd $(CUR_BUILD_DIR); \
|
|
$(CP) csu/crt1.o csu/crti.o csu/crtn.o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/ \
|
|
)
|
|
$(TARGET_CC) -nostdlib -nostartfiles -shared -x c /dev/null \
|
|
-o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/libc.so
|
|
endef
|
|
|
|
$(eval $(call HostBuild))
|