configure: Don't explicitly enable -Wenum-conversion on Clang.
Clang enables -Wenum-conversion by default anyway, we add it to CFLAGS to enable them on GCC. When explicitly enabled, Clang also enables additional warnings. Some of those warnings, like -Wenum-enum-conversion, are too strict to be practical with win32, so avoid enabling them.
This commit is contained in:
parent
b527b232cf
commit
81111326ff
2 changed files with 37 additions and 2 deletions
37
configure
vendored
37
configure
vendored
|
@ -11505,7 +11505,41 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"
|
|||
then :
|
||||
as_fn_append ${wine_arch}_EXTRACFLAGS " -Wabsolute-value"
|
||||
fi }
|
||||
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wenum-conversion" | $as_tr_sh`
|
||||
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wenum-enum-conversion" | $as_tr_sh`
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wenum-enum-conversion" >&5
|
||||
printf %s "checking whether $CC supports -Wenum-enum-conversion... " >&6; }
|
||||
if eval test \${$as_ac_var+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
ac_wine_try_cflags_saved=$CFLAGS
|
||||
ac_wine_try_cflags_saved_exeext=$ac_exeext
|
||||
CFLAGS="$CFLAGS -nostdlib -nodefaultlibs -Wenum-enum-conversion"
|
||||
ac_exeext=".exe"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
void *__os_arm64x_dispatch_ret = 0;
|
||||
int __cdecl mainCRTStartup(void) { return 0; }
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"
|
||||
then :
|
||||
eval "$as_ac_var=yes"
|
||||
else $as_nop
|
||||
eval "$as_ac_var=no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$ac_wine_try_cflags_saved
|
||||
ac_exeext=$ac_wine_try_cflags_saved_exeext
|
||||
fi
|
||||
eval ac_res=\$$as_ac_var
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
printf "%s\n" "$ac_res" >&6; }
|
||||
if eval test \"x\$"$as_ac_var"\" = x"yes"
|
||||
then :
|
||||
:
|
||||
else $as_nop
|
||||
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wenum-conversion" | $as_tr_sh`
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wenum-conversion" >&5
|
||||
printf %s "checking whether $CC supports -Wenum-conversion... " >&6; }
|
||||
if eval test \${$as_ac_var+y}
|
||||
|
@ -11538,6 +11572,7 @@ printf "%s\n" "$ac_res" >&6; }
|
|||
if eval test \"x\$"$as_ac_var"\" = x"yes"
|
||||
then :
|
||||
as_fn_append ${wine_arch}_EXTRACFLAGS " -Wenum-conversion"
|
||||
fi }
|
||||
fi }
|
||||
|
||||
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-flarge-source-files -Wmisleading-indentation" | $as_tr_sh`
|
||||
|
|
|
@ -966,7 +966,7 @@ This is an error since --enable-archs=$wine_arch was requested.])])
|
|||
WINE_TRY_PE_CFLAGS([-Wpointer-arith])
|
||||
WINE_TRY_PE_CFLAGS([-Wlogical-op])
|
||||
WINE_TRY_PE_CFLAGS([-Wabsolute-value])
|
||||
WINE_TRY_PE_CFLAGS([-Wenum-conversion])
|
||||
WINE_TRY_PE_CFLAGS([-Wenum-enum-conversion],[:],WINE_TRY_PE_CFLAGS([-Wenum-conversion]))
|
||||
|
||||
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"])])
|
||||
|
|
Loading…
Add table
Reference in a new issue