From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGRFb-0004Yr-TO for qemu-devel@nongnu.org; Sat, 18 Jul 2015 08:29:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGRFX-0004qu-Uf for qemu-devel@nongnu.org; Sat, 18 Jul 2015 08:29:55 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:37102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGRFX-0004qf-Mk for qemu-devel@nongnu.org; Sat, 18 Jul 2015 08:29:51 -0400 Received: by wibud3 with SMTP id ud3so61556201wib.0 for ; Sat, 18 Jul 2015 05:29:51 -0700 (PDT) Sender: Paolo Bonzini References: <86f43fc5800c8f18c03d0ee8f26de440bac4f9fb.1437212383.git.crosthwaite.peter@gmail.com> From: Paolo Bonzini Message-ID: <55AA46BA.5040700@redhat.com> Date: Sat, 18 Jul 2015 14:29:46 +0200 MIME-Version: 1.0 In-Reply-To: <86f43fc5800c8f18c03d0ee8f26de440bac4f9fb.1437212383.git.crosthwaite.peter@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 20/35] Makefile.target: Introduce arch-obj List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, rth@twiddle.net, edgar.iglesias@gmail.com, afaerber@suse.de, Peter Crosthwaite On 18/07/2015 11:40, Peter Crosthwaite wrote: > target-foo is converted to arch-obj. But some CPUs may still need to > export APIs to device land (hw/). An example of this is the ARM > co-processor register interface. Such fns can be split off to new C > files in target-foo/hw dir where they remain obj-y for global > visibility. This creates a clearer separation of which > functions are system global and which are private to the CPU. You have: +arch-obj-y += target-$(TARGET_BASE_ARCH)/ +obj-y += $(foreach a, $(ARCH_DIRS), target-$(a)/hw/) Is the hw/ required? Or could it be simply arch-obj-y += target-$(TARGET_BASE_ARCH)/ obj-y += $(foreach a, $(ARCH_DIRS), target-$(a)/) The Makefile machinery will ignore arch-obj-y definition outside target-multi. If I'm not mistaken, this is exactly the case that is described with ASCII art in rules.mak. On one hand the separation is cool to have; on the other hand it seems a bit artificial when we have arch-obj-y and obj-y in the same directory everywhere else (e.g. at top level). I'm also not sure I like the hw/ prefix because target-arm/hw/ is also used by files in target-arm/. Paolo