mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 19:40:33 +08:00
Cygwin: Restore setting CC and CXX Makefile variables
b55e3f19 was a bit too aggressive in dropping, rather than just un-exporting these Makefile variables. We need to set these to the configured host compiler if we are cross-compiling, otherwise they default to the build compiler. Also export CC to the mkvers.sh script (which requires it since 4eca5e6a). It's unclear why we can't just cause windres to use the build 'cpp' as the pre-processor there.
This commit is contained in:
parent
fcaaf40c9d
commit
7fa743ca94
@ -11,6 +11,9 @@ target_builddir:=@target_builddir@
|
||||
winsup_srcdir:=@winsup_srcdir@
|
||||
configure_args=@configure_args@
|
||||
|
||||
CC:=@CC@
|
||||
CXX:=@CXX@
|
||||
|
||||
CFLAGS:=@CFLAGS@
|
||||
override CXXFLAGS=@CXXFLAGS@
|
||||
override CXXFLAGS+=-MMD -Wimplicit-fallthrough=5 -Werror -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
|
||||
|
@ -14,6 +14,9 @@ target_builddir:=@target_builddir@
|
||||
winsup_srcdir:=@winsup_srcdir@
|
||||
configure_args=@configure_args@
|
||||
|
||||
CC:=@CC@
|
||||
CXX:=@CXX@
|
||||
|
||||
CFLAGS?=@CFLAGS@
|
||||
CXXFLAGS?=@CXXFLAGS@
|
||||
INCLUDES?=@INCLUDES@
|
||||
@ -773,6 +776,7 @@ src_files := $(foreach dir,$(VPATH),$(find_src_files))
|
||||
# second, so version.cc is always older than winver.o
|
||||
version.cc: mkvers.sh include/cygwin/version.h winver.rc $(src_files)
|
||||
@echo "Making version.cc and winver.o";\
|
||||
export CC="${CC}";\
|
||||
/bin/sh ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) ${CFLAGS} -I${srcdir}/include
|
||||
$(VERSION_OFILES): version.cc
|
||||
|
||||
|
@ -11,6 +11,9 @@ target_builddir:=@target_builddir@
|
||||
winsup_srcdir:=@winsup_srcdir@
|
||||
configure_args=@configure_args@
|
||||
|
||||
CC:=@CC@
|
||||
CXX:=@CXX@
|
||||
|
||||
CFLAGS_COMMON=-Wimplicit-fallthrough=4 -Werror
|
||||
CFLAGS:=@CFLAGS@
|
||||
CXXFLAGS:=@CXXFLAGS@
|
||||
|
Loading…
x
Reference in New Issue
Block a user