From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Stump To: egcs-bugs@egcs.cygnus.com, ja_uribe@hotmail.com Subject: Re: (?) Date: Tue, 09 May 2000 19:31:00 -0000 Message-id: <200005100231.TAA13575@kankakee.wrs.com> X-SW-Source: 2000-05/msg00335.html List-Id: > From: "juan uribe" > To: egcs-bugs@egcs.cygnus.com > Date: Tue, 09 May 2000 19:02:06 PDT > I plan to build the current gcc version but have one question. > What is the difference between native and cross compiler? A native compiler is a compiler that generates code for the same machine that one is running the compiler on. A Linux box that you also want to run compile code on, would be an example of a native compiler. A cross compiler, is when the system you want to run the software on isn't the one that you compile the software on. For example, you want to compile on Linux, but run on Windows, that would be a cross compiler. > What I really want is to be able to compile Fortran, c and c++, should I > just build a native compiler? Yes. >>From llewelly@dbritsch.dsl.xmission.com Tue May 09 19:32:00 2000 From: To: juan uribe Cc: egcs-bugs@egcs.cygnus.com Subject: Re: (?) Date: Tue, 09 May 2000 19:32:00 -0000 Message-id: References: <20000510020206.24134.qmail@hotmail.com> X-SW-Source: 2000-05/msg00336.html Content-length: 1591 On Tue, 9 May 2000, juan uribe wrote: > hello again. I am not sure if I am mailing to the right list so pardon me > far it. You are not. Please send questions about gcc to gcc-help@gcc.gnu.org . > > I plan to build the current gcc version but have one question. > > What is the difference between native and cross compiler? A native compiler produces binaries for the same platform it runs on. The compiler included in a typical linux distribution is an example. A cross compiler runs on one platform, but produces binaries for a different platform. An example might be a compiler that runs on an x86 linux box (i686-pc-linux-gnu, for example) which produces binaries for a sun sparc machine (sparc-sun-solaris2.7, for example.) > > What I really want is to be able to compile Fortran, c and c++, You can compile Fortran, C, or C++ with either a native compiler, or a cross compiler. (I think there are some host + target combinations that make the C++ frontend finicky, but I do not remember them.) If you need a cross compiler, please see http://www.objsw.com/CrossGCC/ in addition to http://gcc.gnu.org/install/index.html which you should read whichever kind of compiler you want. > should I > just build a native compiler? If you plan to run the binaries on the same type of machine you do your compiling on, you want a native compiler. Otherwise, you want a cross compiler. For example, if you will be compiling on i686-pc-linux-gnu, and you plan to run the resulting binaries on ix86-pc-linux-gnu, you want a native compiler. [snip]