Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kai Tietz <ktietz70@googlemail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	pmuldoon@redhat.com, 	Eli Zaretskii <eliz@gnu.org>,
	gdb@sourceware.org
Subject: Re: py-breakpoint.c fails to compile with MinGW GCC
Date: Thu, 28 Jul 2011 16:11:00 -0000	[thread overview]
Message-ID: <CAEwic4ZFa1NPnd8xd1vmw_Dq5mCnZ2_swzYQ6yNZ5sVgmeHBmA@mail.gmail.com> (raw)
In-Reply-To: <m34o2676m8.fsf@fleche.redhat.com>

2011/7/28 Tom Tromey <tromey@redhat.com>:
> Joel> It does compile for me too. Could be a compiler age issue?
>
> I asked Kai and that is what he thinks.
>
> The Python docs don't say much:
>
>    We’d like to just assign this to the tp_new slot, but we can’t, for
>    portability sake, On some platforms or compilers, we can’t statically
>    initialize a structure member with a function defined in another C
>    module, so, instead, we’ll assign the tp_new slot in the module
>    initialization function just before calling PyType_Ready():
>
> See http://docs.python.org/extending/newtypes.html
>
> Joel> Just wondering out loud - if we were to use a C++ compiler, would
> Joel> it allow us to use non-static initializers like in this case?
> Joel> I'm under the impression that C++ provides elaboration, so
> Joel> non-static initialization should be do-able...
>
> That would work; and while I want to do this, I think it is simpler to
> just fix the initializations.  Or, just require people to use a newer
> GCC; 3.4 is 5 years old at this point.
>
> Tom

I looked a bit more in detail on this issue and indeed it is a
compiler age issue.  Newer compilers with pseudo-relocation support
are able to handle DLL-imported symbols in assignments for
global/static variables.
This is for older gcc versions (and indeed 3.4 is pretty old one) not possible.

Regards,
Kai


  reply	other threads:[~2011-07-28 16:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 12:07 Eli Zaretskii
2011-07-28 14:54 ` Phil Muldoon
2011-07-28 15:01   ` Tom Tromey
2011-07-28 15:19     ` Joel Brobecker
2011-07-28 15:37       ` Phil Muldoon
2011-07-28 15:44       ` Tom Tromey
2011-07-28 16:11         ` Kai Tietz [this message]
2011-07-28 16:17         ` Eli Zaretskii
2011-07-28 16:46           ` Tom Tromey
2011-07-28 17:07             ` Eli Zaretskii
2011-07-29  3:04               ` Chris Sutcliffe
2011-07-29  6:13                 ` Eli Zaretskii
2011-07-28 16:13     ` Eli Zaretskii
2011-07-28 16:25       ` Joel Brobecker
2011-07-28 16:48       ` Tom Tromey

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=CAEwic4ZFa1NPnd8xd1vmw_Dq5mCnZ2_swzYQ6yNZ5sVgmeHBmA@mail.gmail.com \
    --to=ktietz70@googlemail.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=tromey@redhat.com \
    /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