public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFA/gdb-7.2] Enable leading-mingw64-underscores by default.
@ 2010-07-07 19:21 Joel Brobecker
  2010-07-08  6:20 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2010-07-07 19:21 UTC (permalink / raw)
  To: gdb-patches; +Cc: ktietz70, Joel Brobecker

There has been a recent ABI change made in GCC for x64-windows, and
the corresponding change was made in binutils/GCC at the same time.
This change must be synchronized between GCC & GDB, because they must
both follow the same convention.

While this change was made, and backward-compatibility switch was
added: --enable-leading-mingw64-underscores.

Until we have a GCC release containing that ABI change (scheduled for
GCC 4.5.1), I think it is more helpful for this GDB release to assume
the old ABI.

This patch changes the configure script to make this new option the
default when not specified. GDB can still be configured by using
--disable-leading-mingw64-underscores.

Note that this patch enables this compatibility feature by default
on all platforms and for all targets. I think that this is the right
thing to do, because this only affects the COFF/PE64 object file
which is independent from host/target.

Tested on x86_64-windows by configuring bfd with and without the patch,
with and without --enable/disable-leading-mingw64-underscores, and
inspecting the contents of bfd/config.h. For kicks, I'm also testing
this change on x86_64-linux, although I don't expect any change there.

bfd/ChangeLog:

        * configure.in: Make --enable-leading-mingw64-underscores
        the default.
        * configure: Regenerate.

Thoughts? Yay? Nay?

Thanks,
-- 
Joel

---
 bfd/configure    |    2 ++
 bfd/configure.in |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bfd/configure b/bfd/configure
index 51a4158..6736940 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -12062,6 +12062,8 @@ fi
 # Check whether --enable-leading-mingw64-underscores was given.
 if test "${enable_leading_mingw64_underscores+set}" = set; then :
   enableval=$enable_leading_mingw64_underscores;
+else
+  enable_leading_mingw64_underscores="yes"
 fi
 
 if  test x"$enable_leading_mingw64_underscores" = xyes ; then :
diff --git a/bfd/configure.in b/bfd/configure.in
index 13fb66f..6ec3614 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -78,7 +78,7 @@ fi
 AC_ARG_ENABLE(leading-mingw64-underscores,
   AS_HELP_STRING([--enable-leading-mingw64-underscores],
                  [Enable leading underscores on 64 bit mingw targets]),
-  [],[])
+  [],[enable_leading_mingw64_underscores="yes"])
 AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ],
   [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1,
     [Define if we should use leading underscore on 64 bit mingw targets])])
-- 
1.7.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA/gdb-7.2] Enable leading-mingw64-underscores by default.
  2010-07-07 19:21 [RFA/gdb-7.2] Enable leading-mingw64-underscores by default Joel Brobecker
@ 2010-07-08  6:20 ` Eli Zaretskii
  2010-07-08 15:49   ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2010-07-08  6:20 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches, ktietz70

> From: Joel Brobecker <brobecker@adacore.com>
> Cc: ktietz70@googlemail.com,	Joel Brobecker <brobecker@adacore.com>
> Date: Wed,  7 Jul 2010 12:21:22 -0700
> 
> There has been a recent ABI change made in GCC for x64-windows, and
> the corresponding change was made in binutils/GCC at the same time.
> This change must be synchronized between GCC & GDB, because they must
> both follow the same convention.
> 
> While this change was made, and backward-compatibility switch was
> added: --enable-leading-mingw64-underscores.
> 
> Until we have a GCC release containing that ABI change (scheduled for
> GCC 4.5.1), I think it is more helpful for this GDB release to assume
> the old ABI.

Is this a build-time only option?  Or can it be toggled at run time?

If the former, I think it is a very bad idea to have the ABI fixed at
build time, because most users of MinGW do not build their own GDB.
At the time when 2 incompatible ABIs coexist, it is very important to
have GDB that could adapt to either.

If the latter, is this issue documented anywhere (I cannot find it)?
If it is documented, why doesn't this patch include a suitable change
for that documentation?  If it isn't, please add it, and please
include in the docs the symptoms of using the wrong ABI, which is when
the user should set this option accordingly.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA/gdb-7.2] Enable leading-mingw64-underscores by default.
  2010-07-08  6:20 ` Eli Zaretskii
@ 2010-07-08 15:49   ` Joel Brobecker
  2010-07-08 16:50     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2010-07-08 15:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches, ktietz70

> Is this a build-time only option?  Or can it be toggled at run time?

It is build-time only, unfortunately.  There was a discussion about
that last month, where I was initially confused about the problem:

    http://www.sourceware.org/ml/gdb-patches/2010-06/msg00387.html

> If the former, I think it is a very bad idea to have the ABI fixed at
> build time, because most users of MinGW do not build their own GDB.
> At the time when 2 incompatible ABIs coexist, it is very important to
> have GDB that could adapt to either.

The problem is that I do not know whether we can make it work or not.
It's on my agenda of things to do, but right now, and for the next
few weeks, that's as much time as I have to help on that topic.
Perhaps someone else might want to jump in and help?

Kai is the author on the bfd end of things, so perhaps he could change
that part so as to make it dynamic, as opposed to static?

> If the latter, is this issue documented anywhere (I cannot find it)?
> If it is documented, why doesn't this patch include a suitable change
> for that documentation?  If it isn't, please add it, and please
> include in the docs the symptoms of using the wrong ABI, which is when
> the user should set this option accordingly.

Just so you know, I understand what you are asking and why, but
unfortunately, just as above, I do not think I will have the resources
to address all that before we get 7.2 out. Someone else will have
to step in for the group.

-- 
Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA/gdb-7.2] Enable leading-mingw64-underscores by default.
  2010-07-08 15:49   ` Joel Brobecker
@ 2010-07-08 16:50     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2010-07-08 16:50 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches, ktietz70

> Date: Thu, 8 Jul 2010 08:49:04 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org, ktietz70@googlemail.com
> 
> > If the former, I think it is a very bad idea to have the ABI fixed at
> > build time, because most users of MinGW do not build their own GDB.
> > At the time when 2 incompatible ABIs coexist, it is very important to
> > have GDB that could adapt to either.
> 
> The problem is that I do not know whether we can make it work or not.

Well, we should at least have the symptoms of the wrong ABI spelled
out in PROBLEMS.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-08 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-07 19:21 [RFA/gdb-7.2] Enable leading-mingw64-underscores by default Joel Brobecker
2010-07-08  6:20 ` Eli Zaretskii
2010-07-08 15:49   ` Joel Brobecker
2010-07-08 16:50     ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).