public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: Stop using c++wrap for MinGW-compiled utilities
@ 2020-10-19 15:40 Jon TURNEY
  0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2020-10-19 15:40 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5601d5364085b95142254b87f4f656339264be9f

commit 5601d5364085b95142254b87f4f656339264be9f
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Mar 16 15:02:20 2017 +0000

    Cygwin: Stop using c++wrap for MinGW-compiled utilities
    
    Stop using c++wrap for MinGW-compiled utilities.
    
    (Partially reverts 96079146)

Diff:
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-19 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 15:40 [newlib-cygwin] Cygwin: Stop using c++wrap for MinGW-compiled utilities Jon TURNEY

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).