From fe625241f7de1f2ab82836a4dd1632959034876e Mon Sep 17 00:00:00 2001 From: Michel Zou Date: Mon, 7 Jun 2021 08:46:47 +0200 Subject: [PATCH] llvmpipe: restrict optim bug workaround to gcc 10.x seems fixed in 11.x, see https://gitlab.freedesktop.org/mesa/mesa/-/issues/3906 Reviewed-by: Jose Fonseca Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_conv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c index 1c050535301..e211fe66df7 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c @@ -78,12 +78,11 @@ #include "lp_bld_format.h" -/* the lp_test_format test fails on mingw/i686 at -O2 - * it is ok with gcc 9.3, but not for 10.2, assume broken for gcc>=10 +/* the lp_test_format test fails on mingw/i686 at -O2 with gcc 10.x * ref https://gitlab.freedesktop.org/mesa/mesa/-/issues/3906 */ -#if defined(__MINGW32__) && !defined(__MINGW64__) && ((__GNUC__ * 100) + __GNUC_MINOR >= 1000) +#if defined(__MINGW32__) && !defined(__MINGW64__) && (__GNUC__ == 10) #warning "disabling caller-saves optimization for this file to work around compiler bug" #pragma GCC optimize("-fno-caller-saves") #endif