From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLn9u-0002kV-Er for qemu-devel@nongnu.org; Fri, 18 Dec 2009 19:26:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLn9p-0002bB-JU for qemu-devel@nongnu.org; Fri, 18 Dec 2009 19:26:57 -0500 Received: from [199.232.76.173] (port=51412 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLn9p-0002aw-AK for qemu-devel@nongnu.org; Fri, 18 Dec 2009 19:26:53 -0500 Received: from mail-gx0-f223.google.com ([209.85.217.223]:49395) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLn9p-0002Ex-Na for qemu-devel@nongnu.org; Fri, 18 Dec 2009 19:26:53 -0500 Received: by gxk23 with SMTP id 23so3827295gxk.2 for ; Fri, 18 Dec 2009 16:26:52 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1260973234-12601-1-git-send-email-kirill@shutemov.name> References: <1260973234-12601-1-git-send-email-kirill@shutemov.name> Date: Sat, 19 Dec 2009 02:26:52 +0200 Message-ID: From: "Kirill A. Shutemov" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH] user_only: compile everything with -fpie List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , "Kirill A. Shutemov" , Juan Quintela ping? On Wed, Dec 16, 2009 at 4:20 PM, Kirill A. Shutemov wrote: > We really need compile _all_ sources for user target with -fpie when > use --enable-user-pie. > > It's regression introduced by commit add16157d72454. > > Signed-off-by: Kirill A. Shutemov > Cc: Blue Swirl > Signed-off-by: Juan Quintela > --- > =C2=A0Makefile.user | =C2=A0 =C2=A07 ++++++- > =C2=A0configure =C2=A0 =C2=A0 | =C2=A0 =C2=A03 +++ > =C2=A02 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/Makefile.user b/Makefile.user > index 907e74b..9e4f040 100644 > --- a/Makefile.user > +++ b/Makefile.user > @@ -2,10 +2,15 @@ > > =C2=A0include ../config-host.mak > =C2=A0include $(SRC_PATH)/rules.mak > +include config.mak > > =C2=A0.PHONY: all > > -VPATH=3D$(SRC_PATH) > +# Do not take %.o from $(SRC_PATH), only %.c and %.h > +# All %.o for user targets should be built with -fpie, when > +# configured with --enable-user-pie, so we don't want to > +# take %.o from $(SRC_PATH), since they built without -fpie > +vpath %.c %.h $(SRC_PATH) > > =C2=A0QEMU_CFLAGS+=3D-I.. > > diff --git a/configure b/configure > index 273b6b7..5f463b0 100755 > --- a/configure > +++ b/configure > @@ -2652,3 +2652,6 @@ d=3Dlibuser > =C2=A0mkdir -p $d > =C2=A0rm -f $d/Makefile > =C2=A0ln -s $source_path/Makefile.user $d/Makefile > +if test "$static" =3D "no" -a "$user_pie" =3D "yes" ; then > + =C2=A0echo "QEMU_CFLAGS+=3D-fpie" > $d/config.mak > +fi > -- > 1.6.5.6 > >