Re: [PATCH VTPM v9 0/8] Vtpm patchset

Ian Campbell
Fri, 18 Jan 2013 10:57:31 -0000

On Thu, 2013-01-10 at 23:00 +0000, Matthew Fioravante wrote:

I have applied this after folding the fixup below for the Debian build
issue from Matthew.

Thanks Matthew!

Ian.

From af6e3b0a1133817fa9916026035bd98d402b8b4f Mon Sep 17 00:00:00 2001
From: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Date: Wed, 16 Jan 2013 14:02:33 -0500
Subject: [PATCH] Fix compilation bug with cmake

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 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 71f4aeb..64ee6e2 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:STRING="-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.2.5