From patchwork Fri Jun 24 09:53:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 70812 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp865718qgy; Fri, 24 Jun 2016 03:09:52 -0700 (PDT) X-Received: by 10.55.46.197 with SMTP id u188mr3599820qkh.84.1466762992663; Fri, 24 Jun 2016 03:09:52 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w30si4360955qtd.46.2016.06.24.03.09.52 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 24 Jun 2016 03:09:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGO3c-0002S7-01 for patch@linaro.org; Fri, 24 Jun 2016 06:09:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNnx-0000ot-Ur for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGNns-0003NC-HO for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:41 -0400 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:35404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNns-0003N4-4S for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:36 -0400 Received: by mail-lf0-x233.google.com with SMTP id l188so111652334lfe.2 for ; Fri, 24 Jun 2016 02:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UezVY5XlXlHxVF1obICKACRyj6QbZalnZnifoGA/Mpw=; b=fXgOzx6c6OUqfC11J8aSxU+6hPEyvnfKTp7o2RsGOYBaP5CAipoI7T9MJISNS6ZT05 aLkg9qRQXahl55TN4Ub6T/Uf/SU0MG5wTnnP7ZQ4UCeIg6yKN6Ncc01oL3EWMN76EgMz FNWwrL5YC1F3+qo/rr5glnibZ8R7ZjVJuMRtg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UezVY5XlXlHxVF1obICKACRyj6QbZalnZnifoGA/Mpw=; b=f3zSZY2/kwK4ZCEsV2Xs9fq6N4+Rlf+k89QFn02/moLX6xBDq5ohYaqbfCIo+3cvox piIZmzTTEYx6W1NT4a9kfeVNUSRUbPcNI/PPWXzbz7WoOK8Wzx5F6XEkyTCNVzGIWHjB UxAOvq71eOehonto5dn+ZPTa1OSoIFKlhTnxFNaBE+MlGOYQ1NJ+rUvHH7Ad8k3LZ7gp Oo4DeRqbCeYMbT9BGfUH+8+ANDQdqU1xaXxHfhjSv8SrQbJXkuVq+3cWA8xYtV0e+kHF myskXOXUrGIUXEP5fHOqJkLKqIZefyLE3K6R+3h56XrWDC3IrL49x8s+/l/C2sYq4Wtk 4euQ== X-Gm-Message-State: ALyK8tIr6JZjlWAyDXAQbT3mE9z29X3cWg0GrvDGacPPdX/7b/yh/g4UVN7z1pPosal8t9WX X-Received: by 10.25.44.148 with SMTP id s142mr1022192lfs.146.1466762015030; Fri, 24 Jun 2016 02:53:35 -0700 (PDT) Received: from beaming.home (85-76-80-69-nat.elisa-mobile.fi. [85.76.80.69]) by smtp.gmail.com with ESMTPSA id o137sm798203lfe.2.2016.06.24.02.53.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jun 2016 02:53:34 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 24 Jun 2016 12:53:04 +0300 Message-Id: <771758ab5c21eb581638252e7ef91eb195a2433b.1466760944.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::233 Subject: [Qemu-devel] [PULL 09/24] linux-user: Create a hostdep.h for each host architecture 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: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell 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 Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Riku Voipio --- 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 -- 2.1.4 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 + * + * 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 + * + * 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 - * - * 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 + * + * 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 + * + * 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 + * + * 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 + * + * 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 + * + * 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 + * + * 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 + * + * 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 + * + * 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 + * + * 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 + * + * 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