public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-patches@cygwin.com
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH 1/3] Stop using c++wrap for MinGW-compiled utilities
Date: Thu, 15 Oct 2020 15:36:50 +0100	[thread overview]
Message-ID: <20201015143652.56501-2-jon.turney@dronecode.org.uk> (raw)
In-Reply-To: <20201015143652.56501-1-jon.turney@dronecode.org.uk>

Stop using c++wrap for MinGW-compiled utilities.

(Partially reverts 96079146)
---
 winsup/ccwrap            | 9 ++-------
 winsup/utils/Makefile.in | 6 +-----
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/winsup/ccwrap b/winsup/ccwrap
index 0c6a17020..900fc4ae5 100755
--- a/winsup/ccwrap
+++ b/winsup/ccwrap
@@ -26,11 +26,6 @@ if ("@ARGV" !~ / -nostdinc/o) {
     push @compiler, '-I' . $_ for split ' ', $ENV{CCWRAP_HEADERS};
     push @compiler, '-isystem', $_ for split ' ', $ENV{CCWRAP_SYSTEM_HEADERS};
     my $finding_paths = 0;
-    my $mingw_compiler = $compiler[0] =~ /mingw/o;
-    my @dirafters;
-    for my $d (split ' ', $ENV{CCWRAP_DIRAFTER_HEADERS}) {
-	push @dirafters, '-isystem', $d if !$mingw_compiler || $d !~ /w32api/o;
-    }
     while (<$fd>) {
 	if (/^\*\*\*/o) {
 	    print;
@@ -40,13 +35,13 @@ if ("@ARGV" !~ / -nostdinc/o) {
 	    next;
 	} elsif ($_ eq "End of search list.\n") {
 	    last;
-	} elsif (!@dirafters || !m%w32api|mingw.*/include%o) {
+	} elsif (!m%w32api%o) {
 	    chomp;
 	    s/^\s+//;
 	    push @compiler, '-isystem', Cwd::abs_path($_);
 	}
     }
-    push @compiler, @dirafters;
+    push @compiler, '-isystem', $_ for split ' ', $ENV{CCWRAP_DIRAFTER_HEADERS};
     close $fd;
 }
 
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index c3297c6c1..889fdaab3 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -140,12 +140,8 @@ check: testsuite.exe ; $(<D)/$(<F)
 # the rest of this file contains generic rules
 
 # how to compile a MinGW object
-${MINGW_OBJS}: override CXX:=${MINGW_CXX}
-${MINGW_OBJS}: CCWRAP_HEADERS:=${srcdir}
-${MINGW_OBJS}: CCWRAP_SYSTEM_HEADERS:=
-# ${MINGW_OBJS}: CCWRAP_DIRAFTER_HEADERS:=
 $(MINGW_OBJS): %.o: %.cc
-	c++wrap -c -o $@ ${CXXFLAGS} $(MINGW_CXXFLAGS) $<
+	${MINGW_CXX} -c -o $@ ${CXXFLAGS} $(MINGW_CXXFLAGS) $<
 
 # how to link a MinGW binary
 $(MINGW_BINS): %.exe: %.o
-- 
2.28.0


  reply	other threads:[~2020-10-15 14:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 14:36 [PATCH 0/3] Remove ccwrap Jon Turney
2020-10-15 14:36 ` Jon Turney [this message]
2020-10-15 14:36 ` [PATCH 2/3] " Jon Turney
2020-10-27 16:05   ` Jon Turney
2020-10-15 14:36 ` [PATCH 3/3] Remove --with-windows-{libs,headers} Jon Turney

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=20201015143652.56501-2-jon.turney@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-patches@cygwin.com \
    /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: link
Be 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).