configure: Don't use CPPFLAGS for PE cross targets.

This commit is contained in:
Billy Laws 2024-08-14 20:50:52 +00:00 committed by Alexandre Julliard
parent 100b58eb88
commit 51b2558b73
Notes: Alexandre Julliard 2024-08-15 23:22:58 +02:00
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6244
3 changed files with 7 additions and 2 deletions

3
configure vendored
View file

@ -10354,6 +10354,7 @@ fi
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_CPPFLAGS=$CPPFLAGS
saved_LDFLAGS=$LDFLAGS
{ extra_arch=; unset extra_arch;}
@ -10629,6 +10630,7 @@ test -n "$x86_64_CC" || x86_64_CC="false"
fi
CFLAGS=${CROSSCFLAGS:-"-g -O2"}
CPPFLAGS=""
LDFLAGS=$CROSSLDFLAGS
eval CC=\$${wine_arch}_CC
eval ${wine_arch}_CFLAGS=\$CFLAGS
@ -12059,6 +12061,7 @@ done
CC=$saved_CC
CFLAGS=$saved_CFLAGS
CPPFLAGS=$saved_CPPFLAGS
LDFLAGS=$saved_LDFLAGS
case $HOST_ARCH in

View file

@ -794,6 +794,7 @@ AS_VAR_SET_IF([enable_archs],
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_CPPFLAGS=$CPPFLAGS
saved_LDFLAGS=$LDFLAGS
AS_UNSET(extra_arch)
@ -832,6 +833,7 @@ do
esac])
CFLAGS=${CROSSCFLAGS:-"-g -O2"}
CPPFLAGS=""
LDFLAGS=$CROSSLDFLAGS
AS_VAR_COPY([CC],[${wine_arch}_CC])
AS_VAR_COPY([${wine_arch}_CFLAGS],[CFLAGS])
@ -1012,6 +1014,7 @@ done
CC=$saved_CC
CFLAGS=$saved_CFLAGS
CPPFLAGS=$saved_CPPFLAGS
LDFLAGS=$saved_LDFLAGS
case $HOST_ARCH in

View file

@ -3258,14 +3258,13 @@ static void output_source_one_arch( struct makefile *make, struct incl_file *sou
if (!unix_lib_supported && make->module && is_crt_module( make->module ))
strarray_add( &cflags, "-fno-builtin" );
}
strarray_addall( &cflags, cpp_flags );
}
else
{
if (make->module && is_crt_module( make->module )) strarray_add( &cflags, "-fno-builtin" );
}
strarray_addall( &cflags, cpp_flags );
output( "%s: %s\n", obj_dir_path( make, obj_name ), source->filename );
output( "\t%s%s -c -o $@ %s", cmd_prefix( "CC" ), var_cc, source->filename );
output_filenames( defines );