Author Topic: Ok for trunk ?  (Read 5348 times)

Offline reckless

  • Regular
  • ***
  • Posts: 338
Ok for trunk ?
« 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 ?.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Ok for trunk ?
« Reply #1 on: April 16, 2012, 02:28:30 pm »
Ok for trunk ?.
Dunno if you don't provide patches. ::)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Ok for trunk ?
« Reply #2 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)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Ok for trunk ?
« Reply #3 on: April 16, 2012, 04:38:18 pm »
Link or it didn't happen...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Ok for trunk ?
« Reply #4 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. ::)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Ok for trunk ?
« Reply #5 on: April 16, 2012, 05:51:05 pm »
Regards,
xunxun

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: Ok for trunk ?
« Reply #6 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 ?.

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: Ok for trunk ?
« Reply #7 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=

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.
« Last Edit: April 16, 2012, 08:24:54 pm by reckless »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Ok for trunk ?
« Reply #8 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=
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.
« Last Edit: April 17, 2012, 09:03:44 am by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: Ok for trunk ?
« Reply #9 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.

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: Ok for trunk ?
« Reply #10 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
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