Skip to contentSkip to conversation

tools/vtpm: use LDLIBS to pass -lgmp

PATCH In review Olaf Hering 2 participants 5 messages Mar 21, 2012 – Apr 3, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/vtpm: use LDLIBS to pass -lgmp

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1332321236 -3600
# Node ID 6685b67958b0623064c7086e9ef6b62a0bae0f9e # Parent fd633b34105875ff933c15396dc7743793c133bd tools/vtpm: use LDLIBS to pass -lgmp

Linking tpmd will fail with recent toolchains because -lgmp is passed via LDFLAGS instead of LDLIBS. With this change -lgpm is placed at the end of the gcc cmdline and linking tpmd succeeds again.

tools/vtpm/vtpm-0.5.1.patch +1 -1
diff -r fd633b341058 -r 6685b67958b0 tools/vtpm/vtpm-0.5.1.patch
@@ -74,7 +74,7 @@ diff -Naurp tpm_emulator-0.5.1/tpmd/Make
             #WFLAGS  += -Wextra -Wcast-qual -Wmissing-prototypes -Wmissing-declarations -Wstrict-aliasing
  CFLAGS  += $(WFLAGS) -g -I.. -I. -O2 -fno-strict-aliasing
 +CFLAGS  += -I../../../../tools/vtpm_manager/manager
- LDFLAGS += -lgmp
+ LDLIBS  += -lgmp
  
 -BINDIR  := /usr/sbin/
 +BINDIR  := /usr/bin/
#1 lore raw

Olaf Hering writes ("[Xen-devel] [PATCH] tools/vtpm: use LDLIBS to pass -lgmp"):

Quoted 5 lines

tools/vtpm: use LDLIBS to pass -lgmp

Linking tpmd will fail with recent toolchains because -lgmp is passed via LDFLAGS instead of LDLIBS. With this change -lgpm is placed at the end of the gcc cmdline and linking tpmd succeeds again.

...

Quoted 7 lines

CFLAGS += $(WFLAGS) -g -I.. -I. -O2 -fno-strict-aliasing
+CFLAGS += -I../../../../tools/vtpm_manager/manager
- LDFLAGS += -lgmp
+ LDLIBS += -lgmp

-BINDIR := /usr/sbin/
+BINDIR := /usr/bin/

Please could you make sure not to include unrelated changes in your patches. That makes the job of the reviewer /much/ harder, because we would have to inspect every hunk of your patches looking for this kind of thing creeping in.

This is a matter of trust for us as maintainers. Including an unrelated hunk once can be put down to a mistake. Doing it persistently is a breach of the trust that we as committers need to place in people who submit patches.

Ian.

#2 lore raw
Quoted 12 lines · Ian Jackson

Olaf Hering writes ("[Xen-devel] [PATCH] tools/vtpm: use LDLIBS to pass -lgmp"):

Quoted 5 lines

tools/vtpm: use LDLIBS to pass -lgmp

Linking tpmd will fail with recent toolchains because -lgmp is passed via LDFLAGS instead of LDLIBS. With this change -lgpm is placed at the end of the gcc cmdline and linking tpmd succeeds again.

...

Quoted 5 lines

CFLAGS += $(WFLAGS) -g -I.. -I. -O2 -fno-strict-aliasing
+CFLAGS += -I../../../../tools/vtpm_manager/manager
- LDFLAGS += -lgmp
+ LDLIBS += -lgmp

Quoted 7 lines
Quoted 2 lines

-BINDIR := /usr/sbin/
+BINDIR := /usr/bin/

Please could you make sure not to include unrelated changes in your patches. That makes the job of the reviewer /much/ harder, because we would have to inspect every hunk of your patches looking for this kind of thing creeping in.

This patch changes a patch file for vtpm which has LDFLAGS in the context around the changed lines.
See the space between the '-' and LDFLAGS.

Olaf

#3 lore raw

Olaf Hering writes ("Re: [Xen-devel] [PATCH] tools/vtpm: use LDLIBS to pass -lgmp"):

Quoted 17 lines · Ian Jackson
Quoted 16 lines

Olaf Hering writes ("[Xen-devel] [PATCH] tools/vtpm: use LDLIBS to pass -lgmp"):

Quoted 5 lines

tools/vtpm: use LDLIBS to pass -lgmp

Linking tpmd will fail with recent toolchains because -lgmp is passed via LDFLAGS instead of LDLIBS. With this change -lgpm is placed at the end of the gcc cmdline and linking tpmd succeeds again.

...

Quoted 7 lines

CFLAGS += $(WFLAGS) -g -I.. -I. -O2 -fno-strict-aliasing
+CFLAGS += -I../../../../tools/vtpm_manager/manager
- LDFLAGS += -lgmp
+ LDLIBS += -lgmp

-BINDIR := /usr/sbin/
+BINDIR := /usr/bin/

Quoted 8 lines
Quoted 4 lines

Please could you make sure not to include unrelated changes in your patches. That makes the job of the reviewer /much/ harder, because we would have to inspect every hunk of your patches looking for this kind of thing creeping in.

This patch changes a patch file for vtpm which has LDFLAGS in the context around the changed lines.
See the space between the '-' and LDFLAGS.

Oh, god, I missed that. Sorry. I will apply your patch.

Ian.