xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH VTPM fix] Fix compilation bug with cmake
@ 2013-01-16 19:05 Matthew Fioravante
  2013-01-16 19:09 ` Matthew Fioravante
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Fioravante @ 2013-01-16 19:05 UTC (permalink / raw)
  To: xen-devel, Ian.Campbell; +Cc: Matthew Fioravante

Some older versions of cmake don't pass compiler
flags correctly when -DCMAKE_C_FLAGS and
-DCMAKE_C_COMPILER are both specified. This
behavior was observed on debian squeeze with
cmake 2.8.2. This patch fixes the bug by
using CC=${CC} cmake .. instead of
-DCMAKE_C_COMPILER.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
---
 stubdom/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 71f4aeb..1109805 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -209,7 +209,7 @@ tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz
 	mv tpm_emulator-$(TPMEMU_VERSION) $@
 	patch -d $@ -p1 < tpmemu-$(TPMEMU_VERSION).patch;
 	mkdir $@/build
-	cd $@/build; $(CMAKE) .. -DCMAKE_C_COMPILER=${CC} -DCMAKE_C_FLAGS="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
+	cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
 	touch $@
 
 TPMEMU_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm.a
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-17 15:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 19:05 [PATCH VTPM fix] Fix compilation bug with cmake Matthew Fioravante
2013-01-16 19:09 ` Matthew Fioravante
2013-01-17  9:47   ` Ian Campbell
2013-01-17  9:59     ` Ian Campbell
2013-01-17 15:44     ` Fioravante, Matthew E.
2013-01-17 15:59       ` Ian Campbell
2013-01-17 13:51   ` Ian Campbell

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).