Skip to content

Commit

Permalink
user_only: compile everything with -fpie
Browse files Browse the repository at this point in the history
We really need compile _all_ sources for user target with -fpie when
use --enable-user-pie.

It's regression introduced by commit add1615.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  • Loading branch information
kiryl authored and blueswirl committed Dec 19, 2009
1 parent 060fbfe commit 299060a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile.user
Original file line number Diff line number Diff line change
Expand Up @@ -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..

Expand Down
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 299060a

Please sign in to comment.