From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1VHHy8-0001PC-NH for ptxdist@pengutronix.de; Wed, 04 Sep 2013 20:38:20 +0200 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1VHHy8-0007mT-MZ for ptxdist@pengutronix.de; Wed, 04 Sep 2013 20:38:20 +0200 Date: Wed, 4 Sep 2013 20:38:20 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Message-ID: <20130904183820.GP24802@pengutronix.de> References: <3c1ab5a6ffb2ef241d9666c0d473afcf@idefix.lespocky.dyndns.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3c1ab5a6ffb2ef241d9666c0d473afcf@idefix.lespocky.dyndns.org> Subject: Re: [ptxdist] problem compiling gdbserver and gdb with -Wcast-align Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Wed, Sep 04, 2013 at 04:19:08PM +0200, Alexander Dahl wrote: > Hei hei, = > = > at the moment we are using ptxdist 2013.07.1 with OSELAS toolchain > 2012.12.1 for arm-v5te. We usually have set -Wcast-align in the extra > toolchain options (TARGET_EXTRA_CFLAGS and the two for C++) to spot > alignment problems in our code. Most software packages throw alignment > warnings. Ignoring what this actually means, this is no problem as long > as the package does not set -Werror. gdb sets -Werror. We tried most > currently available versions of gdb and the build fails, e.g. like this: > = > /home/adahl/Work/bsp/XXX/platform-XXX/build-target/gdbserver-7.5/gdb/gdbs= erver/../common/agent.c: > In function 'agent_look_up_symbols': > /home/adahl/Work/bsp/XXX/platform-XXX/build-target/gdbserver-7.5/gdb/gdbs= erver/../common/agent.c:95:2: > error: cast increases required alignment of target type > [-Werror=3Dcast-align] > cc1: all warnings being treated as errors > make[1]: *** [agent.o] Error 1 > = > I guess one could dig into gdb sources, find and hopefully fix the > problem, make a patch, send it to upstream and to ptxdist, wait, do all > the usual things. > = > One could also drop the additional flag globally. > = > My question: is it possible to override the TARGET_EXTRA_CFLAGS per > package? Maybe in rules/gdbserver.make? Or would this be a bad idea? > = > I'd like a quick solution where I don't have to dig into gdb source code > and can keep the global target warnings. O:-) Drop the flag from the global options and use it for your code is the obvious alternative. This way you generate the warnings exactly in the parts of the build that you seem to care about. Best regards Uwe -- = Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | http://www.pengutronix.de/ | -- = ptxdist mailing list ptxdist@pengutronix.de