On Thu, 2014-07-10 at 10:21 +0100, Julien Grall wrote:
Hi Ian & Roy,
On 10/07/14 09:13, Ian Campbell wrote:
Probably the easiest thing to do there is to create xen/arch/arm/efi/stub.c and do the fshort-char trick for that entire folder, since I don't think our build system makes it especially easy to change CFLAGS for individual object files.
Yes and yes. I will likely end up with some single file directories due to the build option differences. Is there a XEN build system expert that I can ask for help if needed? (Or should I just post to the list?)
I'm not sure anyone is an expert on this stuff but feel free to prod me either here or on #xenarm.
I think you just need something like, in xen/arch/arm/Makefile subdir-$(arm64) += efi # or CONFIG_EFI etc and in xen/arch/arm/efi/Makefile: CFLAGS += -fshort-wchar obj-y += foo.o etc.o
much the same for xen/common/efi.
The Xen buildsystem doesn't provide CFLAGS facilities as the Kernel, but the Makefile has a syntax to append data in variables for a specific target.
If your efi.c is in xen/arch/arm/, you need to add in xen/arch/arm/Makefile:
efi.o: CFLAGS += -fshort-wchar
That would work but I think I'd rather keep the efi stuff in its own subdirectory, even if right now it is only a single C file.
Ian.