Author: hailfinger Date: Sat Jul 17 16:49:30 2010 New Revision: 1087 URL: http://flashrom.org/trac/coreboot/changeset/1087
Log: 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.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net Acked-by: Uwe Hermann uwe@hermann-uwe.de
Modified: trunk/flashrom.c trunk/w29ee011.c
Modified: trunk/flashrom.c ============================================================================== --- trunk/flashrom.c Sat Jul 17 15:45:42 2010 (r1086) +++ trunk/flashrom.c Sat Jul 17 16:49:30 2010 (r1087) @@ -1305,7 +1305,12 @@ #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__
Modified: trunk/w29ee011.c ============================================================================== --- trunk/w29ee011.c Sat Jul 17 15:45:42 2010 (r1086) +++ trunk/w29ee011.c Sat Jul 17 16:49:30 2010 (r1087) @@ -26,7 +26,6 @@ { chipaddr bios = flash->virtual_memory; uint8_t id1, id2; - extern char *chip_to_probe;
if (!chip_to_probe || strcmp(chip_to_probe, "W29EE011")) { msg_cdbg("Probing disabled for Winbond W29EE011 because "