Develop with Intel C++ Compiler
-
- Posts: 4
- Joined: Mon Nov 11, 2013 1:37 pm
Develop with Intel C++ Compiler
Hello all
I'm a newbie in OS development.
I would like to develop my OS with the Intel C++ Compiler but I have several questions.
How compile my kernel with the Intel compiler ?
Is there a cross compiling mode ?
Else what are the arguments to pass to the compiler ?
Thanks for answer
I'm a newbie in OS development.
I would like to develop my OS with the Intel C++ Compiler but I have several questions.
How compile my kernel with the Intel compiler ?
Is there a cross compiling mode ?
Else what are the arguments to pass to the compiler ?
Thanks for answer
Re: Develop with Intel C++ Compiler
I'd like to know your motivation for using the Intel C++ compiler, rather than one of the more suited compilers like GCC. I have a feeling some of your rationale might be misguided.
Re: Develop with Intel C++ Compiler
Which means the OP didn't ask the question you wanted to answer.sortie wrote:I'd like to know your motivation for using the Intel C++ compiler, rather than one of the more suited compilers like GCC. I have a feeling some of your rationale might be misguided.
If you can state that GCC is "more suited" then you know the answers to at least some of the OP's questions. Couldn't you please answer them? There's others interested in the answers as well.
Every universe of discourse has its logical structure --- S. K. Langer.
Re: Develop with Intel C++ Compiler
Compiler options are listed here: http://software.intel.com/sites/product ... r/cpp-lin/
Use /Gs with a high value to prevent calls to __chkstk. /Qfreestanding (Windows) or -ffreestanding (Linux) will prevent all standard library calls. For linking, you can use the same procedure as you would use for GCC. The object files are compatible with the GNU linker.
Use /Gs with a high value to prevent calls to __chkstk. /Qfreestanding (Windows) or -ffreestanding (Linux) will prevent all standard library calls. For linking, you can use the same procedure as you would use for GCC. The object files are compatible with the GNU linker.
-
- Posts: 4
- Joined: Mon Nov 11, 2013 1:37 pm
Re: Develop with Intel C++ Compiler
Thanks for the link and info.
But I have many question...
How to tell the compiler what platform (IA-32, Intel 64...) I am building for ?
/Gs and /Qfreestanding are the only parameter that I need ?
When using the compiler like this (with above flags), it is not cross-compiling, true ?
Are there the same problems that gcc when is not in "cross-compiling mode" ?
I am waiting for answer nd reading the intel compiler doc
Thanks for all
But I have many question...
How to tell the compiler what platform (IA-32, Intel 64...) I am building for ?
/Gs and /Qfreestanding are the only parameter that I need ?
When using the compiler like this (with above flags), it is not cross-compiling, true ?
Are there the same problems that gcc when is not in "cross-compiling mode" ?
I am waiting for answer nd reading the intel compiler doc
Thanks for all
Re: Develop with Intel C++ Compiler
I think you can safely assume that you are not cross-compiling whenever you use the Intel compiler - unless you do some magic. As far as I know, you can't rebuild the compiler and select another target, though perhaps there is some command line option for that. You can probably beat it into submission (like gcc) by passing a bunch of compile options to suppress the undesired behavior, though that's not really cross-compiling.
Unless you have a good reason for using this compiler, I'd recommend against using it because it's a dead end. Unless you have some deal with Intel, you can't retarget the compiler and teach it what your OS is and you can't port it to your OS. This will create an artificial barrier against going self-hosting, which is certainly something to avoid. The fact that the compiler is not free software also means you might make things harder for potential contributors.
Personally, I'd recommend using GCC for osdev work unless you have a good reason not to.
@bwat: Dude, what the ****? It's always important to understand someone’s motivation when you are trying to help them.
Unless you have a good reason for using this compiler, I'd recommend against using it because it's a dead end. Unless you have some deal with Intel, you can't retarget the compiler and teach it what your OS is and you can't port it to your OS. This will create an artificial barrier against going self-hosting, which is certainly something to avoid. The fact that the compiler is not free software also means you might make things harder for potential contributors.
Personally, I'd recommend using GCC for osdev work unless you have a good reason not to.
@bwat: Dude, what the ****? It's always important to understand someone’s motivation when you are trying to help them.
Re: Develop with Intel C++ Compiler
Without knowing the OP's motiviation, you managed to make a clear statement on the relative suitability of GCC and ICC, so it couldn't have been that important.sortie wrote: @bwat: Dude, what the ****? It's always important to understand someone’s motivation when you are trying to help them.
Every universe of discourse has its logical structure --- S. K. Langer.
-
- Posts: 4
- Joined: Mon Nov 11, 2013 1:37 pm
Re: Develop with Intel C++ Compiler
At the start, I wanted to use the intel compiler because I think that the intel compiler is the better optimised compiler regard the fact that intel know more than anyone their processors.
Also, I don't plan to make an Unix-like and I think that gcc is less or more linked with the "Unix world".
But, maybe is a bad thing to think that ?
But finally, after reflection, I think that I will use gcc.
Also, I don't plan to make an Unix-like and I think that gcc is less or more linked with the "Unix world".
But, maybe is a bad thing to think that ?
But finally, after reflection, I think that I will use gcc.
Re: Develop with Intel C++ Compiler
If you are willing to accept a minimal number of Unix-isms such as fork and execve and you implement a reasonable subset of the C API, then you can port older GCC versions to your OS. If you also support C++ in addition, then you can port newer GCC versions to your OS. It's actually not that hard to port, compared to other things. Indeed, if you go ahead and modify gcc more heavily, then you don't even need these Unix-isms.
-
- Posts: 4
- Joined: Mon Nov 11, 2013 1:37 pm
Re: Develop with Intel C++ Compiler
Thanks for all response
I will use gcc as compiler and I will port it to my OS later (if I arrive thus far )
I will use gcc as compiler and I will port it to my OS later (if I arrive thus far )