mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] problem compiling gdbserver and gdb with -Wcast-align
Date: Wed, 4 Sep 2013 20:38:20 +0200	[thread overview]
Message-ID: <20130904183820.GP24802@pengutronix.de> (raw)
In-Reply-To: <3c1ab5a6ffb2ef241d9666c0d473afcf@idefix.lespocky.dyndns.org>

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/gdbserver/../common/agent.c:
> In function 'agent_look_up_symbols':
> /home/adahl/Work/bsp/XXX/platform-XXX/build-target/gdbserver-7.5/gdb/gdbserver/../common/agent.c:95:2:
> error: cast increases required alignment of target type
> [-Werror=cast-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önig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2013-09-04 18:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 14:19 Alexander Dahl
2013-09-04 18:38 ` Uwe Kleine-König [this message]
2013-09-05  7:19   ` Alexander Dahl
2013-09-09  9:38 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130904183820.GP24802@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox