Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [committed] Don't pass -m32 to libcc1 on arm-linux
Date: Fri, 19 Jan 2018 17:49:00 -0000	[thread overview]
Message-ID: <CAH=s-POiwEwaPPE=vXQtQ4JzZt=d6E9dZG_5pMH0hhd0DWHKPA@mail.gmail.com> (raw)
In-Reply-To: <498b69e2-1204-b286-4284-90f148372d05@redhat.com>

On Fri, Jan 19, 2018 at 4:34 PM, Pedro Alves <palves@redhat.com> wrote:
> On 01/19/2018 04:24 PM, Andreas Schwab wrote:
>> On Jan 19 2018, Yao Qi <qiyaoltc@gmail.com> wrote:
>>
>>> This patch fixes it by implementing gcc_target_options gdbarch method
>>> for arm-linux to override option "-m32".
>>
>> Why is that not the default?
> I think for really no good reason other than the coincidence that
> the first couple ports that implemented this hook could share the
> same set of "-m" options.

The compile project was started for x86, so it had x86 options in
default.

char *
default_gcc_target_options (struct gdbarch *gdbarch)
{
  return xstrprintf ("-m%d%s", gdbarch_ptr_bit (gdbarch),
    gdbarch_ptr_bit (gdbarch) == 64 ? " -mcmodel=large" : "");
}

which is not correct for other arches.  What is more, we have
no way to disable "compile" feature even it is not support on
some arches.  If libcc1.so can be loaded in GDB, GDB thinks
everything is OK, and use it unconditionally for "compile"
feature.

-- 
Yao (齐尧)


      reply	other threads:[~2018-01-19 17:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19  9:17 Yao Qi
2018-01-19 16:24 ` Andreas Schwab
2018-01-19 16:34   ` Pedro Alves
2018-01-19 17:49     ` Yao Qi [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='CAH=s-POiwEwaPPE=vXQtQ4JzZt=d6E9dZG_5pMH0hhd0DWHKPA@mail.gmail.com' \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=schwab@linux-m68k.org \
    /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