Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BLU0-SMTP142759870E7EBD7482C861FDE00@phx.gbl>
Date: Tue, 26 Jun 2012 15:25:46 +0200
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Re: john --list=build-version shows gcc version info even
 if built with clang

On 06/26/2012 02:55 PM, Solar Designer wrote:
> On Tue, Jun 26, 2012 at 09:49:32AM +0200, magnum wrote:
>> $ clang -dM -E -x c /dev/null | fgrep '3.0'
>> #define __VERSION__ "4.2.1 Compatible Ubuntu Clang 3.0 
>> (tags/RELEASE_30/final)"
>> #define __clang_version__ "3.0 (tags/RELEASE_30/final)"
>>
>> We should use __clang_version__ if defined, and if not we can use 
>> __GNUC__*. But before fixing this, the same should be determined for icc.
> 
> Why "before"?  I see no problem adding support for clang detection now
> and for icc later.  Since you've already identified the macros above, I
> think it's best to commit clang detection now, before jumbo-6.

Here's a patch.

I also checked __VERSION__

Now I get


Compiler version: 4.6.3 20120306 (Red Hat 4.6.3-2)
gcc version: 4.6.3

for linux-x86-sse2i

and

Compiler version: 4.2.1 Compatible Clang Compiler
gcc version 4.2.1
clang version: 2.9 (tags/RELEASE_29/final)

for linux-x86-64-clang

Frank

View attachment "0001-Enhanced-compiler-version-info-for-list-build-info.patch" of type "text/x-patch" (1074 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.