LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-17-2013, 08:44 AM   #1
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
gcc compiler


I am trying to first attempt at compiling a gcc compiler without having a tutorial walk me through it. I plan to install it to /usr/local and leave the distro's compiler alone.

I'm doing this partially for the experience of doing it, but also because the distro I have been playing with "Fuduntu" doesn't seem to have g++ built in to it.

I've compiled gcc before but only following the LFS tutorial. The install manual is helpful but I'm looking more for experience to answer a few question.

1. Since I am installing this on the native machine should I just install dependencies such as m4,gmp,mpfr, and then install the compiler. Or should I just unpack them and specify arguments like
Code:
--with-m4 ../m4
2. I am still green to programming and want to make sure I build in everything I need. I primarily use C and C++. I don't think I'll be using fortran any time soon. This is a 64bit system but I would like to build it multi-arch so I can compile amd_64 as well as x86. I also have a raspberry pi "ARM" and would like to be able to compile this kernels on this system. Is there any optimization I should make for this?

3. Mostly for pedagogical purposes I would like to build this compiler well. I have been told the best way to ensure an error free build is to compile it a second time with itself. Is this recommended? Any suggestions on doing it? Both compilations would be done before installing it right?

4. Is this a good idea? having two compilers installed. It just seemed like leaving the one in /usr/bin alone, at least until I know my new compiler works well, would be a good idea

Sorry about all the questions.
 
Old 01-17-2013, 09:03 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Fuduntu is Fedora based, and I guess it includes the 'yum' package tool.

? Did you try : yum provides */g++
The reply is usually 'gcc-c++'.
Installing "g++" : # yum install gcc-c++


You can have as many versions as you want, installed at the same time.
To be configured with the option --program-suffix=<?> ,
e.g. --program-suffix=44 for a gcc-4.4.6 (providing gcc44, g++44)
and --program-suffix=47 for a gcc-4.7.x (providing gcc47, g++47).

-
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [Question] How to compile a gcc compiler for another machine which got no c compiler on it shone27 Linux - Newbie 9 09-28-2011 07:32 PM
LXer: Compiler Benchmarks Of GCC, LLVM-GCC, DragonEgg, Clang LXer Syndicated Linux News 0 11-08-2010 05:11 PM
GCC compiler help!! LinuxNewbie999 Linux - Newbie 12 11-03-2006 12:03 AM
GCC compiler? Forezt Linux - Newbie 2 11-23-2003 02:07 PM
GCC compiler...? ph0tik Linux - Newbie 4 04-22-2003 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration