Rajat Jain wrote:
1- The compiler is capable of importing standard make files .. but i
think that the kernel use something called "KBUILD system" so is
considered as a standard Makefile?
2- I've noticed that the top Makefile for the kernel will look for a
some utilities "like shell for example" will it work without a shell or
one of those utilities?
3- is the source of the kernel written without any GNU C extensions .. i
mean will it compile with C99 standard ?
4- The Makefiles has been written for the gcc compiler and and compiler
options .. so is there any compiler option that is needed and that
doesn't to be existed for another compilers?
5- is this compilation is impossible cause it'll be done on a windows
platform or cause i'll use a compiler other than gcc?
6- if it was the mater of the environment only .. can cygwin help in
this case ? remember that i have to invoke a windows application
"compiler" from cygwin
after googling i couldn't get any pointer cause it seems very odd and
strange (if not impossible) to compile the linux kernel using a compiler
other than gcc and on a window platform .. so thanks for anypointers
MHD.Tayseer
Hi,
I did some thing like this once. I compiled the kernel with a
proprietary compiler. But the architecture already had a kernel port
(ARM architecture). So my task was just to build & boot using a
propritary compiler. The compiler lacked some gcc extentions, so had
to look for work arounds. The kernel source uses a lot of gcc
extensions. Some of them were available in the compiler I used, using
a different syntax. For others, I had to change Linux code. Yes, I
used cygwin and it helped a lot.
Thanks & Best Regards,
Rajat Jain
Hi
well .. the "unraliable guide to kernel hacking" sais that there are the
following gnu extentions in the linux kernel:
*
Inline functions
*
Statement expressions (ie. the ({ and }) constructs).
*
Declaring attributes of a function / variable / type (__attribute__)
*
Labeled elements
*
typeof
*
Zero length arrays
*
Macro varargs
*
Arithmetic on void pointers
*
Non-Constant initializers
*
Assembler Instructions (not outside arch/ and include/asm/)
*
Function names as strings (__FUNCTION__)
*
__builtin_constant_p()
is there more/less of those extensions now ? the document mentioned
above is dated 2000 and i think life has changed so much inside the
linux kernel since then...
another question .. is there a known work around of those extensions to
turn them into Ansi C?, or such an extensions are hard to be done under
ansi C .. i mean that it may be trivial to move a declaration or an
expression two or three lines before .. is it trivial as text/syntax
modifications or there are extensions that are based on a special gcc logic?
and if i wanna use cygwin .. i know that this question may now be asked
here but can i call windows executable (the compiler in my case) from
cygwin without recompiling/modifying it ?
Thank
MHD.Tayseer
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/