GCC: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
m (spelling)
(fixed some capitalisation, expounded upon the Win32 ports area, updated the 'latest version', and linked to the architecture pages (for future expansion))
Line 1: Line 1:
The GNU Compiler Collection (GCC) is a toolkit for compiling and assembling programs for a wide variety of platforms and languages. It is one of the core utilities in the Free Software Foundation's GNU Project.
The GNU Compiler Collection (GCC) is a toolkit for compiling and assembling programs for a wide variety of platforms and languages. It is one of the core utilities in the Free Software Foundation's GNU Project.


While it is most closely associated with C and C++, it is in fact a suite of several compilers and their libraries. The newest version of GCC is version 4.1.1 which includes support for ANSI and K&R C, Objective-C, C++, Java, Fortran and Ada.
While it is most closely associated with C and C++, it is in fact a suite of several compilers and their libraries. The newest version of GCC is version 4.3.0 which includes support for ANSI and K&R C, Objective-C, C++, Java, Fortran and Ada.


GCC is strongly supported on POSIX compliant platforms but has also been ported to other operating systems such as Windows. GCC also includes support for targeting many different CPU architectures including [[X86]], [[X86-64]], IA64, alpha, sparc, mips, powerpc and arm.
GCC is strongly supported on POSIX compliant platforms but has also been ported to other operating systems such as Windows. GCC also includes support for targeting many different CPU architectures including [[X86]], [[X86-64]], [[IA-64]], [[Alpha]], [[SPARC]], [[MIPS]], [[PowerPC]], and [[ARM]].


==OS Development with GCC==
== OS Development with GCC ==
Although other compilers can be used for OS development, OS developers are encouraged to use one of GCC derivatives. It comes installed by default on virtually every Unix system and has been ported to Windows.


* [[DJGPP]] is a port of GCC to DOS and can be used under Windows. Using DJGPP is discouraged.
Although other compilers can be used for OS development, OS developers are encouraged to use one of GCC derivatives. It comes installed by default on virtually every Unix system and good ports exist for Windows too.
* [[MinGW]] is a port of GCC to Windows. It does a good job for Win32 applications, but is not suitable for OS development.

* [[DJGPP]] is old and obsolete under windows. Don't use it.
* [[MinGW]] does a good job for win32 applications, however, it isn't suitable for OS development.
* [[Cygwin]] is ''the'' choice for OS development under Windows.
* [[Cygwin]] is ''the'' choice for OS development under Windows.


Finally, it is recommended to set up a [[GCC Cross-Compiler|cross-compilation environment]] in order to avoid possible problems. (Note: On Windows, a cross-compiler can only be built in the Cygwin environment).
Finally, it is recommended to set up a [[GCC Cross-Compiler|cross-compilation environment]] in order to avoid possible problems. (Note: On Windows, a cross-compiler can only be built in the Cygwin environment.)


==See Also==
== See Also ==
===Articles===
=== Articles ===
*[[Tool Comparison]]
* [[Tool Comparison]]
*[[Wikipedia:GNU Compiler Collection|GNU Compiler Collection]] - Wikipedia
* [[Wikipedia:GNU Compiler Collection|GNU Compiler Collection]] - Wikipedia
===External Links===
=== External Links ===
*[http://gcc.gnu.org/ GCC Home Page]
* [http://gcc.gnu.org/ GCC Homepage]
*[http://www.fsf.org/ Free Software Foundation]
* [http://www.fsf.org/ Free Software Foundation]


[[Category:Compilers]]
[[Category:Compilers]]

Revision as of 07:20, 30 March 2008

The GNU Compiler Collection (GCC) is a toolkit for compiling and assembling programs for a wide variety of platforms and languages. It is one of the core utilities in the Free Software Foundation's GNU Project.

While it is most closely associated with C and C++, it is in fact a suite of several compilers and their libraries. The newest version of GCC is version 4.3.0 which includes support for ANSI and K&R C, Objective-C, C++, Java, Fortran and Ada.

GCC is strongly supported on POSIX compliant platforms but has also been ported to other operating systems such as Windows. GCC also includes support for targeting many different CPU architectures including X86, X86-64, IA-64, Alpha, SPARC, MIPS, PowerPC, and ARM.

OS Development with GCC

Although other compilers can be used for OS development, OS developers are encouraged to use one of GCC derivatives. It comes installed by default on virtually every Unix system and has been ported to Windows.

  • DJGPP is a port of GCC to DOS and can be used under Windows. Using DJGPP is discouraged.
  • MinGW is a port of GCC to Windows. It does a good job for Win32 applications, but is not suitable for OS development.
  • Cygwin is the choice for OS development under Windows.

Finally, it is recommended to set up a cross-compilation environment in order to avoid possible problems. (Note: On Windows, a cross-compiler can only be built in the Cygwin environment.)

See Also

Articles

External Links