Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: Ptomaine on October 19, 2005, 10:23:06 am

Title: Intel C++ Compiler Support
Post by: Ptomaine on October 19, 2005, 10:23:06 am
Wanna ask for the Intel C++ support. I think this compiler is worth to support 'cause it's gonna be one of the standard compilers under MacOSX for Intel platforms in March 2006. And just 'cause it's the greatest compiler I've ever tested, I suppose.
Title: Re: Intel C++ Compiler Support
Post by: Urxae on October 19, 2005, 11:30:43 am
I've never used it, but from what I've heard of it it basically emulates the VC++ command line on Windows, and the GCC command line on Linux.

So what you might want to try is this:

Hope this helps.
Title: Re: Intel C++ Compiler Support
Post by: polygon7 on October 19, 2005, 02:31:05 pm
Wanna ask for the Intel C++ support. I think this compiler is worth to support 'cause it's gonna be one of the standard compilers under MacOSX for Intel platforms in March 2006. And just 'cause it's the greatest compiler I've ever tested, I suppose.

Search C::B forum for "intel C++". Hint: Troubleshooting subforum.
Title: Re: Intel C++ Compiler Support
Post by: rickg22 on October 19, 2005, 05:43:25 pm
Perhaps this should go in the wiki or something...

Edit: Just added it. (21/Oct/05), however I still think it should go internally due to popular demand.
Title: Re: Intel C++ Compiler Support
Post by: Ptomaine on October 21, 2005, 09:21:07 pm
I've never used it, but from what I've heard of it it basically emulates the VC++ command line on Windows, and the GCC command line on Linux.

So what you might want to try is this:
  • Go to Settings -> Compiler.
  • Make a copy of the emulated compiler for your platform.
  • Rename it to "Intel C++" or similar.
  • Change the name and location of the binaries in the compiler settings to those of the Intel compiler.
  • Use it :D

Hope this helps.

You are absolutely wrong!
It supports features that none of the now-a-days-monster-compiler does! It generates code that about 10 times faster than the other compilers can produce.

It understands MS C++ compiler options and GCC for Linux. Namely, UNDERSTANDS and supports! It generates completely different, incredibly fast code for Intel processors.
It has its own command line options for optimization and code generation. It's hard to tune a project if an IDE has no support for them. That's why I create this forum thread.

I want to listen to the author's opinion who's writing the Code::Blocks now. Is it hard to implement the feature I ask?
You can download the Intel C++ compiler at Intel official site to test it and to read its documentation regarding its options.
Title: Re: Intel C++ Compiler Support
Post by: polygon7 on October 21, 2005, 10:49:11 pm
It has its own command line options for optimization and code generation. It's hard to tune a project if an IDE has no support for them. That's why I create this forum thread. (...) Is it hard to implement the feature I ask?

http://forums.codeblocks.org/index.php/topic,604.0.html
Title: Re: Intel C++ Compiler Support
Post by: Ptomaine on October 22, 2005, 12:35:25 am
Thank you good guy polygon7
Sorry, I didn't notice your previous hint  :?

Thanks again.


P.S. But I think Code::Blocks might support it natively  8)
Title: Re: Intel C++ Compiler Support
Post by: rickg22 on October 22, 2005, 01:06:54 am
I agree! This way we can get rid of the manual config. Stuff - after all, if we could manage to add other compilers, how hard will it be to clone one? I'm sure it will be easier to have ONE programmer to add it, than having to do tech support about 10 times :P

Now, If I only knew how to add the compilers internally...  :oops:
Title: Re: Intel C++ Compiler Support
Post by: mandrav on October 22, 2005, 09:19:41 am
I agree! This way we can get rid of the manual config. Stuff - after all, if we could manage to add other compilers, how hard will it be to clone one? I'm sure it will be easier to have ONE programmer to add it, than having to do tech support about 10 times :P

Now, If I only knew how to add the compilers internally...  :oops:

Rick's new task: add Intel compiler support  :P

For anyone interested, steps to add native support for the INTEL (or any other) compiler:
Title: Re: Intel C++ Compiler Support
Post by: Urxae on October 22, 2005, 10:51:58 am
For anyone interested, steps to add native support for the INTEL (or any other) compiler:
  • Copy compilerMSVC.(cpp|h) to compilerINTEL.(cpp|h). (in plugins/compilergcc).
  • Adjust contents of compilerINTEL.cpp to support the new compiler.
  • Add #include "compilerINTEL.h" in compiler.gcc
  • In compilergcc's constructor, where it says "// register built-in compilers", add "CompilerFactory::RegisterCompiler(new CompilerINTEL);"
  • Build.

