LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Building GCC 4.6.3 from Source Code on Linux (https://www.linuxquestions.org/questions/linux-newbie-8/building-gcc-4-6-3-from-source-code-on-linux-4175415262/)

gaurav.rustagi 07-06-2012 11:42 AM

Building GCC 4.6.3 from Source Code on Linux
 
Hi Guys,

I am trying to build gcc compiler with the required options enabled on Linux 64 machine. I need gcc to be complied with 64 bit machine so that i can compile C and C++ program in both the modes (with 32 and 64 machine). I know there are many gcc rpm which are already available, however, i want to understand how can we build gcc compiler on our own.

May be some day i' ll have to build it on Solaris or other platform.

Could you please tell me some links or document which would be helpful to get started ?

Below, i have mentioned machine configuration.

$ uname -a
Linux HOSTNAME 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

Thanks,

Kustom42 07-06-2012 11:49 AM

http://www-numi.fnal.gov/offline_sof...stall_gcc.html

BAM!

---------- Post added 07-06-12 at 09:49 AM ----------

Steps are correct but GCC is newer version than the link in that article. Get your tarball from: gcc.gnu.org/releases.html

knudfl 07-06-2012 12:59 PM

# 2 : The latest versions of gcc ( from gcc-4.3 ? )
have a completely different build method than the example gcc-3.2.


# 1 : Example gcc-4.7 : The procedure is valid for 4.6.x too ..
http://nosemaj.org/debian-gcc-4-7

.

Kustom42 07-06-2012 01:00 PM

I wasn't aware the method had changed, I guess I need to update my bookmarks as that one is really old. Thanks for the follow up knudfl

gaurav.rustagi 07-08-2012 03:54 PM

Thanks guys.. I will check the links and will try to build gcc on Linux. Although, my final aim is to build the gcc on Solaris machine.

Cheers :)

chrism01 07-09-2012 07:16 PM

You do know you can get that as a Solaris pkg?

gaurav.rustagi 07-10-2012 01:46 AM

Quote:

Originally Posted by chrism01 (Post 4723400)
You do know you can get that as a Solaris pkg?

Could you help me with some links where i can get the complete gcc pkg for Solaris ?

Actually, I am struggling to run some shared library on Solaris with the current gcc 3.4.6 installed on the machine.

It fails during the run time saying "_cxaatexit" symbol are not found. When i do gcc -v, i can see that the cxaatexit has not been enabled while building this gcc. Therefore, I am trying to build latest gcc, hoping that everything would fall in place.


All times are GMT -5. The time now is 07:34 AM.