LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-20-2006, 10:10 AM   #1
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
check gcc -v within script


Greets all. I'm making a gcc build script and I would like to do a gcc -v and grep for the version number so I know whether or not a bootstrap needs to happen. What's the best way to go about this? I can't even seem to output gcc -v to a text file to grep from that. I'm sure it can all be done without a text file in the first place.

Any help would be most welcome. Thanks much.
 
Old 01-20-2006, 10:37 AM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
hi,

so, IIUC, you need the version of the compiler you're gonna use to compile gcc.
in that case you can use " gcc -dumpversion ".

egag
 
Old 01-20-2006, 10:56 AM   #3
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Original Poster
Rep: Reputation: 52
Too funny. Thanks egag... For some reason, I was under the impression that -dumpversion would spit your spec file out. Guess I was thinking of -dumpspecs

Thanks again. That's exactally what I wanted with no grep involved. Makes life easy. Next time I'll try to ask gcc for --help instead of you..

Last edited by jong357; 01-20-2006 at 10:59 AM.
 
  


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
LFS 6.0 problem: GCC check err. alinsoar Linux From Scratch 11 06-03-2005 05:37 AM
gcc check error (in chapter 6) alinsoar Linux From Scratch 0 05-23-2005 04:58 AM
gcc-3.3.1 make -k check - make [check] Error 2 BarryM45 Linux From Scratch 1 02-05-2004 08:44 AM
check glibc version used by gcc carboncopy Slackware 3 08-12-2003 05:24 AM
gcc make check results BeauMN Linux From Scratch 5 05-01-2003 02:45 AM

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

All times are GMT -5. The time now is 03:02 AM.

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