configure: Enable printf format warnings for 64-bit PE builds.
This commit is contained in:
parent
79650e403b
commit
42b0a3b917
3 changed files with 2 additions and 76 deletions
68
configure
vendored
68
configure
vendored
|
@ -11450,40 +11450,7 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"
|
||||||
then :
|
then :
|
||||||
as_fn_append ${wine_arch}_LDFLAGS " -Wl,--disable-stdcall-fixup"
|
as_fn_append ${wine_arch}_LDFLAGS " -Wl,--disable-stdcall-fixup"
|
||||||
fi } ;;
|
fi } ;;
|
||||||
x86_64) { as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wno-format" | $as_tr_sh`
|
x86_64) { as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wformat-overflow" | $as_tr_sh`
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format" >&5
|
|
||||||
printf %s "checking whether $CC supports -Wno-format... " >&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 -Wno-format"
|
|
||||||
ac_exeext=".exe"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
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 :
|
|
||||||
as_fn_append ${wine_arch}_EXTRACFLAGS " -Wno-format"
|
|
||||||
fi }
|
|
||||||
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wformat-overflow" | $as_tr_sh`
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-overflow" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-overflow" >&5
|
||||||
printf %s "checking whether $CC supports -Wformat-overflow... " >&6; }
|
printf %s "checking whether $CC supports -Wformat-overflow... " >&6; }
|
||||||
if eval test \${$as_ac_var+y}
|
if eval test \${$as_ac_var+y}
|
||||||
|
@ -11581,39 +11548,6 @@ printf "%s\n" "$ac_res" >&6; }
|
||||||
if eval test \"x\$"$as_ac_var"\" = x"yes"
|
if eval test \"x\$"$as_ac_var"\" = x"yes"
|
||||||
then :
|
then :
|
||||||
as_fn_append ${wine_arch}_EXTRACFLAGS " -mcx16"
|
as_fn_append ${wine_arch}_EXTRACFLAGS " -mcx16"
|
||||||
fi } ;;
|
|
||||||
aarch64) { as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wno-format" | $as_tr_sh`
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format" >&5
|
|
||||||
printf %s "checking whether $CC supports -Wno-format... " >&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 -Wno-format"
|
|
||||||
ac_exeext=".exe"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
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 :
|
|
||||||
as_fn_append ${wine_arch}_EXTRACFLAGS " -Wno-format"
|
|
||||||
fi } ;;
|
fi } ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -959,11 +959,9 @@ do
|
||||||
i386) WINE_TRY_PE_CFLAGS([-fno-omit-frame-pointer])
|
i386) WINE_TRY_PE_CFLAGS([-fno-omit-frame-pointer])
|
||||||
WINE_TRY_PE_CFLAGS([-Wl,--disable-stdcall-fixup],
|
WINE_TRY_PE_CFLAGS([-Wl,--disable-stdcall-fixup],
|
||||||
[AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--disable-stdcall-fixup"])]) ;;
|
[AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--disable-stdcall-fixup"])]) ;;
|
||||||
x86_64) WINE_TRY_PE_CFLAGS([-Wno-format])
|
x86_64) WINE_TRY_PE_CFLAGS([-Wformat-overflow])
|
||||||
WINE_TRY_PE_CFLAGS([-Wformat-overflow])
|
|
||||||
WINE_TRY_PE_CFLAGS([-Wnonnull])
|
WINE_TRY_PE_CFLAGS([-Wnonnull])
|
||||||
WINE_TRY_PE_CFLAGS([-mcx16]) ;;
|
WINE_TRY_PE_CFLAGS([-mcx16]) ;;
|
||||||
aarch64) WINE_TRY_PE_CFLAGS([-Wno-format]) ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl Determine debug info format
|
dnl Determine debug info format
|
||||||
|
|
|
@ -3174,12 +3174,6 @@ static void output_source_one_arch( struct makefile *make, struct incl_file *sou
|
||||||
if (make->module && is_crt_module( make->module )) output_filename( "-fno-builtin" );
|
if (make->module && is_crt_module( make->module )) output_filename( "-fno-builtin" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* force -Wformat when using 'long' types, until all modules have been converted
|
|
||||||
* and we can remove -Wno-format */
|
|
||||||
if (!make->extlib && strarray_exists( &extra_cflags[arch], "-Wno-format" ) &&
|
|
||||||
!strarray_exists( &defines, "-DWINE_NO_LONG_TYPES" ))
|
|
||||||
output_filename( "-Wformat" );
|
|
||||||
|
|
||||||
output_filenames( cpp_flags );
|
output_filenames( cpp_flags );
|
||||||
output_filename( arch_make_variable( "CFLAGS", arch ));
|
output_filename( arch_make_variable( "CFLAGS", arch ));
|
||||||
output( "\n" );
|
output( "\n" );
|
||||||
|
|
Loading…
Add table
Reference in a new issue