Jacek Caban : makedep: Use -fno-builtin for crt modules.
Alexandre Julliard
julliard at winehq.org
Thu Dec 3 15:36:00 CST 2020
Module: wine
Branch: master
Commit: 727168a9e116a43f851df2673a9169ad280a9ec8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=727168a9e116a43f851df2673a9169ad280a9ec8
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Dec 3 19:11:35 2020 +0100
makedep: Use -fno-builtin for crt modules.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/makedep.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/tools/makedep.c b/tools/makedep.c
index f769713a8cf..d892b7e9541 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2276,6 +2276,15 @@ static struct strarray get_default_imports( const struct makefile *make )
}
+/*******************************************************************
+ * is_crt_module
+ */
+static int is_crt_module( const char *file )
+{
+ return !strncmp( file, "msvcr", 5 ) || !strncmp( file, "ucrt", 4 ) || !strcmp( file, "crtdll.dll" );
+}
+
+
/*******************************************************************
* add_crt_import
*/
@@ -2286,16 +2295,13 @@ static void add_crt_import( const struct makefile *make, struct strarray *import
for (i = 0; i < imports->count; i++)
{
- if (strncmp( imports->str[i], "msvcr", 5 ) && strncmp( imports->str[i], "ucrt", 4 )) continue;
+ if (!is_crt_module( imports->str[i])) continue;
if (crt_dll) fatal_error( "More than one C runtime DLL imported: %s and %s\n", crt_dll, imports->str[i] );
crt_dll = imports->str[i];
}
if (!crt_dll && !strarray_exists( &make->extradllflags, "-nodefaultlibs" ))
{
- if (make->module &&
- (!strncmp( make->module, "msvcr", 5 ) ||
- !strncmp( make->module, "ucrt", 4 ) ||
- !strcmp( make->module, "crtdll.dll" )))
+ if (make->module && is_crt_module( make->module ))
{
crt_dll = make->module;
}
@@ -3147,7 +3153,8 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
output( "\t$(CROSSCC) -c -o $@ %s", source->filename );
output_filenames( defines );
output_filenames( extra_cross_cflags );
- if (source->file->flags & FLAG_C_IMPLIB) output_filename( "-fno-builtin" );
+ if (source->file->flags & FLAG_C_IMPLIB || (make->module && is_crt_module( make->module )))
+ output_filename( "-fno-builtin" );
output_filenames( cpp_flags );
output_filename( "$(CROSSCFLAGS)" );
output( "\n" );
More information about the wine-cvs
mailing list