From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLnSH-0000ld-EO for qemu-devel@nongnu.org; Fri, 18 Dec 2009 19:45:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLnSB-0000l0-F5 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 19:45:55 -0500 Received: from [199.232.76.173] (port=39810 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLnSB-0000kx-AB for qemu-devel@nongnu.org; Fri, 18 Dec 2009 19:45:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3764) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLnSB-0003eq-F1 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 19:45:51 -0500 From: Juan Quintela In-Reply-To: (Kirill A. Shutemov's message of "Sat, 19 Dec 2009 02:26:52 +0200") References: <1260973234-12601-1-git-send-email-kirill@shutemov.name> Date: Sat, 19 Dec 2009 01:44:50 +0100 Message-ID: MIME-Version: 1.0 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: "Kirill A. Shutemov" Cc: Blue Swirl , qemu-devel@nongnu.org "Kirill A. Shutemov" wrote: > ping? Blue or Anthony, please apply. Patch is needed to get libuser + pie working well. Later, Juan. > 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 >> >>