From: David Michael Date: Tue, 3 Jan 2017 23:32:46 +0000 (-0800) Subject: tc: make tc linking depend on libtc.a X-Git-Tag: v4.10.0~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb18c98198b6f90ff8dbe24489ce10271d4e6af8;p=thirdparty%2Fiproute2.git tc: make tc linking depend on libtc.a There was a race condition where the command to link the tc binary could (rarely) run before the libtc.a archive existed. --- diff --git a/tc/Makefile b/tc/Makefile index bb9011432..7fd0c4ad8 100644 --- a/tc/Makefile +++ b/tc/Makefile @@ -96,7 +96,7 @@ ifneq ($(TC_CONFIG_NO_XT),y) endif TCOBJ += $(TCMODULES) -LDLIBS += -L. -ltc -lm +LDLIBS += -L. -lm ifeq ($(SHARED_LIBS),y) LDLIBS += -ldl @@ -124,13 +124,13 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic $< -o $@ -all: libtc.a tc $(TCSO) +all: tc $(TCSO) -tc: $(TCOBJ) $(TCLIB) +tc: $(TCOBJ) libtc.a $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@ libtc.a: $(TCLIB) - $(QUIET_AR)$(AR) rcs $@ $(TCLIB) + $(QUIET_AR)$(AR) rcs $@ $^ install: all mkdir -p $(MODDESTDIR)