Commit 42b0a3b9 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Enable printf format warnings for 64-bit PE builds.

parent 79650e40
......@@ -11450,40 +11450,7 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
as_fn_append ${wine_arch}_LDFLAGS " -Wl,--disable-stdcall-fixup"
fi } ;;
x86_64) { 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 }
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wformat-overflow" | $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 -Wformat-overflow" >&5
printf %s "checking whether $CC supports -Wformat-overflow... " >&6; }
if eval test \${$as_ac_var+y}
......@@ -11582,39 +11549,6 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
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 } ;;
esac
wine_crossdebug=$CROSSDEBUG
......
......@@ -959,11 +959,9 @@ do
i386) WINE_TRY_PE_CFLAGS([-fno-omit-frame-pointer])
WINE_TRY_PE_CFLAGS([-Wl,--disable-stdcall-fixup],
[AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--disable-stdcall-fixup"])]) ;;
x86_64) WINE_TRY_PE_CFLAGS([-Wno-format])
WINE_TRY_PE_CFLAGS([-Wformat-overflow])
x86_64) WINE_TRY_PE_CFLAGS([-Wformat-overflow])
WINE_TRY_PE_CFLAGS([-Wnonnull])
WINE_TRY_PE_CFLAGS([-mcx16]) ;;
aarch64) WINE_TRY_PE_CFLAGS([-Wno-format]) ;;
esac
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" );
}
/* 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_filename( arch_make_variable( "CFLAGS", arch ));
output( "\n" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment