This commit is contained in:
pattop 2016-12-12 00:18:06 +00:00 committed by GitHub
commit f3128a2d92
2 changed files with 16 additions and 10 deletions

View File

@ -41,11 +41,11 @@
# ISL_VER =
# LINUX_VER =
# Something like the following can be used to produce a static-linked
# toolchain that's deployable to any system with matching arch, using
# an existing musl-targeted cross compiler. This only # works if the
# system you build on can natively (or via binfmt_misc and # qemu) run
# binaries produced by the existing toolchain (in this example, i486).
# Something like the following can be used to produce a static-linked toolchain
# that's deployable to any system with matching arch, using an existing
# musl-targeted cross compiler. This only works if the system you build on can
# natively (or via binfmt_misc and qemu) run binaries produced by the existing
# toolchain (in this example, i486).
# COMMON_CONFIG += CC="i486-linux-musl-gcc -static --static" CXX="i486-linux-musl-g++ -static --static"

View File

@ -61,16 +61,22 @@ FULL_TOOLCHAIN_CONFIG = --enable-languages=c,c++ \
FULL_MUSL_CONFIG = $(MUSL_CONFIG) \
--prefix= --host=$(TARGET)
ifeq ($(NATIVE),)
ifneq ($(NATIVE),)
SYSROOT = /
FULL_TOOLCHAIN_CONFIG += --host=$(TARGET)
MUSL_VARS =
else ifneq ($(CANADIAN),)
SYSROOT = /$(TARGET)
FULL_MUSL_CONFIG += CROSS_COMPILE=$(TARGET)- LIBCC="../obj_toolchain/$(TARGET)/libgcc/libgcc.a"
MUSL_VARS =
obj_musl/.lc_built: | obj_toolchain/$(TARGET)/libgcc/libgcc.a
obj_toolchain/.lc_built: | obj_sysroot/.lc_libs obj_sysroot/.lc_headers
else
SYSROOT = /$(TARGET)
FULL_MUSL_CONFIG += CC="$(XGCC)" LIBCC="../obj_toolchain/$(TARGET)/libgcc/libgcc.a"
MUSL_VARS = AR=../obj_toolchain/binutils/ar RANLIB=../obj_toolchain/binutils/ranlib
obj_musl/.lc_built: | obj_toolchain/$(TARGET)/libgcc/libgcc.a
obj_toolchain/.lc_built: | obj_sysroot/.lc_libs obj_sysroot/.lc_headers
else
SYSROOT = /
FULL_TOOLCHAIN_CONFIG += --host=$(TARGET)
MUSL_VARS =
endif
ifeq ($(TARGET),)