summaryrefslogtreecommitdiff
path: root/Makefile.target
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2009-09-12 02:17:55 +0300
committerBlue Swirl <blauwirbel@gmail.com>2009-09-12 13:17:45 +0000
commit34005a0060c176b3025a9e7c5d064615a9f80325 (patch)
treeef0de28fe1f53d91d10bd9000f1cac5680c1dcb3 /Makefile.target
parentdf70204db53e3611af986f434e74a882bce190ca (diff)
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 'Makefile.target')
-rw-r--r--Makefile.target19
1 files changed, 15 insertions, 4 deletions
diff --git a/Makefile.target b/Makefile.target
index 0fe8b6ac3..6314e0e78 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -31,7 +31,7 @@ all: $(PROGS)
#########################################################
# cpu emulator library
-libobj-y = exec.o translate-all.o cpu-exec.o translate.o
+libobj-y = exec.o translate-all.o cpu-exec.o translate.o host-utils.o
libobj-y += tcg/tcg.o tcg/tcg-runtime.o
libobj-$(CONFIG_SOFTFLOAT) += fpu/softfloat.o
libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
@@ -80,9 +80,9 @@ ifdef CONFIG_LINUX_USER
VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
-
obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
elfload.o linuxload.o uaccess.o gdbstub.o gdbstub-xml.o
+obj-y += envlist.o path.o
obj-$(TARGET_HAS_BFLT) += flatload.o
obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o
@@ -98,7 +98,7 @@ obj-arm-y += arm-semi.o
obj-m68k-y += m68k-sim.o m68k-semi.o
-ARLIBS=../libqemu_user.a libqemu.a
+ARLIBS=libqemu.a
endif #CONFIG_LINUX_USER
#########################################################
@@ -116,6 +116,7 @@ LIBS+=-lmx
obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
gdbstub.o gdbstub-xml.o
+obj-y += envlist.o path.o
obj-i386-y += ioport-user.o
@@ -133,13 +134,23 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
gdbstub.o gdbstub-xml.o uaccess.o
+obj-y += envlist.o path.o
obj-i386-y += ioport-user.o
-ARLIBS=libqemu.a ../libqemu_user.a
+ARLIBS=libqemu.a
endif #CONFIG_BSD_USER
+ifdef CONFIG_USER_ONLY
+# hack to compile with -fpie for *-user targets
+obj-y += cutils-user.o cache-utils-user.o
+cutils-user.c cache-utils-user.c:
+ @echo " LN $(TARGET_DIR)$@"
+ @ln -s $(SRC_PATH)/$(@:%-user.c=%.c) $@
+endif
+
+
#########################################################
# System emulator target
ifdef CONFIG_SOFTMMU