[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH VTPM fix] Fix compilation bug with cmake



On 01/16/2013 02:05 PM, Matthew Fioravante wrote:
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.
Ian, can you test this patch on your system and see if make cross-tpmemu passes -DTPM_NO_EXTERN etc.. as it should?

This patch can go right ontop of the vtpm v9 set. If you want I can roll it into the original patch set and release a v10.

Signed-off-by: Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
---
  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


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.