Skip to contentSkip to conversation

Why only Linux uses GCC to compile the source code. please help

DISCUSSION Mahadev K Cholachagudda 2 participants 2 messages Jan 24, 2001

lore
Share & tools
lore
#0 lore raw

Hi to all,

Please include ****mailto:[email protected] ***** in the reply list ******as i am not a member of the list******.

After i am going through the some part of the linux code, i wrote the following. Please review it and if you have any additions/modifications or comments please let me know.

Your help is really needed.

Thanks for any help,

Mahadev K Cholachagudda

The document is as below.

Introduction:

This document describes about the features of gcc which are very much necessary to compile the Linux and also about the features that an 'x' compiler does not have if used to compile the Linux.

Details:

1. The GCC has an explicit inline declaration for functions. So this option may enable the calling function to have the contents of some global variables in particular register.

2. The GCC has an support for inline assembly with 'C' expression operands which can be used in 'C' functions.

3. The GCC has a support for including the 'C' header files into the assembly source files.

The problems if one uses 'x' compiler other than GCC.
=====================================================

1. He/she may not get the features of GCC listed above into the 'x' compiler.

2. The Linux kernel mainly uses GCC. If the Linux kernel is made to compile using 'x' compiler other than GCC, then code updation will take time for 'x' compiler if a newer version or patch of Linux released.

3. The Linux code may have some code which is purely based upon the data types e.g. for one processor the unsigned long may be 32 bits or 16 bits.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 9 lines · Mahadev K Cholachagudda

The problems if one uses 'x' compiler other than GCC.
=====================================================

1. He/she may not get the features of GCC listed above into the 'x' compiler.

2. The Linux kernel mainly uses GCC. If the Linux kernel is made to compile using 'x' compiler other than GCC, then code updation will take time for 'x' compiler if a newer version or patch of Linux released.

I see no problems over here. Linux makes explicit use of GCC features, it was not meant to be compiled with a different compiler. Note that the Linux kernel is not a normal program, so we don't have to deal with compatibility. If you want to use another compiler to compile your
kernel: go ahead, but don't expect any help from this list.

Quoted 2 lines

3. The Linux code may have some code which is purely based upon the data types e.g. for one processor the unsigned long may be 32 bits or 16 bits.

That's what the __uXX/__sXX data types are for: to ensure that the data types are indeed XX bits long. See include/asm-*/types.h.

Erik

Signature · 9 lines
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: [email protected]
WWW: http://www-ict.its.tudelft.nl/~erik/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/