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

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



On Wed, 2013-01-16 at 19:09 +0000, Matthew Fioravante wrote:
> 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?

I applied it to v9 and I'm afraid the result was:
        ld -nostdlib 
-L/local/scratch/ianc/devel/committer.git/stubdom/cross-root-x86_64/x86_64-xen-elf/lib
  -m elf_x86_64 -T arch/x86/minios-x86_64.lds 
/local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o  
-o /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os
        ld: warning: section `.bss' type changed to PROGBITS
        
/local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o: 
In function `mkdirs':
        tpm_emulator_extern.c:(.text+0xbd95): undefined reference to 
`__errno_location'
        tpm_emulator_extern.c:(.text+0xbdad): undefined reference to 
`__errno_location'
        
/local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o: 
In function `_tpm_extern_init':
        tpm_emulator_extern.c:(.text+0xbe7f): undefined reference to `open'
        tpm_emulator_extern.c:(.text+0xbe9b): undefined reference to 
`__errno_location'
        
/local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o: 
In function `_tpm_write_to_storage':
        tpm_emulator_extern.c:(.text+0xc1e9): undefined reference to `open'
        
/local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o: 
In function `_tpm_read_from_storage':
        tpm_emulator_extern.c:(.text+0xc27b): undefined reference to `open'
        tpm_emulator_extern.c:(.text+0xc2a2): undefined reference to `lseek'
        tpm_emulator_extern.c:(.text+0xc2ba): undefined reference to `lseek'
        make[1]: *** 
[/local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os] 
Error 1
        make[1]: Leaving directory 
`/local/scratch/ianc/devel/committer.git/extras/mini-os'
        make: *** [vtpm-stubdom] Error 2
        make: Leaving directory 
`/local/scratch/ianc/devel/committer.git/stubdom'

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

I had v9 + this fix:

$ git log --oneline origin/staging..HEAD
3fff288 Fix compilation bug with cmake
36f6168 Add conditional build of subsystems to configure.ac
572bd96 Add a top level configure script
11d83aa stubdom: Add autoconf
3331272 README: Add cmake dependency
23d9686 Add vtpm documentation
5998e1e vtpm/vtpmmgr and required libs to stubdom/Makefile
799420c add stubdom/vtpmmgr code
7883739 add vtpm-stubdom code

Ian.


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