All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] gdb: fix sim support for ARM
Date: Fri, 5 Aug 2016 00:20:06 +0200	[thread overview]
Message-ID: <20160805002006.7534eb58@free-electrons.com> (raw)
In-Reply-To: <20160731112751.GA26681@waldemar-brodkorb.de>

Hello,

On Sun, 31 Jul 2016 13:27:51 +0200, Waldemar Brodkorb wrote:

> +-/* TODO: Probably should just delete SIM_CPU.  */
> ++/* GCC 4.4 and older should not define this.  */
> ++#define GCC_VERSION (__GNUC__ * 10000 \
> ++                               + __GNUC_MINOR__ * 100 \
> ++                               + __GNUC_PATCHLEVEL__)
> ++#if __GCC_VERSION > 40400
> + typedef struct _sim_cpu SIM_CPU;
> ++#endif
> + typedef struct _sim_cpu sim_cpu;

This is not the proper fix, and will potentially break again the build
for architectures other than Blackfin, when built with gcc 4.4.x.

The core of the problem is a commit from Mike Frysinger that refactors
the definition of the SIM_CPU type into a common header file. However,
due to include ordering issues, Mike had to keep a redefinition of
SIM_CPU in the Blackfin specific header file. This is fine with recent
compiler versions with which you can redefine multiple times the same
type, but causes a build failures with older compilers.

However, not all architectures have their own redefinition of SIM_CPU,
so if you remove it for gcc 4.4.x and older, you will break the build
of those architectures when gcc 4.4.x or older is used.

So, I've instead committed a patch that reverts Mike's commit for both
7.10 and 7.11. I've tested the build of the simulator on Blackfin and
ARM, with modern and ancient compilers and it seems to have fixed the
problem.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      parent reply	other threads:[~2016-08-04 22:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-31 11:27 [Buildroot] [PATCH] gdb: fix sim support for ARM Waldemar Brodkorb
2016-08-01 21:23 ` Romain Naour
2016-08-04 22:20 ` Thomas Petazzoni [this message]

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=20160805002006.7534eb58@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.