Received: by 2002:adf:ef42:0:0:0:0:0 with SMTP id c2csp3466965wrp; Mon, 23 Sep 2019 21:44:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsCbypulq0HbXmoclVIa5NF3ar9wpzpheVceXDFrDH+gz3YocQXMM0otSCc4nhP6DY8hB+ X-Received: by 2002:ac8:111a:: with SMTP id c26mr901181qtj.321.1569300261039; Mon, 23 Sep 2019 21:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569300261; cv=none; d=google.com; s=arc-20160816; b=kBi4YlOQ2yVBt/5PF0EnGwnfFhGrpFoesbQ5FH2PAlOqu4xVIHQg7/XxSMe0pp9xgu X4KVbBAQ5TrzxhFxdHpGiq986LM0M/ak8MfeT3kpcJpQw7pkoFOY6340UgIHV2abToi2 fi+5GMcWvTjpop1bA+gSjLFPDC2tByVoGx6IrFXv9EEpFSF5m5hKIp9KX7BaGLSsEJlG hyy6vfD4dihlvPkE5N6V7Vt69RTgwZHKSD17bM//SN1foe61Dc1Pv9T17ZePEIfrOcAa yv5lpdYAdTQuafhQM4gN1qypGG4lfG/QhKk73nMKpD3fZTaShln+09xhaZwXl7D6ixE8 jHZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:to :subject; bh=VBvDWKO1/dZA488olDD7Rgygrp2XV4+xZdwXfKH5XyM=; b=UN+5WfTkF8Msnw0dxYL1c4Th/LY4SXuwCnTjglBeHYLDpG0SKzvSTwR78T6RnFx6vr VLqrf6XqzdLMG4jXgQ8iod3ZgBG4gHtoQwhBqkweBoGyOeGK9s0GYeLXnGoKz36ilSLa xXM2X4VoWCadwVc6ED5XJDKMuhGzj7Df8xjagoGEd53JiN9ZhKqmbVLOY/pC+GYoFRBh /hotW6KgeYQizFjRSXyW9bMj81paN59Q+XyPmafokAlw4LDUhhxfMft0vrWThUj+nw2M 9ncxbaKjH74+mifKzi3jj2XloGJYfCVVSBayV9hszVVI99l5fXolCfr4m8aDjNr4b9Vz 63aQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n8si366528qvk.114.2019.09.23.21.44.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Sep 2019 21:44:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:40718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCcgW-0006hf-G8 for alex.bennee@linaro.org; Tue, 24 Sep 2019 00:44:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50191) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCcgN-0006hK-Rq for qemu-arm@nongnu.org; Tue, 24 Sep 2019 00:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCcgL-0004r3-Dv for qemu-arm@nongnu.org; Tue, 24 Sep 2019 00:44:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40320) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCcgL-0004qY-6K; Tue, 24 Sep 2019 00:44:09 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E6F0136899; Tue, 24 Sep 2019 04:44:07 +0000 (UTC) Received: from thuth.remote.csb (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 018C45C1B2; Tue, 24 Sep 2019 04:44:03 +0000 (UTC) Subject: Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds To: Peter Maydell References: <20190921150420.30743-1-thuth@redhat.com> <20190921150420.30743-4-thuth@redhat.com> <0389e9dc-7f78-5b27-4764-51f0bdef5bef@redhat.com> <88bcb5b7-4f91-1cc2-39a1-bd919608737e@redhat.com> From: Thomas Huth Openpgp: preference=signencrypt Autocrypt: addr=thuth@redhat.com; prefer-encrypt=mutual; keydata= mQINBFH7eUwBEACzyOXKU+5Pcs6wNpKzrlJwzRl3VGZt95VCdb+FgoU9g11m7FWcOafrVRwU yYkTm9+7zBUc0sW5AuPGR/dp3pSLX/yFWsA/UB4nJsHqgDvDU7BImSeiTrnpMOTXb7Arw2a2 4CflIyFqjCpfDM4MuTmzTjXq4Uov1giGE9X6viNo1pxyEpd7PanlKNnf4PqEQp06X4IgUacW tSGj6Gcns1bCuHV8OPWLkf4hkRnu8hdL6i60Yxz4E6TqlrpxsfYwLXgEeswPHOA6Mn4Cso9O 0lewVYfFfsmokfAVMKWzOl1Sr0KGI5T9CpmRfAiSHpthhHWnECcJFwl72NTi6kUcUzG4se81 O6n9d/kTj7pzTmBdfwuOZ0YUSqcqs0W+l1NcASSYZQaDoD3/SLk+nqVeCBB4OnYOGhgmIHNW 0Cw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jm4fz0mz+OUi6AHC4CZpwnsliGV ODqwX8Y1zic9viSTbKS01ZNp175POyWViUk9qisPZB7ypfSIVSEULrL347qY/hm9ahhqmn17 Ng255syASv3ehvX7iwWDfzXbA0/TVaqwa1YIkec+/8miicV0zMP9siRcYQkyTqSzaTFBBmqD oiT+z+/E59qj/EKfyce3sbC9XLjXv3mHMrq1tKX4G7IJGnS989E/fg6crv6NHae9Ckm7+lSs IQu4bBP2GxiRQ+NV3iV/KU3ebMRzqIC//DCOxzQNFNJAKldPe/bKZMCxEqtVoRkuJtNdp/5a yXFZ6TfE1hGKrDBYAm4vrnZ4CXFSBDllL59cFFOJCkn4Xboj/aVxxJxF30bn Organization: Red Hat Message-ID: <3a21d31e-fe74-9e0f-fe8d-f9c00a184fe3@redhat.com> Date: Tue, 24 Sep 2019 06:44:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 24 Sep 2019 04:44:07 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , qemu-arm , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , QEMU Developers Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: szY4W+GrN7Ym On 23/09/2019 20.50, Peter Maydell wrote: > On Mon, 23 Sep 2019 at 19:36, Thomas Huth wrote: >> >> On 23/09/2019 20.27, Peter Maydell wrote: >>> On Mon, 23 Sep 2019 at 18:54, Thomas Huth wrote: >>>> Ok, then what would you suggest to solve the problem that this file = has >>>> always to be linked into the binary? I can't use "obj-y +=3D ..." in >>>> hw/intc/Makefile.objs since that would mean that the file also gets >>>> compiled for non-Arm boards. Would you prefer a bunch of stubs inste= ad >>>> that get used if CONFIG_ARM_V7M is not set? >>> >>> I thought obj-y was for only-this-target and obj-common-y was >>> for all-boards ? >> >> Well, obj-y is for the current target that gets compiled. But if you u= se >> it in a Makefile that gets used by all targets, the file gets compiled >> for each target individually. >> >> Just try to change "obj-$(CONFIG_ARM_V7M) +=3D armv7m_nvic.o" into >> "obj-y +=3D armv7m_nvic.o" in hw/int/Makefile.objs, and you'll see it = break: >> >> CC alpha-softmmu/hw/intc/armv7m_nvic.o >> In file included from include/hw/intc/armv7m_nvic.h:13, >> from hw/intc/armv7m_nvic.c:19: >> target/arm/cpu.h:1416: error: "FPCR_DZE" redefined [-Werror] >> #define FPCR_DZE (1 << 9) /* Divide by Zero exception trap enab= le */ >=20 > Sure, so don't define CONFIG_ARM_V7M in a default-config for > a non-Arm architecture. Then you get the behaviour you want: > the file is compiled only for the arm targets. Sigh, the point of this series is that it should also possible to compile *without* CONFIG_ARM_V7M in default-configs if you want (and yes, there are people out there who want to be able to compile a minimalistic QEMU). It's currently not possible to disable this switch. But ok, if you're not really interested in providing a possibility to make qemu-system-arm a little bit more flexible in this regard, never mind, I'll look into other issues instead. Thomas