Cygwin: Stop using c++wrap for MinGW-compiled utilities

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

(Partially reverts 96079146)
This commit is contained in:
Jon Turney 2017-03-16 15:02:20 +00:00
parent 7ed952000c
commit 5601d53640
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
2 changed files with 3 additions and 12 deletions

View File

@ -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;
}

View File

@ -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