From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10996 invoked by alias); 11 Nov 2008 18:11:55 -0000 Received: (qmail 10913 invoked by uid 22791); 11 Nov 2008 18:11:54 -0000 X-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_53,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Nov 2008 18:11:01 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 713AA208030 for ; Tue, 11 Nov 2008 18:10:58 +0000 (GMT) X-Virus-Scanned: amavisd-new at ecoscentric.com Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DxbDguecjq0O; Tue, 11 Nov 2008 18:10:53 +0000 (GMT) Message-ID: <4919CAAC.50701@eCosCentric.com> Date: Tue, 11 Nov 2008 18:11:00 -0000 From: Jonathan Larmour User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: John Dallaway CC: ecos-maintainers@ecos.sourceware.org Subject: Re: Build flag changes [ was Re: Large patch to merge in changes for gcc 4.3 ] References: <49190329.8060904@eCosCentric.com> <4919C62F.201@ecoscentric.com> In-Reply-To: <4919C62F.201@ecoscentric.com> X-Enigmail-Version: 0.94.4.0 OpenPGP: id=A5FB74E6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-maintainers-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-maintainers-owner@ecos.sourceware.org X-SW-Source: 2008-11/txt/msg00001.txt.bz2 John Dallaway wrote: > Jonathan Larmour wrote: > >> Therefore if we're going to be touching all HAL's CYGBLD_GLOBAL_CFLAGS, >> it's an opportunity to centralise these warning flags, which are entirely >> generic and are distributed identically across all HALs. I propose adding a >> CYGBLD_GLOBAL_WARNFLAGS CDL option in hal/common. And I will remove all the >> standard warning flags[1] from all HALs, and replace it with a reference to >> that option. More specifically I suggest that CYGBLD_GLOBAL_WARNFLAGS is an >> option which consists of a concatenation of CYGBLD_GLOBAL_WARNFLAGS_C, >> CYGBLD_GLOBAL_WARNFLAGS_CXX and CYGBLD_GLOBAL_WARNFLAGS_COMMON. Each of >> these takes their default_value from an identically named option with a >> _DEFAULT suffix. This allows package CDL to control the default, as well as >> letting users override it. It also starts to give us a route to avoid the >> horrible hackery in pkgconf/rules.mak to eliminate language-specific flags >> by replacing it with something properly controlled. If anyone has a better >> proposal, I'd like to hear it, although be warned that if it is more >> effort, then they can consider themselves automatically volunteered to do it! > > I agree that the rules.mak hackery should be eliminated but your > proposal appears to involve a lot of CDL editing Only by script. And this is a step towards eliminating the hackery, but won't yet do so in isolation. > and suggests a need for > updated host tools to read and process the new CYGBLD_GLOBAL_WARN* > options. I was intending a default_value for the platform CFLAGS of the existing options string concatenated with CYGBLD_GLOBAL_WARNFLAGS e.g. default_value { "-mcpu=arm9 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" } becomes default_value { "-mcpu=arm9 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " . CYGBLD_GLOBAL_WARNFLAGS } This sort of substitution is very amenable to being done by script. In due course I would expect we'd remove CYGBLD_GLOBAL_CFLAGS and build in direct host tools knowledge, no doubt with the ever-distant rewritten makefile generator (then CYGBLD_GLOBAL_WARNFLAGS_C is only used for C files, CYGBLD_GLOBAL_WARNFLAGS_CXX is only used for C++ files, etc.) But not for eCos 3.0. With this change, after the release branch is taken, I can simply change CYGBLD_GLOBAL_WARNFLAGS_COMMON_DEFAULT to add -Wno-write-strings. > I'm concerned about the time overhead for debugging and testing > such changes at a late stage in the release cycle. Could your proposal > be split into phases to keep changes to a minimum for eCos 3.0 while > still avoiding multiple edits to the platform HAL CDL scripts? I'd want to do it by script in any case if it was for more than a handful of targets, so I don't see any reason not to do all targets. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["Si fractum non sit, noli id reficere"]------ Opinions==mine