xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Cc: Ross Philipson <Ross.Philipson@citrix.com>
Subject: [PATCH] tools/vtpm: use LDLIBS to pass -lgmp
Date: Fri, 04 May 2012 19:43:49 +0200	[thread overview]
Message-ID: <c19bca94a5ade9c8a528.1336153429@probook.site> (raw)

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1336153405 -7200
# Node ID c19bca94a5ade9c8a528f346bce3c90eee319306
# Parent  2ef28bf88b290d01ca92581dcd68f1aa32017e4e
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.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 2ef28bf88b29 -r c19bca94a5ad tools/vtpm/Makefile
--- a/tools/vtpm/Makefile
+++ b/tools/vtpm/Makefile
@@ -50,7 +50,8 @@ mrproper:
 	mv $(TPM_EMULATOR_NAME) $(VTPM_DIR)
 
 	set -e; cd $(VTPM_DIR); \
-	patch -p1 < ../vtpm-0.5.1.patch
+	patch -p1 < ../vtpm-0.5.1.patch; \
+	patch -p1 < ../vtpm-0.5.1-LDLIBS.patch
 
 orig: $(TPM_EMULATOR_TARFILE)
 	mkdir $(ORIG_DIR);
diff -r 2ef28bf88b29 -r c19bca94a5ad tools/vtpm/vtpm-0.5.1-LDLIBS.patch
--- /dev/null
+++ b/tools/vtpm/vtpm-0.5.1-LDLIBS.patch
@@ -0,0 +1,12 @@
+diff -Naurp tpm_emulator-0.5.1/tpmd/Makefile tpm_emulator-0.5.1/tpmd/Makefile
+--- tpm_emulator-0.5.1/tpmd/Makefile
++++ tpm_emulator-0.5.1/tpmd/Makefile
+@@ -8,7 +8,7 @@ WFLAGS  := -Wall -Wno-unused -Wpointer-a
+            #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/bin/
+ 

             reply	other threads:[~2012-05-04 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 17:43 Olaf Hering [this message]
2012-05-10 16:36 ` [PATCH] tools/vtpm: use LDLIBS to pass -lgmp Ian Jackson
  -- strict thread matches above, loose matches on Subject: below --
2012-03-21  9:14 Olaf Hering
2012-04-03 13:20 ` Ian Jackson
2012-04-03 14:07   ` Olaf Hering
2012-04-03 14:10     ` Ian Jackson
2012-04-03 14:18 ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c19bca94a5ade9c8a528.1336153429@probook.site \
    --to=olaf@aepfle.de \
    --cc=Ross.Philipson@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).