From: Keir Fraser Subject: Re: [Mini-OS] Drop useless -fpic flag Date: Wed, 28 Nov 2007 16:42:38 +0000 Message-ID: References: <20071128163501.GK4083@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20071128163501.GK4083@implementation.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Samuel Thibault Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ah yes, I think the -fpic was inherited from Xen's Makefile. Xen has to be built -fpic because it is not linked sufficiently close to address 0x0 to use absolute addressing the 32-bit displacements. This isn't the case for minios. -- Keir On 28/11/07 16:35, "Samuel Thibault" wrote: > Keir Fraser, le Tue 27 Nov 2007 12:33:23 +0000, a =E9crit : >> If it builds without it then it should be fine, I believe. >=20 > And nobody raised his hand, so here is a patch: >=20 > Drop useless -fpic flag. >=20 > Signed-off-by: Samuel Thibault >=20 > diff -r c555a5f97982 extras/mini-os/arch/x86/arch.mk > --- a/extras/mini-os/arch/x86/arch.mk Wed Nov 28 13:36:56 2007 +0000 > +++ b/extras/mini-os/arch/x86/arch.mk Wed Nov 28 16:33:37 2007 +0000 > @@ -17,7 +17,7 @@ endif > endif > =20 > ifeq ($(TARGET_ARCH),x86_64) > -ARCH_CFLAGS :=3D -m64 -mno-red-zone -fpic -fno-reorder-blocks > +ARCH_CFLAGS :=3D -m64 -mno-red-zone -fno-reorder-blocks > ARCH_CFLAGS +=3D -fno-asynchronous-unwind-tables > ARCH_ASFLAGS :=3D -m64 > ARCH_LDFLAGS :=3D -m elf_x86_64