]> git.proxmox.com Git - qemu.git/commitdiff
user_only: compile everything with -fpie
authorKirill A. Shutemov <kirill@shutemov.name>
Sat, 19 Dec 2009 15:16:08 +0000 (15:16 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 20 Dec 2009 09:35:57 +0000 (11:35 +0200)
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 <kirill@shutemov.name>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
[blauwirbel@gmail.com: combined 299060a0 and 58faa1a6 to avoid breakage]
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Makefile.user
configure

index 907e74bd9eec7d7f395e0a67055e792c90988293..7daedeff6d89dc033caf491b3db47e03410838d2 100644 (file)
@@ -2,10 +2,15 @@
 
 include ../config-host.mak
 include $(SRC_PATH)/rules.mak
+-include config.mak
 
 .PHONY: all
 
-VPATH=$(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)
 
 QEMU_CFLAGS+=-I..
 
index 273b6b7c65ca2860bbae0e6ce05b805134bc8345..5f463b05b5c11db3bc490e411951f32ed68ed662 100755 (executable)
--- a/configure
+++ b/configure
@@ -2652,3 +2652,6 @@ d=libuser
 mkdir -p $d
 rm -f $d/Makefile
 ln -s $source_path/Makefile.user $d/Makefile
+if test "$static" = "no" -a "$user_pie" = "yes" ; then
+  echo "QEMU_CFLAGS+=-fpie" > $d/config.mak
+fi