configure: Allow specifying different CFLAGS for the cross compiler.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-07-08 11:20:21 +02:00
parent a949388192
commit 40b7091ec5
4 changed files with 6 additions and 1 deletions

View File

@ -43,6 +43,7 @@ CPPBIN = @CPPBIN@
CROSSCC = @CROSSCC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CROSSCFLAGS = @CROSSCFLAGS@
EXTRACFLAGS = @EXTRACFLAGS@
MSVCRTFLAGS = @BUILTINFLAG@
TARGETFLAGS = @TARGETFLAGS@

3
configure vendored
View File

@ -690,6 +690,7 @@ X_PRE_LIBS
X_CFLAGS
XMKMF
PTHREAD_LIBS
CROSSCFLAGS
CROSSCC
CROSSTARGET
PRELINK
@ -9105,6 +9106,8 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CC="$ac_save_CC"
CROSSCFLAGS=${CROSSCFLAGS:-$CFLAGS}
fi
fi

View File

@ -983,6 +983,7 @@ then
done],
[AC_MSG_RESULT([no])])
CC="$ac_save_CC"
AC_SUBST(CROSSCFLAGS,${CROSSCFLAGS:-$CFLAGS})
fi
fi

View File

@ -2669,7 +2669,7 @@ static struct strarray output_sources( const struct makefile *make )
if (make->use_msvcrt) output_filenames( msvcrt_flags );
output_filename( "-DWINE_CROSSTEST" );
output_filenames( cpp_flags );
output_filename( "$(CFLAGS)" );
output_filename( "$(CROSSCFLAGS)" );
output( "\n" );
}
if (make->testdll && !strcmp( ext, "c" ) && !(source->file->flags & FLAG_GENERATED))