public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: Restore setting CC and CXX Makefile variables Date: Wed, 28 Oct 2020 15:25:18 +0000 (GMT) [thread overview] Message-ID: <20201028152518.BE2F23972030@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7fa743ca9468d7725953ebdfb0d0b53ad126c14c commit 7fa743ca9468d7725953ebdfb0d0b53ad126c14c Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Tue Oct 27 15:31:06 2020 +0000 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. Diff: --- winsup/cygserver/Makefile.in | 3 +++ winsup/cygwin/Makefile.in | 4 ++++ winsup/utils/Makefile.in | 3 +++ 3 files changed, 10 insertions(+) diff --git a/winsup/cygserver/Makefile.in b/winsup/cygserver/Makefile.in index 7b250dd68..65c402517 100644 --- a/winsup/cygserver/Makefile.in +++ b/winsup/cygserver/Makefile.in @@ -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)\"" diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index dad526b74..f6236d909 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 diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index add29d10f..e21874027 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -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@
reply other threads:[~2020-10-28 15:25 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201028152518.BE2F23972030@sourceware.org \ --to=jturney@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).