[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 20/35] Makefile.target: Introduce arch-obj

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 20/35] Makefile.target: Introduce arch-obj
Date: Sat, 18 Jul 2015 14:29:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

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/.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]