LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 09-26-2004, 03:14 PM   #1
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Rep: Reputation: 15
This' gonna sound stupid but... here it is... about GCC version...


Hi,

when, several weeks ago, I was testing Fedora Core 2, among my 7th LFS system, i noticed something... well... let's call it... 'particular'...

When I executed gcc --version I obtained the following output:

gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)

And my question is... how can this be? I mean... how can the people at Red Hat customize the gcc version output text? maybe it can be accomplished by diving into the gcc source code and changing some line of code for the --version argument?

I know all of this sounds stupid... or at least... well... it's non-critical for me, but it would be great to be able to customize the gcc version output, from a 'eye-candy' perspective, of course

Any idea on how to be able to change the output?

Thanks in advance,

Julio
 
Old 09-26-2004, 03:48 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Mine says:
Code:
$ gcc --version
gcc (GCC) 3.4.2 20040907 (Red Hat 3.4.2-2)
I think it means that I am running GCC version 3.4.20040907 (the September version), but the RH versioning is 3.4.2-2. Nothing to be worried about. It's simply a secondary, internal version added by RH.
 
Old 09-27-2004, 03:06 AM   #3
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Original Poster
Rep: Reputation: 15
yes, they added that line to file version.c from inside the gcc build folders

it's defined as extern const char string[];, if I remember correctly, and its default value is 3.4.2 so I, in theory, only have to change its value within version.c to show something like

gcc 3.4.2 (SN95G5/Athlon64 optimized) (of course, as I said, this is only for 'eye-candy', no more)

so steps to customize gcc's version output are the following:

1. untar the gcc tarball (I'm using full gcc tarball instead of separated ones)
2. locate version.c file, located under gcc-3.4.2/gcc/version.h (I'm using 3.4.2)
3. change the version string to fit your taste

save changes on file and... voila

Julio
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
ok you are all gonna think i'm stupid Bensr20det Linux - Wireless Networking 3 02-14-2005 01:52 PM
redhat fedora gcc version (compiled for 2.4.20) doesn't match kernel version 2.4.22 start1000 Linux - Software 0 03-16-2004 08:17 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 12:07 AM
Sample Driver Module incompatibility with Kernel version (or gcc version) jvs Linux - General 1 06-07-2002 01:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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