aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/Makefile.in
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-10-27 15:31:06 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2020-10-28 15:23:56 +0000
commit7fa743ca9468d7725953ebdfb0d0b53ad126c14c (patch)
tree7f66a0562fb26646b1e638226ce184a9e1708b87 /winsup/cygwin/Makefile.in
parentfcaaf40c9d2d6016334426b30086fecd8ecebfd0 (diff)
downloadnewlib-7fa743ca9468d7725953ebdfb0d0b53ad126c14c.zip
newlib-7fa743ca9468d7725953ebdfb0d0b53ad126c14c.tar.gz
newlib-7fa743ca9468d7725953ebdfb0d0b53ad126c14c.tar.bz2
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.
Diffstat (limited to 'winsup/cygwin/Makefile.in')
-rw-r--r--winsup/cygwin/Makefile.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index dad526b..f6236d9 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -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