From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lyq7Z-00065U-5v for qemu-devel@nongnu.org; Tue, 28 Apr 2009 12:25:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lyq7U-00063c-CM for qemu-devel@nongnu.org; Tue, 28 Apr 2009 12:25:24 -0400 Received: from [199.232.76.173] (port=59168 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lyq7U-00063T-0Z for qemu-devel@nongnu.org; Tue, 28 Apr 2009 12:25:20 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]:53516) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lyq0X-00059U-6p for qemu-devel@nongnu.org; Tue, 28 Apr 2009 12:18:09 -0400 Received: by fxm19 with SMTP id 19so584182fxm.34 for ; Tue, 28 Apr 2009 09:18:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <200904281432.42291.paul@codesourcery.com> References: <200904281432.42291.paul@codesourcery.com> Date: Tue, 28 Apr 2009 19:18:07 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH, RFC] Smarter compilation for target devices From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On 4/28/09, Paul Brook wrote: > > Compile target devices only once for each endian and word size combination, > > saving a few compiles if large number of targets are enabled. > > > > +CPPFLAGS=-I. -I.. -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H > > > > +# Warning: Do not add new files here if they have conditional code > > +# with #ifdef TARGET_xxx etc, use TARGET_PAGE_SIZE or reference > > +# CPUState > > > This is just asking for trouble. Anything that includes cpu.h must be rebuilt > for every cpu. IMO a necessary prerequisite for this change is reworking > header files so that you can't accidentally use the wrong symbols. Yes, this was a hack. I think with your header change it will be much cleaner. > Also, which bitwidth are you intending to distinguish here? target_ulong or > target_phys_addr_t? With a few exceptions, devices don't care about the target_phys_addr_t, of course. The devices that know about target_ulong (or CPUState, TARGET_PAGE_SIZE) can't use this system. > former. Duplicating this logic is both cpu.h and configure is also asking for > trouble. At minimum the build should fail if they disagree. Which logic?