2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

build: Fix LIBS vs LDFLAGS order.

$LDFLAGS can contain `-Ldir`s that are required by '-lib's in $LIBS.
Reverse the order so that `-L` options make effect.

Signed-off-by: Michał Mirosław <emmir@google.com>
This commit is contained in:
Michał Mirosław 2022-06-20 21:00:20 +02:00 committed by Andrei Vagin
parent cbbe6c683d
commit 88f8fdda82

View File

@ -85,7 +85,7 @@ $(obj)/%: pie
$(obj)/criu: $(PROGRAM-BUILTINS) $(obj)/criu: $(PROGRAM-BUILTINS)
$(call msg-link, $@) $(call msg-link, $@)
$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(WRAPFLAGS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@ $(Q) $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LIBS) $(WRAPFLAGS) $(GMONLDOPT) -rdynamic -o $@
UNIT-BUILTINS += $(obj)/util.o UNIT-BUILTINS += $(obj)/util.o
UNIT-BUILTINS += $(obj)/config.o UNIT-BUILTINS += $(obj)/config.o
@ -102,7 +102,7 @@ $(obj)/unittest/built-in.o: .FORCE
$(obj)/unittest/unittest: $(UNIT-BUILTINS) $(obj)/unittest/unittest: $(UNIT-BUILTINS)
$(call msg-link, $@) $(call msg-link, $@)
$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(WRAPFLAGS) $(LDFLAGS) -rdynamic -o $@ $(Q) $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LIBS) $(WRAPFLAGS) -rdynamic -o $@
unittest: $(obj)/unittest/unittest unittest: $(obj)/unittest/unittest
$(Q) $(obj)/unittest/$@ $(Q) $(obj)/unittest/$@