Skip to contentSkip to conversation

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

PATCH New Peter Maydell 1 participant 1 message May 26, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

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

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/

---
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
Makefile.target +4 -1
index c83d7ef..5b80dd7 100644
@@ -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/
linux-user/host/generic/hostdep.h new file +20 -0
new file mode 100644
index 0000000..cfabc35
@@ -0,0 +1,20 @@
+/*
+ * hostdep.h : fallback generic version of header for things
+ * which are dependent on the host architecture
+ *
+ *  * Written by Peter Maydell <[email protected]>
+ *
+ * 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
Signature · 1 line
1.9.1