ccwrap: fix build with non-english locale set

short explanation: after setting up cygwin on my systems the default
locale is set to "de_DE.UTF-8". this leads to ccwrap not picking up
certain "-isystem" arguments, which in turn leads to "stddef.h: no such
file or directory". this breaks the build process for systems having non
english locale.

ccwrap scans the output of the first compiler invocation (line 21) for
some specific english output on and around line 43.

i changed the patch to check uname -o for cygwin string and set the
locale to either C or C.UTF-8
This commit is contained in:
Patrick Bendorf 2016-02-29 13:19:43 +01:00 committed by Corinna Vinschen
parent b9217601f8
commit 5b88b62562
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,11 @@ if ($ARGV[0] ne '++') {
$cxx = 1;
}
die "$0: $ccorcxx environment variable does not exist\n" unless exists $ENV{$ccorcxx};
if (`uname -o` =~ /cygwin/i) {
$ENV{'LANG'} = 'C.UTF-8';
} else {
$ENV{'LANG'} = 'C';
}
my @compiler = split ' ', $ENV{$ccorcxx};
if ("@ARGV" !~ / -nostdinc/o) {
my $fd;