diff mbox

fixup! linux-user: compile on non-x86-64 hosts

Message ID 1464263799-16477-1-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell May 26, 2016, 11:56 a.m. UTC
This is a fixup patch intended to be squashed into the "linux-user:
Provide safe_syscall for fixing races between signalsand syscalls"
patch.

Fix compilation on non-x86-64 hosts by:
 * only adding linux-user/host/$ARCH to the include path if it exists
 * providing a fallback hostdep.h header in linux-user/host/generic/

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Hi Riku; sorry about the compilation failures. I figured that since
you've already taken the series into your queue that a fixup patch
to be squashed in would be the simplest thing. Let me know if you'd
prefer me to just resend the whole series...

thanks
-- PMM

 Makefile.target                   |  5 ++++-
 linux-user/host/generic/hostdep.h | 20 ++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 linux-user/host/generic/hostdep.h
diff mbox

Patch

diff --git a/Makefile.target b/Makefile.target
index c83d7ef..5b80dd7 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -108,8 +108,11 @@  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) \
-             -I$(SRC_PATH)/linux-user/host/$(ARCH) \
+             $(patsubst %,-I%,$(wildcard $(SRC_PATH)/linux-user/host/$(ARCH))) \
+             -I$(SRC_PATH)/linux-user/host/generic \
              -I$(SRC_PATH)/linux-user
 
 obj-y += linux-user/
diff --git a/linux-user/host/generic/hostdep.h b/linux-user/host/generic/hostdep.h
new file mode 100644
index 0000000..cfabc35
--- /dev/null
+++ b/linux-user/host/generic/hostdep.h
@@ -0,0 +1,20 @@ 
+/*
+ * hostdep.h : fallback generic version of header for things
+ * which are dependent on the host architecture
+ *
+ *  * Written by Peter Maydell <peter.maydell@linaro.org>
+ *
+ * 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