qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 3/3] configure/Make: Build libfdt from submod


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v5 3/3] configure/Make: Build libfdt from submodule DTC
Date: Mon, 22 Apr 2013 10:58:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 22/04/2013 06:45, Peter Crosthwaite ha scritto:
> Hi Paolo, Blue,
> 
> On Sun, Apr 21, 2013 at 11:16 PM, Paolo Bonzini <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]