gccism's are ok?
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
Signature · 1 line
http://kraxel.fedorapeople.org/xenner/
Quoted 11 lines · Gerd Hoffmann
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.
Quoted 9 lines
cheers,
Gerd
Signature · 5 lines
Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."
Quoted 5 lines · Gerd Hoffmann
Hi,
Quick question: Is it ok to use gcc-specific features in qemu? Or will that break builds on some platform?
Quoted 7 lines
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
Quoted 4 lines
cheers,
Gerd
Hi,
Quoted 8 lines · Anthony Liguori
Quoted 6 lines · Gerd Hoffmann
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?
Quoted 8 lines
Quoted 4 lines
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
Quoted 7 lines · Gerd Hoffmann
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".
Quoted 3 lines
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