From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUCaS-000090-JX for qemu-devel@nongnu.org; Mon, 22 Apr 2013 04:59:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUCaR-00009t-Il for qemu-devel@nongnu.org; Mon, 22 Apr 2013 04:59:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUCaR-00009c-At for qemu-devel@nongnu.org; Mon, 22 Apr 2013 04:58:59 -0400 Message-ID: <5174FBC3.30707@redhat.com> Date: Mon, 22 Apr 2013 10:58:43 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <5173E697.4050606@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 3/3] configure/Make: Build libfdt from submodule DTC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Blue Swirl , "Edgar E. Iglesias" , qemu-devel , Peter Maydell Il 22/04/2013 06:45, Peter Crosthwaite ha scritto: > Hi Paolo, Blue, > > On Sun, Apr 21, 2013 at 11:16 PM, Paolo Bonzini 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