In this case it would seem to be a bit more complicated as Intel C++ seems to accept different command-line parameters on Windows and Linux.
If it doesn't also have a "common" set of parameters that'll work on both (and represents the entire range of possible options the other ones do), supporting it on both platforms might be a bit more work than your average compiler. You might have to either use a lot of #ifdefs in the file, or even use separate files for the Windows and Linux version.
The last one may be preferable if remote developement (http://forums.codeblocks.org/index.php/topic,1119.0.html) support is planned as you could then have both versions on your system at the same time, one for your local OS and one for the remote OS.
Of course, I haven't really checked if the supported parameter sets are actually different or if they just swap out '/' (Windows) and '-' (Linux) prefixes when on the other platform. I'm not sure if it's even possible (are there any MSVC command-line parameters that mean something else to GCC?), but if the latter is the case a simple checkbox in the options would probably suffice. Should default to the setting for platform you're currently running, of course.
Title: Re: Intel C++ Compiler Support
Post by: rickg22 on October 22, 2005, 08:48:14 pm
Rick's new task: add Intel compiler support  :P

ACK! I don't know how! :( I've never touched that area of C::B yet :(
Title: Re: Intel C++ Compiler Support
Post by: yop on October 23, 2005, 04:39:16 pm
  • Copy compilerMSVC.(cpp|h) to compilerINTEL.(cpp|h). (in plugins/compilergcc).
  • Adjust contents of compilerINTEL.cpp to support the new compiler.
  • Add #include "compilerINTEL.h" in compiler.gcc
  • In compilergcc's constructor, where it says "// register built-in compilers", add "CompilerFactory::RegisterCompiler(new CompilerINTEL);"
  • Build.

Did the above (in linux to use icc) but I keep getting two sdcc entries instead of the new icc one I've created. The new files are just copies of the compilerMINGW with the path and the app files pointing to icc, because I just wanted to see how the new compiler will be added and then proceed with the rest (compiler options etc).
Title: Re: Intel C++ Compiler Support
Post by: mandrav on October 23, 2005, 05:42:56 pm
Try renaming "~/.Code::Blocks v1.0" to something else. Maybe your configuration is somehow screwed.
Or, run a 'cvs diff > diff.txt' and attach it here to see what's wrong.
Title: Re: Intel C++ Compiler Support
Post by: yop on October 26, 2005, 10:28:15 pm
I got it to show up :D. I uninstalled c::b completely removed everything from my home directory got a fresh cvs version added to the copilergcc Makefile.am my new files added the new compiler to the compilergcc.cpp and I built, installed run and then built my projects with Intel's ICC  :D. I'll do some work with the compiler options and submit a patch for the ICC (Linux - non commercial, don't know what the deal is with the windows version). Since I'll get involved in this could someone point out some reading material for regular expressions cause my guess is that I'll need them :wink:
Title: Re: Intel C++ Compiler Support
Post by: rickg22 on October 26, 2005, 11:01:36 pm
By the way, I was thinking... that file is created by the wxConfigBase, right?

Why not add (in future versions) an #ifdef that changes the name of the configuration entry so that it's something else on linux, like "codeblocks.1.0.conf" ? :)
Title: Re: Intel C++ Compiler Support
Post by: yop on October 28, 2005, 10:51:40 pm
Well I just finished with the addition of ICC for Linux and submited a patch. Hope you enjoy  :)
Title: Re: Intel C++ Compiler Support
Post by: yop on October 29, 2005, 11:35:05 am
I was too tired last night (testing is not my favourite thing when coding and it took me almost 8 hours of testing to be sure) to give more info on the new compiler support.
Compiler info can be found at: http://www.intel.com/cd/software/products/asmo-na/eng/compilers/clin/219902.htm
Download from: http://www.intel.com/cd/software/products/asmo-na/eng/compilers/clin/219771.htm.
What it does: All the known features you have with the rest of the compilers supported by codeblocks, are supported for icc as well.
What it doesn't do: Well... compile for Windows  :(. If you'd like this feature added I'll need someone who owns the windows version of the compiler to do some testing and provide me with the auto detection info. Note that there is no ditribution of icc for open software developers for Windows, just a commercial one (oh god how I love linux :D).
That's all folks I'm looking forward to some feedback

Edit: Oops I should have edited my previous post, didn't see that there were no replies  :oops:
Title: Re: Intel C++ Compiler Support
Post by: mandrav on October 29, 2005, 11:42:22 am
Thanks :)
Title: Re: Intel C++ Compiler Support
Post by: yop on October 30, 2005, 11:04:04 pm
Made some minor changes to the patch and submited. I can't think of anything else, if someone eventually uses the new compiler support I am open to any suggestions  :)
Title: Re: Intel C++ Compiler Support
Post by: yop on November 06, 2005, 07:05:47 pm
In patch #1341049 I have also added support for the windows version of the compiler, I used the evaluation version of the compiler.
Title: Re: Intel C++ Compiler Support
Post by: killerbot on December 01, 2005, 02:18:51 pm
gonna try it out. Just downloaded ICC, but the eveluation does not loast long (end of this year).

There's no option to use the freely (like m$ and borland) ???

Lieven
Title: Re: Intel C++ Compiler Support
Post by: yop on December 01, 2005, 03:01:29 pm
Nope. You can get the linux version for free just for open source development
Title: Re: Intel C++ Compiler Support
Post by: rickg22 on December 01, 2005, 04:37:31 pm
But we're doing open source development. We're not using ICC DIRECTLY to build an open source project, but we're certainly using it to beta-test an open source project ;-) Will this loophole work?
Title: Re: Intel C++ Compiler Support
Post by: killerbot on December 01, 2005, 04:54:56 pm
and the windows version !! must also fit in that loophole
Title: Re: Intel C++ Compiler Support
Post by: yop on December 01, 2005, 09:12:24 pm
But we're doing open source development. We're not using ICC DIRECTLY to build an open source project, but we're certainly using it to beta-test an open source project ;-) Will this loophole work?
and the windows version !! must also fit in that loophole
You lost me  :? What are you talking about? I replied that there is no free version for windows only a commercial one, that you can evaluate for 30 days (that's the one I used to add the windows support for the compiler and has now expired). For linux Intel provides a free version that should be used for open source development (and yes cb is open source). Apart from that there is also a commercial edition for linux. Supporting (not using or providing) a tool even a proprietary one in an open source project is tottaly legal and apart from that I think that even at Intel they'd be happy to know that a very promising open source project supports their product ;).
Title: Re: Intel C++ Compiler Support
Post by: rickg22 on December 01, 2005, 09:16:54 pm
Perhaps we should mail them...
Title: Re: Intel C++ Compiler Support
Post by: yop on December 01, 2005, 09:21:23 pm
Don't really know how this works. In my windows box I have the OEM windows xp that came with it and apart from that only open source software. On my linux box I don't have to worry about licences ;) You probably know better :)