* [PATCH] tc: make tc linking depend on libtc.a
@ 2017-01-03 23:32 David Michael
2017-01-09 20:08 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: David Michael @ 2017-01-03 23:32 UTC (permalink / raw)
To: netdev
There was a race condition where the command to link the tc binary
could (rarely) run before the libtc.a archive existed.
---
Hi,
I've hit a random failure during parallel builds:
ld: cannot find -ltc
The issue seems to be that both tc and libtc.a are permitted to build in
parallel, when tc actually depends on libtc.a. This patch adjusts the
Make prerequisites accordingly. Can something like this be applied?
Thanks.
David
tc/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tc/Makefile b/tc/Makefile
index bb90114..7fd0c4a 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)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tc: make tc linking depend on libtc.a
2017-01-03 23:32 [PATCH] tc: make tc linking depend on libtc.a David Michael
@ 2017-01-09 20:08 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2017-01-09 20:08 UTC (permalink / raw)
To: David Michael; +Cc: netdev
On Tue, 03 Jan 2017 15:32:46 -0800
David Michael <david.michael@coreos.com> wrote:
> There was a race condition where the command to link the tc binary
> could (rarely) run before the libtc.a archive existed.
Applied, thanks.
I guess I need a 64 CPU machine.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-09 20:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-03 23:32 [PATCH] tc: make tc linking depend on libtc.a David Michael
2017-01-09 20:08 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).