[newlib-cygwin] ccwrap: fix build with non-english locale set
Corinna Vinschen
corinna@sourceware.org
Mon Feb 29 12:56:00 GMT 2016
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5b88b625620b88fc6a298a30c0142df307e53e92
commit 5b88b625620b88fc6a298a30c0142df307e53e92
Author: Patrick Bendorf <mail@patrick-bendorf.de>
Date: Mon Feb 29 13:19:43 2016 +0100
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
Diff:
---
winsup/ccwrap | 5 +++++
1 file changed, 5 insertions(+)
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;
More information about the Cygwin-cvs
mailing list