1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

Use __clang_version__ macro

Newer llvm/clang versions (since r102686) have a __clang_version__ macro
which can be used to print the exact clang version.

Fix a case where chip_to_probe was referenced twice via extern, once at
the function level and once in a global include file. Found by latest
clang.

Corresponding to flashrom svn r1087.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
Carl-Daniel Hailfinger
2010-07-17 14:49:30 +00:00
parent abebe6b4c2
commit b51e58e50f
2 changed files with 6 additions and 2 deletions

View File

@ -1305,7 +1305,12 @@ void print_sysinfo(void)
#endif
#endif
#ifdef __clang__
msg_ginfo(" LLVM %i/clang %i, ", __llvm__, __clang__);
msg_ginfo(" LLVM Clang");
#ifdef __clang_version__
msg_ginfo(" %s,", __clang_version__);
#else
msg_ginfo(" unknown version (before r102686),");
#endif
#elif defined(__GNUC__)
msg_ginfo(" GCC");
#ifdef __VERSION__