Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: reckless on April 16, 2012, 02:20:52 pm

Title: Ok for trunk ?
Post by: reckless on April 16, 2012, 02:20:52 pm
I worked over detection of the mingw64 compiler and have it working now.
Both the 32 and 64 bit versions are now detected and selectable from codeblocks on first run (didnt touch the old mingw autodetection routine).
Also added core i7 to to the -march option for optimizing for this (supported by gcc-4.6.x and up).
Ok for trunk ?.
Title: Re: Ok for trunk ?
Post by: MortenMacFly on April 16, 2012, 02:28:30 pm
Ok for trunk ?.
Dunno if you don't provide patches. ::)
Title: Re: Ok for trunk ?
Post by: ollydbg on April 16, 2012, 02:39:32 pm
Ok for trunk ?.
Dunno if you don't provide patches. ::)
reckless has supply the patches several months ago. (In our forum)
Title: Re: Ok for trunk ?
Post by: oBFusCATed on April 16, 2012, 04:38:18 pm
Link or it didn't happen...
Title: Re: Ok for trunk ?
Post by: MortenMacFly on April 16, 2012, 04:55:43 pm
reckless has supply the patches several months ago. (In our forum)
Link or it didn't happen...
In fact searching does't reveal a patch, too for me.

Please: ALWAYS if you start a (new) topic concerning a patch, either provide a link to the patch, the patch tracker (ID) or simply attach the patch. ::)
Title: Re: Ok for trunk ?
Post by: xunxun on April 16, 2012, 05:51:05 pm
I think the patch refers to the link:
http://forums.codeblocks.org/index.php/topic,14942.msg100987.html#msg100987
Title: Re: Ok for trunk ?
Post by: reckless on April 16, 2012, 06:12:23 pm
Aye that was the old one i refined several things since then.
Ill make a diff against trunk and post it here.
Or if you prefer a link to the patch ?.
Title: Re: Ok for trunk ?
Post by: reckless on April 16, 2012, 08:15:39 pm
Hmm svn diff is buggering a bit about it luckily only on the last file so check if it writes it correctly.

link to patch http://code.google.com/p/realm/downloads/detail?name=cb-mingw64-trunk.diff&can=2&q= (http://code.google.com/p/realm/downloads/detail?name=cb-mingw64-trunk.diff&can=2&q=)

I removed all x86 cpu optimisation switches from the 64bit only version (does not make much sense to optimize for a cpu that cannot run 64 bit code anyway).
Added corei7 optimization switch (supported by gcc-4.6.0 and later).
Changed default make to winmake instead of mingw32-make (actually mingw64 uses gmake but i hope they will adopt this).
Minor bugger i hope someone else can fix. Autodetect cannot find gdb (weird one as it uses the same name as on mingw) easy to fix though just point it to gdb.exe in mingw32/bin or mingw64/bin but better to fix the code.
All else works it seems.
Title: Re: Ok for trunk ?
Post by: MortenMacFly on April 17, 2012, 08:58:52 am
link to patch http://code.google.com/p/realm/downloads/detail?name=cb-mingw64-trunk.diff&can=2&q= (http://code.google.com/p/realm/downloads/detail?name=cb-mingw64-trunk.diff&can=2&q=)
Sorry to say that, but this patch is rather useless, too. Most of the changes is white-space stuff, so actually no functional change. There is an option in SVN to ignore white-space changes. You should always turn that on when creating patches or (even simpler) do not do white-space changes.

Edit1: It frightens me to death to see that the MSVC project loader has been touched when implementing support for MinGW?! ??? ??? ???

Edit2: Also, why having two classes (MinGW32, MinGW64), when MinGW32 = MinGW64 + additional params? Thats no good style. You should make the additional parameters become an option and merge the classes.
Title: Re: Ok for trunk ?
Post by: reckless on April 17, 2012, 12:27:47 pm
Mostly done this way to not confuse myself to much im no c++ shark but yeah that would have been the cleaner way.
Hmm was not aware of that option in svn ill check it out.
The msvc changes was to allow importing projects from msvc to mingw64 but i may have gone a bit overboard it seems to work though.
Title: Re: Ok for trunk ?
Post by: reckless on April 17, 2012, 02:08:34 pm
Ok the whitspace switch fixed things, still had some trouble with inconsistent line endings but got them fixed with unix2dos and svn could make the full diff after.
http://sourceforge.net/projects/cbadvanced/files/cb-mingw64-trunk.diff/download (http://sourceforge.net/projects/cbadvanced/files/cb-mingw64-trunk.diff/download)
Might not be exactly how the C::B guys want but feel free to use it as a base for a better patch.
Atleast i hope it will come in handy even if its not the most brilliant piece of work this side of eternity  :P