Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 26 Jun 2012 15:06:51 +0200
From: Frank Dittrich <>
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.

Currently we have in john.c

#ifdef __GNUC__
                        printf("gcc version: %d.%d.%d\n", __GNUC__,
                               __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
#ifdef __ICC
                        printf("icc version: %d\n", __ICC);

So we should add this just after the icc version logic.
I see no harm in leaving the gcc version output in for icc / clang.


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.