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

[Xen-devel] [PATCH] tools/vtpm: fix version.h error during parallel build


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Thu, 12 Jul 2012 09:51:56 +0200
  • Delivery-date: Thu, 12 Jul 2012 07:52:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1342079491 -7200
# Node ID 02ec826cab1e4acb25b364a180a1597ace1149f9
# Parent  42f76d536b116d2ebad1b6705ae51ecd171d2581
tools/vtpm: fix version.h error during parallel build

Generating the tpm_version.h is not make -j safe:

In file included from ../tpm/tpm_emulator.h:25:0,
                 from ../tpm/tpm_startup.c:18:
../tpm/tpm_version.h:1:0: error: unterminated #ifndef
make[5]: *** [tpm_startup.o] Error 1

Add another patch which adds proper dependencies in the tpm_manager Makefile.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 42f76d536b11 -r 02ec826cab1e tools/vtpm/Makefile
--- a/tools/vtpm/Makefile
+++ b/tools/vtpm/Makefile
@@ -51,7 +51,8 @@ mrproper:
 
        set -e; cd $(VTPM_DIR); \
        patch -p1 < ../vtpm-0.5.1.patch; \
-       patch -p1 < ../vtpm-0.5.1-LDLIBS.patch
+       patch -p1 < ../vtpm-0.5.1-LDLIBS.patch; \
+       patch -p1 < ../vtpm-0.5.1-version.h.patch
 
 orig: $(TPM_EMULATOR_TARFILE)
        mkdir $(ORIG_DIR);
diff -r 42f76d536b11 -r 02ec826cab1e tools/vtpm/vtpm-0.5.1-version.h.patch
--- /dev/null
+++ b/tools/vtpm/vtpm-0.5.1-version.h.patch
@@ -0,0 +1,45 @@
+
+make[4]: Entering directory 
`/usr/src/packages/BUILD/xen-4.2.25602/non-dbg/tools/vtpm/vtpm'
+Making all in tpmd
+make[5]: Entering directory 
`/usr/src/packages/BUILD/xen-4.2.25602/non-dbg/tools/vtpm/vtpm/tpmd'
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings 
-Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing 
-I../../../../tools/vtpm_manager/manager   -c -o tpm_data.o ../tpm/tpm_data.c
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings 
-Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing 
-I../../../../tools/vtpm_manager/manager   -c -o tpm_startup.o 
../tpm/tpm_startup.c
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings 
-Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing 
-I../../../../tools/vtpm_manager/manager   -c -o tpm_storage.o 
../tpm/tpm_storage.c
+In file included from ../tpm/tpm_emulator.h:25:0,
+                 from ../tpm/tpm_startup.c:18:
+../tpm/tpm_version.h:1:0: error: unterminated #ifndef
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings 
-Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing 
-I../../../../tools/vtpm_manager/manager   -c -o tpm_credentials.o 
../tpm/tpm_credentials.c
+make[5]: *** [tpm_startup.o] Error 1
+
+---
+ Makefile |   17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+Index: tpm_emulator-0.5.1/Makefile
+===================================================================
+--- tpm_emulator-0.5.1.orig/Makefile
++++ tpm_emulator-0.5.1/Makefile
+@@ -14,13 +14,16 @@ SUBDIRS := tpmd
+ 
+ all: version all-recursive
+ 
+-version:
+-      @echo "#ifndef _TPM_VERSION_H_" > tpm/tpm_version.h
+-      @echo "#define _TPM_VERSION_H_" >> tpm/tpm_version.h
+-      @echo "#define VERSION_MAJOR $(VERSION_MAJOR)" >> tpm/tpm_version.h
+-      @echo "#define VERSION_MINOR $(VERSION_MINOR)" >> tpm/tpm_version.h
+-      @echo "#define VERSION_BUILD $(VERSION_BUILD)" >> tpm/tpm_version.h
+-      @echo "#endif /* _TPM_VERSION_H_ */" >> tpm/tpm_version.h
++tpm/tpm_version.h:
++      @echo "#ifndef _TPM_VERSION_H_" > tpm/tpm_version.h.tmp
++      @echo "#define _TPM_VERSION_H_" >> tpm/tpm_version.h.tmp
++      @echo "#define VERSION_MAJOR $(VERSION_MAJOR)" >> tpm/tpm_version.h.tmp
++      @echo "#define VERSION_MINOR $(VERSION_MINOR)" >> tpm/tpm_version.h.tmp
++      @echo "#define VERSION_BUILD $(VERSION_BUILD)" >> tpm/tpm_version.h.tmp
++      @echo "#endif /* _TPM_VERSION_H_ */" >> tpm/tpm_version.h.tmp
++      mv -f tpm/tpm_version.h.tmp tpm/tpm_version.h
++
++version: tpm/tpm_version.h
+ 
+ clean: clean-recursive
+       rm -f tpm/tpm_version.h

_______________________________________________
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®.