[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 09/24] linux-user: Create a hostdep.h for each hos
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL v2 09/24] linux-user: Create a hostdep.h for each host architecture |
Date: |
Tue, 28 Jun 2016 22:12:43 +0300 |
From: Peter Maydell <address@hidden>
In commit 4d330cee37a21 a new hostdep.h file was added, with the intent
that host architectures which needed one could provide it, and the
build system would automatically fall back to a generic version if
there was no version for the host architecture. Although this works,
it has a flaw: if a subsequent commit switches an architecture from
"uses generic/hostdep.h" to "uses its own hostdep.h" nothing in the
makefile dependencies notices this and so doing a rebuild without
a manual 'make clean' will fail.
So we drop the idea of having a 'generic' version in favour of
every architecture we support having its own hostdep.h, even if
it doesn't have anything in it. (There are only thirteen of these.)
If the dependency files claim that an object file depends on a
nonexistent file, our dependency system means that make will
rebuild the object file, and regenerate the dependencies in
the process. So moving between trees prior to this commit and
trees after this commit works without requiring a 'make clean'.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
Makefile.target | 5 +----
linux-user/host/aarch64/hostdep.h | 15 +++++++++++++++
linux-user/host/arm/hostdep.h | 15 +++++++++++++++
linux-user/host/generic/hostdep.h | 20 --------------------
linux-user/host/i386/hostdep.h | 15 +++++++++++++++
linux-user/host/ia64/hostdep.h | 15 +++++++++++++++
linux-user/host/mips/hostdep.h | 15 +++++++++++++++
linux-user/host/ppc/hostdep.h | 15 +++++++++++++++
linux-user/host/ppc64/hostdep.h | 15 +++++++++++++++
linux-user/host/s390/hostdep.h | 15 +++++++++++++++
linux-user/host/s390x/hostdep.h | 15 +++++++++++++++
linux-user/host/sparc/hostdep.h | 15 +++++++++++++++
linux-user/host/sparc64/hostdep.h | 15 +++++++++++++++
linux-user/host/x32/hostdep.h | 15 +++++++++++++++
14 files changed, 181 insertions(+), 24 deletions(-)
create mode 100644 linux-user/host/aarch64/hostdep.h
create mode 100644 linux-user/host/arm/hostdep.h
delete mode 100644 linux-user/host/generic/hostdep.h
create mode 100644 linux-user/host/i386/hostdep.h
create mode 100644 linux-user/host/ia64/hostdep.h
create mode 100644 linux-user/host/mips/hostdep.h
create mode 100644 linux-user/host/ppc/hostdep.h
create mode 100644 linux-user/host/ppc64/hostdep.h
create mode 100644 linux-user/host/s390/hostdep.h
create mode 100644 linux-user/host/s390x/hostdep.h
create mode 100644 linux-user/host/sparc/hostdep.h
create mode 100644 linux-user/host/sparc64/hostdep.h
create mode 100644 linux-user/host/x32/hostdep.h
diff --git a/Makefile.target b/Makefile.target
index d720b3e..a440bcb 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -108,11 +108,8 @@ obj-$(CONFIG_LIBDECNUMBER) += libdecnumber/dpd/decimal128.o
ifdef CONFIG_LINUX_USER
-# Note that we only add linux-user/host/$ARCH if it exists, and
-# that it must come before linux-user/host/generic in the search path.
QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \
- $(patsubst %,-I%,$(wildcard $(SRC_PATH)/linux-user/host/$(ARCH)))
\
- -I$(SRC_PATH)/linux-user/host/generic \
+ -I$(SRC_PATH)/linux-user/host/$(ARCH) \
-I$(SRC_PATH)/linux-user
obj-y += linux-user/
diff --git a/linux-user/host/aarch64/hostdep.h
b/linux-user/host/aarch64/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/aarch64/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/arm/hostdep.h b/linux-user/host/arm/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/arm/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/generic/hostdep.h
b/linux-user/host/generic/hostdep.h
deleted file mode 100644
index cfabc35..0000000
--- a/linux-user/host/generic/hostdep.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * hostdep.h : fallback generic version of header for things
- * which are dependent on the host architecture
- *
- * * Written by Peter Maydell <address@hidden>
- *
- * Copyright (C) 2016 Linaro Limited
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
- * See the COPYING file in the top-level directory.
- */
-
-#ifndef QEMU_HOSTDEP_H
-#define QEMU_HOSTDEP_H
-
-/* This is the fallback header which is only used if the host
- * architecture doesn't provide one in linux-user/host/$ARCH.
- */
-
-#endif
diff --git a/linux-user/host/i386/hostdep.h b/linux-user/host/i386/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/i386/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/ia64/hostdep.h b/linux-user/host/ia64/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/ia64/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/mips/hostdep.h b/linux-user/host/mips/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/mips/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/ppc/hostdep.h b/linux-user/host/ppc/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/ppc/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/ppc64/hostdep.h b/linux-user/host/ppc64/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/ppc64/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/s390/hostdep.h b/linux-user/host/s390/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/s390/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/s390x/hostdep.h b/linux-user/host/s390x/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/s390x/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/sparc/hostdep.h b/linux-user/host/sparc/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/sparc/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/sparc64/hostdep.h
b/linux-user/host/sparc64/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/sparc64/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
diff --git a/linux-user/host/x32/hostdep.h b/linux-user/host/x32/hostdep.h
new file mode 100644
index 0000000..7609bf5
--- /dev/null
+++ b/linux-user/host/x32/hostdep.h
@@ -0,0 +1,15 @@
+/*
+ * hostdep.h : things which are dependent on the host architecture
+ *
+ * * Written by Peter Maydell <address@hidden>
+ *
+ * Copyright (C) 2016 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_HOSTDEP_H
+#define QEMU_HOSTDEP_H
+
+#endif
--
2.1.4
- [Qemu-devel] [PULL v2 00/24] linux-user changes for v2.7, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 01/24] linux-user: Avoid possible misalignment in host_to_target_siginfo(), riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 02/24] linux-user: Use __get_user() and __put_user() to handle structs in do_fcntl(), riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 04/24] linux-user: Don't use sigfillset() on uc->uc_sigmask, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 05/24] configure: Don't override ARCH=unknown if enabling TCI, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 08/24] user-exec: Remove unused code for OSX hosts, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 03/24] linux-user: Use safe_syscall wrapper for fcntl, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 06/24] configure: Don't allow user-only targets for unknown CPU architectures, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 07/24] user-exec: Delete now-unused hppa and m68k cpu_signal_handler() code, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 11/24] linux-user: Support F_GETPIPE_SZ and F_SETPIPE_SZ fcntls, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 09/24] linux-user: Create a hostdep.h for each host architecture,
riku . voipio <=
- [Qemu-devel] [PULL v2 10/24] linux-user: Fix wrong type used for argument to rt_sigqueueinfo, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 13/24] linux-user: add socket() strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 15/24] linux-user: update get_thread_area/set_thread_area strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 14/24] linux-user: fix clone() strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 12/24] linux-user: add socketcall() strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 17/24] linux-user: fd_trans_host_to_target_data() must process only received data, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 18/24] linux-user: don't swap NLMSG_DATA() fields, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 16/24] linux-user: add missing return in netlink switch statement, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 21/24] linux-user: Provide safe_syscall for arm, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 20/24] linux-user: Provide safe_syscall for i386, riku . voipio, 2016/06/28