Il 22/04/2013 06:45, Peter Crosthwaite ha scritto: > Hi Paolo, Blue, > > On Sun, Apr 21, 2013 at 11:16 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: >> Il 20/04/2013 20:42, Blue Swirl ha scritto: >>> This is not entirely correct, I get these errors: >>> mingw32: >>> CC libfdt/fdt.o >>> cc1: warnings being treated as errors >>> /src/qemu/dtc/libfdt/fdt.c:1: warning: -fPIC ignored for target (all >>> code is position independent) >>> > > This is coming from the dtc makefile which explicitly passes in -fPIC > via its default CFLAGS. I tried fixing by setting the Make invocation > to replace CFLAGS entirely, which in effect removes the -fPIC: But I > suffer a similar (later) failure to the one you posted below: > > LINK arm-softmmu/qemu-system-arm > /usr/bin/ld: > /home/peterc/Petalogix/Internal/plgx_src/qemu-build/dtc/libfdt/libfdt.a(fdt.o): > relocation R_X86_64_32S against `.rodata' can not be used when making > a shared object; recompile with -fPIC > /home/peterc/Petalogix/Internal/plgx_src/qemu-build/dtc/libfdt/libfdt.a: > could not read symbols: Bad value > > Looks like QEMU mandates that all static objects are -fPIC. A bit of > googling suggests that this error is mingw specific in that mingw > can't handle -fPIC.
Right, that's because QEMU is built as a position-independent executable. PIE requirements actually are a bit less strict than -fPIC. Your solution of passing the compilation flags sounds good, but do you pass -Werror too? Paolo