dcavalca / rpms / qemu

Forked from rpms/qemu 11 months ago
Clone

Blame 0001-build-move-user-objects-to-nested-Makefile.objs.patch

79efbf
From 7fc5152c6dca17d6061cc399c46716d9e586ad85 Mon Sep 17 00:00:00 2001
79efbf
From: Paolo Bonzini <pbonzini@redhat.com>
79efbf
Date: Tue, 29 May 2012 09:33:59 +0200
79efbf
Subject: [PATCH] build: move *-user/ objects to nested Makefile.objs
79efbf
79efbf
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
79efbf
---
79efbf
 Makefile.target                    |   32 ++++++++++----------------------
79efbf
 bsd-user/Makefile.objs             |    2 ++
79efbf
 configure                          |    8 +++++++-
79efbf
 linux-user/Makefile.objs           |    7 +++++++
79efbf
 linux-user/arm/nwfpe/Makefile.objs |    2 ++
79efbf
 5 files changed, 28 insertions(+), 23 deletions(-)
79efbf
 create mode 100644 bsd-user/Makefile.objs
79efbf
 create mode 100644 linux-user/Makefile.objs
79efbf
 create mode 100644 linux-user/arm/nwfpe/Makefile.objs
79efbf
79efbf
diff --git a/Makefile.target b/Makefile.target
79efbf
index 40b774a..5cc577b 100644
79efbf
--- a/Makefile.target
79efbf
+++ b/Makefile.target
79efbf
@@ -113,32 +113,20 @@ user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
79efbf
 
79efbf
 # Note: this is a workaround. The real fix is to avoid compiling
79efbf
 # cpu_signal_handler() in user-exec.c.
79efbf
-signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
79efbf
+%/signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
79efbf
 
79efbf
 #########################################################
79efbf
 # Linux user emulator target
79efbf
 
79efbf
 ifdef CONFIG_LINUX_USER
79efbf
 
79efbf
-$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
79efbf
-
79efbf
 QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user
79efbf
-obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
79efbf
-      elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \
79efbf
-      user-exec.o $(oslib-obj-y)
79efbf
-
79efbf
-obj-$(TARGET_HAS_BFLT) += flatload.o
79efbf
-
79efbf
-obj-$(TARGET_I386) += vm86.o
79efbf
 
79efbf
+obj-y += linux-user/
79efbf
+obj-y += gdbstub.o thunk.o user-exec.o $(oslib-obj-y)
79efbf
 obj-i386-y += ioport-user.o
79efbf
-
79efbf
-nwfpe-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o
79efbf
-nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o
79efbf
-obj-arm-y +=  $(addprefix nwfpe/, $(nwfpe-obj-y))
79efbf
-obj-arm-y += arm-semi.o
79efbf
-
79efbf
-obj-m68k-y += m68k-sim.o m68k-semi.o
79efbf
+obj-$(TARGET_ARM) += arm-semi.o
79efbf
+obj-$(TARGET_M68K) += m68k-semi.o
79efbf
 
79efbf
 obj-y += $(addprefix ../, $(universal-obj-y))
79efbf
 obj-y += $(addprefix ../libuser/, $(user-obj-y))
79efbf
@@ -152,13 +140,10 @@ endif #CONFIG_LINUX_USER
79efbf
 
79efbf
 ifdef CONFIG_BSD_USER
79efbf
 
79efbf
-$(call set-vpath, $(SRC_PATH)/bsd-user)
79efbf
-
79efbf
 QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
79efbf
 
79efbf
-obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
79efbf
-        gdbstub.o uaccess.o user-exec.o
79efbf
-
79efbf
+obj-y += bsd-user/
79efbf
+obj-y += gdbstub.o user-exec.o
79efbf
 obj-i386-y += ioport-user.o
79efbf
 
79efbf
 obj-y += $(addprefix ../, $(universal-obj-y))
79efbf
@@ -408,6 +393,9 @@ endif # CONFIG_LINUX_USER
79efbf
 
79efbf
 obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
79efbf
 
79efbf
+nested-vars = obj-y
79efbf
+dummy := $(call unnest-vars)
79efbf
+
79efbf
 ifdef QEMU_PROGW
79efbf
 # The linker builds a windows executable. Make also a console executable.
79efbf
 $(QEMU_PROGW): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
79efbf
diff --git a/bsd-user/Makefile.objs b/bsd-user/Makefile.objs
79efbf
new file mode 100644
79efbf
index 0000000..5e77f57
79efbf
--- /dev/null
79efbf
+++ b/bsd-user/Makefile.objs
79efbf
@@ -0,0 +1,2 @@
79efbf
+obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
79efbf
+	        uaccess.o
79efbf
diff --git a/configure b/configure
79efbf
index 76dd57f..2c44488 100755
79efbf
--- a/configure
79efbf
+++ b/configure
79efbf
@@ -3520,8 +3520,14 @@ mkdir -p $target_dir/ide
79efbf
 mkdir -p $target_dir/usb
79efbf
 mkdir -p $target_dir/9pfs
79efbf
 mkdir -p $target_dir/kvm
79efbf
+if test "$target_linux_user" = yes; then
79efbf
+  mkdir -p $target_dir/linux-user
79efbf
+fi
79efbf
+if test "$target_bsd_user" = yes; then
79efbf
+  mkdir -p $target_dir/bsd-user
79efbf
+fi
79efbf
 if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$target" = "arm-bsd-user" -o "$target" = "armeb-bsd-user" ; then
79efbf
-  mkdir -p $target_dir/nwfpe
79efbf
+  mkdir -p $target_dir/linux-user/arm/nwfpe
79efbf
 fi
79efbf
 symlink "$source_path/Makefile.target" "$target_dir/Makefile"
79efbf
 
79efbf
diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs
79efbf
new file mode 100644
79efbf
index 0000000..5899d72
79efbf
--- /dev/null
79efbf
+++ b/linux-user/Makefile.objs
79efbf
@@ -0,0 +1,7 @@
79efbf
+obj-y = main.o syscall.o strace.o mmap.o signal.o \
79efbf
+	elfload.o linuxload.o uaccess.o cpu-uname.o
79efbf
+
79efbf
+obj-$(TARGET_HAS_BFLT) += flatload.o
79efbf
+obj-$(TARGET_I386) += vm86.o
79efbf
+obj-$(TARGET_ARM) += arm/nwfpe/
79efbf
+obj-$(TARGET_M68K) += m68k-sim.o
79efbf
diff --git a/linux-user/arm/nwfpe/Makefile.objs b/linux-user/arm/nwfpe/Makefile.objs
79efbf
new file mode 100644
79efbf
index 0000000..51b0c32
79efbf
--- /dev/null
79efbf
+++ b/linux-user/arm/nwfpe/Makefile.objs
79efbf
@@ -0,0 +1,2 @@
79efbf
+obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o
79efbf
+obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o
79efbf
-- 
79efbf
1.7.10.4
79efbf