From: Jacek Caban jacek@codeweavers.com
Depending on bison version and Clang config, generated files cause various warnings. In gitlab CI, there is an unused function in wbemprox. I don't see it on newer bison and LLVM, but there are other -Wunused-but-set-variable warning instead. This was partially fixed in upstream bison: https://git.savannah.gnu.org/cgit/bison.git/commit/?id=a166d5450e3f47587b98f... The fix does not take into account MSVC targets, I tried upstreaming a fix for that, with no success: https://savannah.gnu.org/patch/?10420 https://lists.gnu.org/archive/html/bison-patches/2023-11/msg00000.html --- configure.ac | 8 +++++++- tools/makedep.c | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac index 3f54230b46b..dc7ba2c2a90 100644 --- a/configure.ac +++ b/configure.ac @@ -175,7 +175,7 @@ case "$host_cpu" in x86_64) HOST_ARCH=x86_64 ;; esac m4_set_add_all([_AC_SUBST_VARS],[HOST_ARCH]m4_foreach([cpu],[aarch64,arm,arm64ec,i386,x86_64], - [m4_foreach([var],[CC,CFLAGS,EXTRACFLAGS,LDFLAGS,DEBUG,TARGET,DELAYLOADFLAG,DISABLED_SUBDIRS],[,cpu[_]var])])) + [m4_foreach([var],[CC,CFLAGS,EXTRACFLAGS,TABCFLAGS,LDFLAGS,DEBUG,TARGET,DELAYLOADFLAG,DISABLED_SUBDIRS],[,cpu[_]var])]))
AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir, [wine_cv_toolsdir="$with_wine_tools" @@ -960,6 +960,12 @@ This is an error since --enable-archs=$wine_arch was requested.])]) WINE_TRY_PE_CFLAGS([-Wabsolute-value]) WINE_TRY_PE_CFLAGS([-Wenum-enum-conversion],[:],WINE_TRY_PE_CFLAGS([-Wenum-conversion]))
+ if test -n "$llvm_extra_cflags" + then + WINE_TRY_PE_CFLAGS([-Wunused-function],[AS_VAR_APPEND(${wine_arch}_TABCFLAGS,[" -Wno-unused-function"])]) + WINE_TRY_PE_CFLAGS([-Wunused-but-set-variable],[AS_VAR_APPEND(${wine_arch}_TABCFLAGS,[" -Wno-unused-but-set-variable"])]) + fi + dnl GCC can't handle large files when -Wmisleading-indentation is enabled (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549) WINE_TRY_PE_CFLAGS([-flarge-source-files -Wmisleading-indentation],[AS_VAR_APPEND(${wine_arch}_EXTRACFLAGS,[" -Wno-misleading-indentation"])])
diff --git a/tools/makedep.c b/tools/makedep.c index f22552f8400..9f88f58bccb 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -3260,6 +3260,7 @@ static void output_source_one_arch( struct makefile *make, struct incl_file *sou
output_filenames( cpp_flags ); output_filename( var_cflags ); + if (strendswith( source->name, ".tab.c" )) output_filename( arch_make_variable( "TABCFLAGS", arch )); output( "\n" );
if (make->testdll && strendswith( source->name, ".c" ) &&