commit 5783fd93065307681b3e2e4c8098676b6b747aa1
parent 52b8408b8b1fc745b935cf57d3ff8b42d642e6b0
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Wed, 26 Apr 2023 00:53:18 +0200
Makefile: Pass LDLINKFLAGS to link hare
Since hare(1) invokes $(LD) with $(LDLINKFLAGS) but hare(1) itself is
built with a direct $(LD) invocation from the makefile, it was linked
without those (usually disto-wide) flags. The flags are now added to
the $(LD) command line to remedy this situation.
The same is done for hare-test(1) for consistency, even though this
program is not installed.
Signed-off-by: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -60,13 +60,13 @@ $(TESTCACHE)/hare.ssa: $(hare_srcs) $(testlib_deps_any) $(testlib_deps_$(PLATFOR
$(BINOUT)/hare: $(HARECACHE)/hare.o
@mkdir -p $(BINOUT)
@printf 'LD\t%s\n' "$@"
- @$(LD) --gc-sections -T $(rtscript) -o $@ \
+ @$(LD) $(LDLINKFLAGS) --gc-sections -T $(rtscript) -o $@ \
$(HARECACHE)/hare.o $(stdlib_deps_any) $(stdlib_deps_$(PLATFORM))
$(BINOUT)/hare-tests: $(TESTCACHE)/hare.o
@mkdir -p $(BINOUT)
@printf 'LD\t%s\n' "$@"
- @$(LD) -T $(rtscript) -o $@ \
+ @$(LD) $(LDLINKFLAGS) -T $(rtscript) -o $@ \
$(TESTCACHE)/hare.o $(testlib_deps_any) $(testlib_deps_$(PLATFORM))
$(BINOUT)/harec2: $(BINOUT)/hare $(harec_srcs)