Alexandre Julliard : makefiles: Disable printf format warnings for non-PE msvcrt modules.
Alexandre Julliard
julliard at winehq.org
Thu Jan 27 15:36:19 CST 2022
Module: wine
Branch: master
Commit: 26a3472b340f01288b3fa4b98a4e8f363b62b135
URL: https://source.winehq.org/git/wine.git/?a=commit;h=26a3472b340f01288b3fa4b98a4e8f363b62b135
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jan 27 18:47:25 2022 +0100
makefiles: Disable printf format warnings for non-PE msvcrt modules.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
configure | 28 ++++++++++++++++++++++++++++
configure.ac | 3 ++-
tools/makedep.c | 2 +-
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 7760e43b8e9..bcefc8e3247 100755
--- a/configure
+++ b/configure
@@ -19467,6 +19467,34 @@ printf "%s\n" "$ac_cv_cflags__fshort_wchar" >&6; }
if test "x$ac_cv_cflags__fshort_wchar" = xyes
then :
MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar"
+fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wno-format" >&5
+printf %s "checking whether the compiler supports -Wno-format... " >&6; }
+if test ${ac_cv_cflags__Wno_format+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_wine_try_cflags_saved=$CFLAGS
+CFLAGS="$CFLAGS -Wno-format"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(int argc, char **argv) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_cflags__Wno_format=yes
+else $as_nop
+ ac_cv_cflags__Wno_format=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+CFLAGS=$ac_wine_try_cflags_saved
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wno_format" >&5
+printf "%s\n" "$ac_cv_cflags__Wno_format" >&6; }
+if test "x$ac_cv_cflags__Wno_format" = xyes
+then :
+ MSVCRTFLAGS="$MSVCRTFLAGS -Wno-format"
fi ;;
esac
diff --git a/configure.ac b/configure.ac
index 181047ef0d8..0aad012060e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1880,7 +1880,8 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy=
WINE_TRY_CFLAGS([-Wl,-delayload,autoconftest.dll],[AC_SUBST(DELAYLOADFLAG,["-Wl,-delayload,"])]) ;;
*) MSVCRTFLAGS="-D_WIN32"
WINE_TRY_CFLAGS([-fno-builtin],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-builtin"])
- WINE_TRY_CFLAGS([-fshort-wchar],[MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar"]) ;;
+ WINE_TRY_CFLAGS([-fshort-wchar],[MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar"])
+ WINE_TRY_CFLAGS([-Wno-format],[MSVCRTFLAGS="$MSVCRTFLAGS -Wno-format"]) ;;
esac
case $host_cpu in
diff --git a/tools/makedep.c b/tools/makedep.c
index 5dc0a97fdb3..4172720fbf0 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -3027,6 +3027,7 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
output( "%s.o: %s\n", obj_dir_path( make, obj ), source->filename );
output( "\t%s$(CC) -c -o $@ %s", cmd_prefix( "CC" ), source->filename );
output_filenames( defines );
+ output_filenames( make->extlib ? extra_cflags_extlib : extra_cflags );
if (make->sharedlib || (source->file->flags & FLAG_C_UNIX))
{
output_filenames( unix_dllflags );
@@ -3038,7 +3039,6 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
if (!*dll_ext && make->module && is_crt_module( make->module ))
output_filename( "-fno-builtin" );
}
- output_filenames( make->extlib ? extra_cflags_extlib : extra_cflags );
output_filenames( cpp_flags );
output_filename( "$(CFLAGS)" );
output( "\n" );
More information about the wine-cvs
mailing list