diff options
author | Kirill A. Shutemov | 2009-09-12 01:17:55 +0200 |
---|---|---|
committer | Blue Swirl | 2009-09-12 15:17:45 +0200 |
commit | 34005a0060c176b3025a9e7c5d064615a9f80325 (patch) | |
tree | ef0de28fe1f53d91d10bd9000f1cac5680c1dcb3 /configure | |
parent | Fix text relocations in linux-user targets (diff) | |
download | qemu-34005a0060c176b3025a9e7c5d064615a9f80325.tar.gz qemu-34005a0060c176b3025a9e7c5d064615a9f80325.tar.xz qemu-34005a0060c176b3025a9e7c5d064615a9f80325.zip |
Add configure option to compile user targets as PIE
Build uset targers as true PIE if user want to keep qemu
self-virtualizable.
v5:
- Split into to patches: drop link hack and add PIE support
- do not build PIE by default and drop toolchain check
v4:
- Add test for toolchain if it has proper PIE support
v3:
- One more pice of the hack was removed
- Description updated
v2:
- Add configure options do enable/disable PIE for usermode targets.
Disabling can be useful if you build uswing toolchain which has
broken PIE support. PIE for usermode targets enabled by default.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -222,6 +222,7 @@ aix="no" blobs="yes" pkgversion="" check_utests="no" +user_pie="no" # OS specific if check_define __linux__ ; then @@ -503,6 +504,10 @@ for opt do ;; --disable-guest-base) guest_base="no" ;; + --enable-user-pie) user_pie="yes" + ;; + --disable-user-pie) user_pie="no" + ;; --enable-uname-release=*) uname_release="$optarg" ;; --sparc_cpu=*) @@ -683,6 +688,8 @@ echo " --disable-bsd-user disable all BSD usermode emulation targets" echo " --enable-guest-base enable GUEST_BASE support for usermode" echo " emulation targets" echo " --disable-guest-base disable GUEST_BASE support" +echo " --enable-user-pie build usermode emulation targets as PIE" +echo " --disable-user-pie do not build usermode emulation targets as PIE" echo " --fmod-lib path to FMOD library" echo " --fmod-inc path to FMOD includes" echo " --oss-lib path to OSS library" @@ -1723,6 +1730,7 @@ echo "Documentation $docs" echo "uname -r $uname_release" echo "NPTL support $nptl" echo "GUEST_BASE $guest_base" +echo "PIE user targets $user_pie" echo "vde support $vde" echo "IO thread $io_thread" echo "Linux AIO support $linux_aio" @@ -2355,6 +2363,12 @@ if test "$target_softmmu" = "yes" ; then esac fi +if test "$target_user_only" = "yes" -a "$static" = "no" -a \ + "$user_pie" = "yes" ; then + cflags="-fpie $cflags" + ldflags="-pie $ldflags" +fi + if test "$target_softmmu" = "yes" -a \( \ "$TARGET_ARCH" = "microblaze" -o \ "$TARGET_ARCH" = "cris" \) ; then |