qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>,
	"Kirill A. Shutemov" <kirill@shutemov.name>
Subject: [Qemu-devel] [PATCH] Fix TEXTREL in user targets when compiled with --enable-user-pie
Date: Tue, 15 Dec 2009 03:10:04 +0200	[thread overview]
Message-ID: <1260839404-28622-1-git-send-email-kirill@shutemov.name> (raw)

We really need compile _all_ sources for user target with -fpie when
use --enable-user-pie.

It's regression introduced by commit add16157d72454.
Please, do not break it any more.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Blue Swirl <blauwirbel@gmail.com>
---
 Makefile.user |    4 ++--
 configure     |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.user b/Makefile.user
index 907e74b..0be73df 100644
--- a/Makefile.user
+++ b/Makefile.user
@@ -5,9 +5,9 @@ include $(SRC_PATH)/rules.mak
 
 .PHONY: all
 
-VPATH=$(SRC_PATH)
+vpath %.c $(SRC_PATH)
 
-QEMU_CFLAGS+=-I..
+QEMU_CFLAGS+=-I$(SRC_PATH)/ $(CFLAGS_PIE)
 
 obj-y =
 obj-y += envlist.o path.o
diff --git a/configure b/configure
index 273b6b7..6200391 100755
--- a/configure
+++ b/configure
@@ -2555,6 +2555,7 @@ if test "$target_user_only" = "yes" -a "$static" = "no" -a \
 	"$user_pie" = "yes" ; then
   cflags="-fpie $cflags"
   ldflags="-pie $ldflags"
+  echo "CFLAGS_PIE=-fpie" >> $config_host_mak
 fi
 
 if test "$target_softmmu" = "yes" -a \( \
-- 
1.6.5.6

             reply	other threads:[~2009-12-15  1:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15  1:10 Kirill A. Shutemov [this message]
2009-12-15 19:48 ` [Qemu-devel] Re: [PATCH] Fix TEXTREL in user targets when compiled with --enable-user-pie Kirill A. Shutemov
2009-12-15 20:55   ` Juan Quintela
2009-12-16  8:45     ` Kirill A. Shutemov
2009-12-16  9:15       ` Paolo Bonzini
2009-12-16  9:25         ` Kirill A. Shutemov
2009-12-16 10:06           ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1260839404-28622-1-git-send-email-kirill@shutemov.name \
    --to=kirill@shutemov.name \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).