From patchwork Thu May 26 11:56:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 9136937 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BE465607D5 for ; Thu, 26 May 2016 11:57:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0B1E27D11 for ; Thu, 26 May 2016 11:57:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5146282EE; Thu, 26 May 2016 11:57:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1BC8B27D11 for ; Thu, 26 May 2016 11:57:06 +0000 (UTC) Received: from localhost ([::1]:38023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5tuS-00039n-A2 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 26 May 2016 07:57:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5tuD-00039f-Id for qemu-devel@nongnu.org; Thu, 26 May 2016 07:56:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5tuC-0000fu-H6 for qemu-devel@nongnu.org; Thu, 26 May 2016 07:56:49 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:57237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5tuC-0000eX-8X for qemu-devel@nongnu.org; Thu, 26 May 2016 07:56:48 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1b5tu3-00042D-K9; Thu, 26 May 2016 12:56:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 26 May 2016 12:56:39 +0100 Message-Id: <1464263799-16477-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] fixup! linux-user: compile on non-x86-64 hosts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , patches@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 --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 + * + * 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