Re: [kvm-unit-tests PATCH 18/32] lib: provide stdio.h

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

 




On 21/04/2017 09:16, Andrew Jones wrote:
>>
>> kvm-unit-tests builds with the odd combination of system include files
>> but not system libraries. That is, -nostdlib is specified but
>> -nostdinc isn't! Problems arise when the include files don't match the
>> libraries, e.g., printf() in some versions of glibc linking in a
>> __printf_chk symbol that libcflat doesn't have. This patch fixes the
>> problem with printf by pointing '#include "stdio.h"' to
>> lib/libcflat.h, where a printf declaration that libcflat actually
>> implements exists, rather than letting /usr/include/stdio.h get
>> included. This patch does not solve the general problem of potential
>> mismatches between libcflat and the compiler's notion standard include
>> files; doing so would require rewriting stdarg.h, stdint.h, and
>> several others in libcflat.
> 
> Yeah, I'm not sure rewriting those would be worth being able to add
> -nostdinc. When we cross compile ARM and POWER those few headers are
> some of the ones provided by the cross compiler.

I think -sysroot=`pwd` would keep the usual compiler include path, and
remove /usr/include.

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux