-mms-bitfields revisited

Allen Winter winter at kde.org
Wed Jun 17 01:53:15 CEST 2009


On Tuesday 16 June 2009 3:01:58 am Till Adam wrote:
> Guys, ladies, questioning and/or transitioning folk and those who transcend 
> gender categories,
> 
> please find attached two patches, one against the cmake findkde4internl module 
> in kdelibs, one against kdesupport's top level CMakeLists.txt, which add the 
> use of -mms-bitfields to the C and CXX flags when building with/for mingw. The 
> need for them was brought to our attention by a nasty bug caused by 
> incompatible memory layouts between gpgme and gpgme++/qgpgme due to their 
> (gnupg's) use of this flag. They use it, because all of their depedencies have 
> it (notably gtk) and a somewhat in-depth google confirms that that seems to be 
> pretty standard practise, among those shipping for mingw. It basically tell 
> gcc to be msvc compatible, for C libs, if I understand correctly, and should 
> cause no harm, provided everything is built with it consistently. I guess it 
> makes sense for KDE to go with the majority opinion here. Ultimately I lack 
> insight and overview in this matter, though, so I'd like to hear your (kde-
> buildsystem's) opinions. I've asked on kde-windows before, and there seemed to 
> be no real opinion one way or the other there. CC-ing that list for maximum 
> coverage and transparency. :)
> 
> Let me know how I should proceed with this. This then leaves the question of 
> Qt. Nokians, any opinion on that? Is it maybe even already in there, the flag?
> 

I spoke to Till and Patrick about this in more detail today.

It does make sense to add this compile option into kdelibs'
FindKDE4Internal.cmake -- this will cause all follow-on KDE stuff
to be built with -mms-bitfields when using mingw.

However, it really doesn't do any good putting it in kdesupport/CMakeLists.txt,
mainly because emerge builds individual projects inside kdesupport and not a
top-level "build all of kdesupport at once".

We think it makes a lot more sense to put this compile option
into emerge such that it is used each time mingw is invoked.
Patrick is helping me with that -- and I am doing test builds.

I'll report back with the results of those tests.

Comments on this?

-Allen









More information about the Kde-buildsystem mailing list