diff options
author | Patrick Bendorf <mail@patrick-bendorf.de> | 2016-02-29 13:19:43 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-02-29 13:56:03 +0100 |
commit | 5b88b625620b88fc6a298a30c0142df307e53e92 (patch) | |
tree | 4ea3c36f2061191b5e8749208b4fa2f960fa3946 /winsup/ccwrap | |
parent | b9217601f849b8f0a3f4a491e26b3692287ee89d (diff) | |
download | newlib-5b88b625620b88fc6a298a30c0142df307e53e92.zip newlib-5b88b625620b88fc6a298a30c0142df307e53e92.tar.gz newlib-5b88b625620b88fc6a298a30c0142df307e53e92.tar.bz2 |
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
Diffstat (limited to 'winsup/ccwrap')
-rwxr-xr-x | winsup/ccwrap | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/ccwrap b/winsup/ccwrap index 7580e7a..2f1fd3a 100755 --- a/winsup/ccwrap +++ b/winsup/ccwrap @@ -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; |