* [Qemu-devel] gccism's are ok?
@ 2008-08-11 13:24 Gerd Hoffmann
2008-08-11 13:38 ` Glauber Costa
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2008-08-11 13:24 UTC (permalink / raw)
To: qemu-devel
Hi,
Quick question: Is it ok to use gcc-specific features in qemu? Or will
that break builds on some platform?
Linux obviously is gcc, MacOS X too as far I know. MinGW on Windows is
gcc too. Anything else we care about?
I'm thinking especially about the constructor attribute. That would
allow to make drivers self-contained, by having a register() call in a
small constructor function ...
cheers,
Gerd
--
http://kraxel.fedorapeople.org/xenner/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] gccism's are ok?
2008-08-11 13:24 [Qemu-devel] gccism's are ok? Gerd Hoffmann
@ 2008-08-11 13:38 ` Glauber Costa
2008-08-11 13:53 ` Anthony Liguori
2008-08-12 8:28 ` Thiemo Seufer
2 siblings, 0 replies; 5+ messages in thread
From: Glauber Costa @ 2008-08-11 13:38 UTC (permalink / raw)
To: qemu-devel
On Mon, Aug 11, 2008 at 10:24 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> Quick question: Is it ok to use gcc-specific features in qemu? Or will
> that break builds on some platform?
>
> Linux obviously is gcc, MacOS X too as far I know. MinGW on Windows is
> gcc too. Anything else we care about?
>
> I'm thinking especially about the constructor attribute. That would
> allow to make drivers self-contained, by having a register() call in a
> small constructor function ...
I'm doing that in QEMUAccel, and although I'm also not sure how well
it'll go, nobody complained
so far.
>
> cheers,
> Gerd
>
> --
> http://kraxel.fedorapeople.org/xenner/
>
>
>
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] gccism's are ok?
2008-08-11 13:24 [Qemu-devel] gccism's are ok? Gerd Hoffmann
2008-08-11 13:38 ` Glauber Costa
@ 2008-08-11 13:53 ` Anthony Liguori
2008-08-11 14:15 ` Johannes Schindelin
2008-08-12 8:28 ` Thiemo Seufer
2 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2008-08-11 13:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Paul Brook
Gerd Hoffmann wrote:
> Hi,
>
> Quick question: Is it ok to use gcc-specific features in qemu? Or will
> that break builds on some platform?
>
> Linux obviously is gcc, MacOS X too as far I know. MinGW on Windows is
> gcc too. Anything else we care about?
>
> I'm thinking especially about the constructor attribute. That would
> allow to make drivers self-contained, by having a register() call in a
> small constructor function ...
>
You'll have to post a patch. I had discussed using GCC-isms to do the
same thing with Paul Brook and at the time, he was not a big fan of it IIRC.
Regards,
Anthony Liguori
> cheers,
> Gerd
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] gccism's are ok?
2008-08-11 13:53 ` Anthony Liguori
@ 2008-08-11 14:15 ` Johannes Schindelin
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2008-08-11 14:15 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Paul Brook
Hi,
On Mon, 11 Aug 2008, Anthony Liguori wrote:
> Gerd Hoffmann wrote:
>
> > Quick question: Is it ok to use gcc-specific features in qemu? Or
> > will that break builds on some platform?
> >
> > Linux obviously is gcc, MacOS X too as far I know. MinGW on Windows
> > is gcc too. Anything else we care about?
> >
> > I'm thinking especially about the constructor attribute. That would
> > allow to make drivers self-contained, by having a register() call in a
> > small constructor function ...
> >
>
> You'll have to post a patch. I had discussed using GCC-isms to do the
> same thing with Paul Brook and at the time, he was not a big fan of it
> IIRC.
Concretely for the suggestion to replace the nice, deterministic and
straight-forward registering of drivers with a gcc dependent, unintuitive
and hard to debug solution, I maintain that it is not a good idea,
and this has nothing to do with the usage of a gccism.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] gccism's are ok?
2008-08-11 13:24 [Qemu-devel] gccism's are ok? Gerd Hoffmann
2008-08-11 13:38 ` Glauber Costa
2008-08-11 13:53 ` Anthony Liguori
@ 2008-08-12 8:28 ` Thiemo Seufer
2 siblings, 0 replies; 5+ messages in thread
From: Thiemo Seufer @ 2008-08-12 8:28 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
Gerd Hoffmann wrote:
> Hi,
>
> Quick question: Is it ok to use gcc-specific features in qemu? Or will
> that break builds on some platform?
>
> Linux obviously is gcc, MacOS X too as far I know. MinGW on Windows is
> gcc too. Anything else we care about?
The dyngen targets still require gcc3 to build, OTOH making qemu more
portable is valuable. I believe the policy should be "avoid compiler
extensions unless it is hard to do without".
> I'm thinking especially about the constructor attribute. That would
> allow to make drivers self-contained, by having a register() call in a
> small constructor function ...
This idea is IMHO of dubious value. It obfuscates the control flow, and
it wouldn't work for a plugin system (where self-containedness would be
the biggest win).
Thiemo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-12 8:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-11 13:24 [Qemu-devel] gccism's are ok? Gerd Hoffmann
2008-08-11 13:38 ` Glauber Costa
2008-08-11 13:53 ` Anthony Liguori
2008-08-11 14:15 ` Johannes Schindelin
2008-08-12 8:28 ` Thiemo Seufer
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 NNTP newsgroup(s).