summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-07-07 00:41:13 +0000
committerRich Felker <dalias@aerifal.cx>2016-07-07 00:41:13 +0000
commit20ce424e65ab227e3dc866ab6ac2d2b096f55fd8 (patch)
tree51ffce1a7496439379babf552b46b814363899e9
parent8eeb57f5a511f2f6895a9bd58e1019506090227d (diff)
disable build/install of temp sysroot headers for native compilers
these are not needed since the cross toolchain being used to build the native compiler already has its own libc and headers. but more importantly, due to lack of certain dependency chains that would be present for a cross compiler build, it was possible for two invocations of musl's make process to occur in parallel (one for temp sysroot headers, one for actual libc build). this could (and was observed to) lead to a race condition where alltypes.h was momentarily truncated in the middle of the libc build.
-rw-r--r--litecross/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/litecross/Makefile b/litecross/Makefile
index 899f7c7..e913506 100644
--- a/litecross/Makefile
+++ b/litecross/Makefile
@@ -63,7 +63,7 @@ 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_toolchain/.lc_built: | obj_sysroot/.lc_libs obj_sysroot/.lc_headers
else
SYSROOT = /
FULL_TOOLCHAIN_CONFIG += --host=$(TARGET)
@@ -177,7 +177,7 @@ obj_sysroot/.lc_libs: | obj_musl/.lc_built
cd obj_musl && $(MAKE) $(MUSL_VARS) DESTDIR=$(PWD)/obj_sysroot install
touch $@
-obj_toolchain/.lc_built: | obj_toolchain/.lc_configured obj_sysroot/.lc_headers
+obj_toolchain/.lc_built: | obj_toolchain/.lc_configured
cd obj_toolchain && $(MAKE) MAKE="$(MAKE)" LC_ROOT=$(PWD)
touch $@