* ccwrap: Don't drop mingw header file paths unless we've specified them with

--with-windows-headers.
This commit is contained in:
Christopher Faylor 2012-11-26 19:00:35 +00:00
parent 7b2d80eb87
commit 96079146c4
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx>
* ccwrap: Don't drop mingw header file paths unless we've specified
them with --with-windows-headers.
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx>
* Makefile.common: Revamp for new configury. Add default compilation

View File

@ -25,6 +25,11 @@ 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;
@ -34,13 +39,13 @@ if ("@ARGV" !~ / -nostdinc/o) {
next;
} elsif ($_ eq "End of search list.\n") {
last;
} elsif (!m%w32api|mingw.*/include%o) {
} elsif (!@dirafters || !m%w32api|mingw.*/include%o) {
chomp;
s/^\s+//;
push @compiler, '-isystem', Cwd::abs_path($_);
}
}
push @compiler, '-isystem', $_ for split ' ', $ENV{CCWRAP_DIRAFTER_HEADERS};
push @compiler, @dirafters;
close $fd;
}