ccc5c1642b
clang doesn't support the gnu_printf attribute that OpenOCD uses if __GNUC__ and __GNUC_MINOR__ indicates gcc >= 4.4. Most clang builds set __GNUC__/__GNUC_MINOR__ to 4.2 for historical reasons, so they don't trigger this condition; however, some builds set it to something much higher to work around code using __GNUC__ to determine if a feature that does exist in clang (but not gcc 4.2) is available, causing OpenOCD to use attribute gnu_printf. The problem can be reproduced without a special clang build by adding -fgnuc-version=14.1 to CFLAGS. Change-Id: I3c0832d4201578b116c5214203f95b6153dad30e Signed-off-by: Bernhard Rosenkränzer <bero@baylibre.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8258 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>