Explorar o código

rebuild musl after full gcc is available

Waldemar Brodkorb %!s(int64=10) %!d(string=hai) anos
pai
achega
ce57b051ea
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      toolchain/musl/Makefile

+ 6 - 4
toolchain/musl/Makefile

@@ -17,16 +17,18 @@ $(WRKBUILD)/.headers:
 	touch $@
 
 $(WRKBUILD)/.compiled:
-	# reconfigure musl, otherwise linking with libgcc is disabled
+	$(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) all
+	touch $@
+
+$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
+	# reconfigure musl, otherwise linking with libgcc or libgcc_eh is disabled
+	$(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) clean
 	(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
 		./configure --prefix=/usr \
 		--target=$(REAL_GNU_TARGET_NAME) \
 		--disable-gcc-wrapper \
 	)
 	$(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) all
-	touch $@
-
-$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
 	$(MAKE) -C $(WRKBUILD) DESTDIR=$(STAGING_TARGET_DIR) install
 	touch $@