LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-23-2003, 11:35 AM   #1
deepsix
Member
 
Registered: Apr 2003
Distribution: ANY
Posts: 339

Rep: Reputation: 32
Question about GCC 3.2.2 and 2.95


I'm running redhat 9 with gcc 3.2.2 along with the backwards compatibility back to gcc 2.96
I found a driver I need to install that requires gcc 2.95
If I install and older version of gcc say 2.95 then will there be compatibilty issues with 3.2.2?
 
Old 05-23-2003, 12:15 PM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
nope, I've got 2.95, 3.0, 3.2 and 3.3 living together,
just make sure the gcc symlink points to the one you want to use.
 
Old 05-23-2003, 04:24 PM   #3
deepsix
Member
 
Registered: Apr 2003
Distribution: ANY
Posts: 339

Original Poster
Rep: Reputation: 32
sweet thanks alot iceman.........
take it easy
 
Old 06-04-2003, 02:36 AM   #4
realos
Member
 
Registered: Jul 2002
Location: Germany
Distribution: Redhat 7.3, Debian 3.1, Knoppix 3.1, Ubuntu 6.10
Posts: 113

Rep: Reputation: 15
Question

iceman47 ,

Just being curious, what is your strategy for doing this. I mean did you choose different directories for each one of them and then made gcc link in each to the respective gcc version, like:

ln -sf /directory/for/gcc-3/bin/gcc-3.0 /directory/for/gcc-3/bin/gcc
ls -sf /directory/for/gcc-2.95/bin/gcc-2.95 /directory/for/gcc-2.95/bin/gcc
ls -sf /directory/for/gcc-2.95/bin/gcc-3.02 /directory/for/gcc-3.02/bin/gcc

do you change your path each time you want to change the gcc version?

Last edited by realos; 06-04-2003 at 02:37 AM.
 
Old 06-04-2003, 04:12 PM   #5
devin
LQ Newbie
 
Registered: Apr 2003
Posts: 14

Rep: Reputation: 0
gcc should point to the one you use more often..

then what you could do is this:
cd /usr/bin
ln -s /path/to/gcc-2.95/bin/gcc gcc2

then whenever you want to compile something with
gcc 2.95 change the make file from gcc to gcc2
 
Old 06-05-2003, 03:03 PM   #6
deepsix
Member
 
Registered: Apr 2003
Distribution: ANY
Posts: 339

Original Poster
Rep: Reputation: 32
maybe someone could make a script for this......hmm

Quote:
Originally posted by devin
gcc should point to the one you use more often..

then what you could do is this:
cd /usr/bin
ln -s /path/to/gcc-2.95/bin/gcc gcc2

then whenever you want to compile something with
gcc 2.95 change the make file from gcc to gcc2

any thoughts?
 
Old 07-29-2003, 02:41 PM   #7
realos
Member
 
Registered: Jul 2002
Location: Germany
Distribution: Redhat 7.3, Debian 3.1, Knoppix 3.1, Ubuntu 6.10
Posts: 113

Rep: Reputation: 15
@devin: your answer sounds very reasonable.
Thankx for sharing ideas. I will try it out.
 
Old 07-29-2003, 03:32 PM   #8
devin
LQ Newbie
 
Registered: Apr 2003
Posts: 14

Rep: Reputation: 0
I believe it should work since CC ususally points to gcc on Linux systems but on Unix systems CC may point to the companies own proprietary compiler.
 
Old 07-29-2003, 04:14 PM   #9
TheLinuxDuck
Member
 
Registered: Sep 2002
Location: Tulsa, OK
Distribution: Slack, baby!
Posts: 349

Rep: Reputation: 33
Wouldn't it be easier to modify the env var CC to reflect the name of the compiler to use, instead of changing symlinks? IIRC, you can pass CC=gcc3.0.2 (or the like) to ./configure, or even just create a simple makefile for the project to compile, and put the correct compiler name.

Maybe I'm just oversymplifying it. I've never dealt with multiple compiler versions on a system.
 
Old 07-30-2003, 02:54 AM   #10
DIYLinux
Member
 
Registered: Jul 2003
Location: NL
Distribution: My own
Posts: 92

Rep: Reputation: 18
Dump gcc 2.96. This is an unofficial version, and seems to be causing a lot of problems with C++. I saw two posts to that effect on this forum in the last couple of days.

If you need gcc-2.xx (typically for some kernel/module work on older kernels), use gcc-2.95.2 or gcc-2.95.3.

Use gcc-3.x.x if you are doing C++. It features many improvements in modern C++ features and its optimizer is superior.
 
  


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
Question about gcc thorney Linux - Newbie 4 11-25-2005 03:47 PM
gcc question ?????? jmax24 Programming 7 04-24-2004 07:36 PM
gcc question. philPA Slackware 2 05-22-2003 08:19 AM
gcc question 0micron Linux - Software 4 02-19-2003 03:02 AM
gcc question tyler_durden Programming 1 01-14-2002 02:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:55 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