Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC queries: identify versions and compiler flags used
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
kcy29581
Apprentice
Apprentice


Joined: 04 Nov 2004
Posts: 284
Location: England

PostPosted: Tue Sep 25, 2007 2:47 pm    Post subject: GCC queries: identify versions and compiler flags used Reply with quote

Hi all,

I have put the questions here as I'm using Ubuntu at work. However, I think the Gentoo crowd should be able to help. :)

I work as a video games tester, and I need some help regarding GCC. These are regarding tests that I need to perform.

Things I need to identify:
- What version of the GCC compiler was used to compile our games, and
- Identify what compiler flags were used by our development teams

Please note, I only have the final product, not the source code.

I believe I know how to identify the GCC version used; I use the following command on .BIN files:
Code:
strings [i]application[/i] | grep GCC


Now all I need is to figure out how to identify the compiler flags used... Any ideas?

Thanks,

KCy29581
_________________
There is no spoon...

Oh, and it's WINDOWS not Winblowz for those who can't spell
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Tue Sep 25, 2007 4:28 pm    Post subject: Reply with quote

As far as I know there is no way, unless the application itself records the information somewhere (like the kernel does in /proc/version - even the kernel doesn't store the actual compiler command line, though). The result of your grep command there simply gives the version(s) of libgcc used by symbols in the binary - same as grepping the strings output for GLIBC would give the minimum versions of glibc required by various symbols.

Realistically, I strongly doubt that you have any chance of figuring out the compiler and command line used to build a given binary without access to its makefile.
_________________
Saving the world, one kilobyte at a time.
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Tue Sep 25, 2007 5:31 pm    Post subject: Reply with quote

Couldn't you just send an email to the dev and say "Hey man, what version did you use and what flags did you use?"

And obviously explain why. They'll probably be shocked that a game tester really knows shit about coding.
Back to top
View user's profile Send private message
kcy29581
Apprentice
Apprentice


Joined: 04 Nov 2004
Posts: 284
Location: England

PostPosted: Wed Sep 26, 2007 8:47 am    Post subject: Reply with quote

slycordinator wrote:
Couldn't you just send an email to the dev and say "Hey man, what version did you use and what flags did you use?"

And obviously explain why. They'll probably be shocked that a game tester really knows shit about coding.


They are already, and some feel "offended" that I'm asking questions regarding their code. It's stupid; this is my job, I'm supposed to make sure that they are complying with all requirements...

Unfortunately, I could not trust them. They would simply claim they were using the right flags, just to shut me up.

Oh well, back to the drawing board! Thanks for the help so far, guys.
_________________
There is no spoon...

Oh, and it's WINDOWS not Winblowz for those who can't spell
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum