[newlib-cygwin] Cygwin: Stop using c++wrap for MinGW-compiled utilities
Jon TURNEY
jturney@sourceware.org
Mon Oct 19 15:40:14 GMT 2020
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
More information about the Cygwin-cvs
mailing list