From 3fb87d9ea04505e65c0493bdddb7e7292fbb313a Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Tue, 7 Jan 2020 18:19:02 +0100 Subject: [PATCH] base-linux: use pkg-config for libraries from base repo Tup output groups must not be used across the repositories, they will come up empty in Nix builds, and libraries will not be fully linked. --- repos/base-linux/src/lib/ld/Tupfile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/repos/base-linux/src/lib/ld/Tupfile b/repos/base-linux/src/lib/ld/Tupfile index 5a7a8ee54..519bf6b7b 100644 --- a/repos/base-linux/src/lib/ld/Tupfile +++ b/repos/base-linux/src/lib/ld/Tupfile @@ -34,22 +34,15 @@ LDFLAGS += --entry=_start_initial_stack BASE_LIBS += $(REP_DIR)/src/lib/base/base-linux.lib.a +PKG_LIBS = -L$(DEV_DIR)/lib `$(PKG_CONFIG) --libs alarm cxx ldso-startup timeout` + : $(BASE_LIBS) {obj} | \ symbol.map \ $(DEV_DIR)/ \ $(DEV_DIR)/ \ - $(BASE_DIR)/ \ $(REP_DIR)/ \ - $(BASE_DIR)/ \ - $(BASE_DIR)/ \ $(REP_DIR)/ \ $(REP_DIR)/ \ - $(BASE_DIR)/ \ -|> \ - $(LD) -o %o $(LD_MARCH) $(LDFLAGS) --whole-archive --start-group \ - % % % % % % % \ - %f --end-group --no-whole-archive $(LIBGCC); \ - printf "\x02" | dd of=%o bs=1 seek=16 count=1 conv=notrunc; \ -|> ld-linux.lib.so $(REP_DIR)/ {bin} +|> $(LD) -o %o $(LD_MARCH) $(LDFLAGS) --whole-archive --start-group % % % %f $(PKG_LIBS) --end-group --no-whole-archive $(LIBGCC); printf "\x02" | dd of=%o bs=1 seek=16 count=1 conv=notrunc; |> ld-linux.lib.so $(REP_DIR)/ {bin} : {bin} |> !collect_bin |>