From 66ef37d2606b2ff633445ac3e852feaf6febe6ca Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 14 Nov 2009 23:39:53 +0000 Subject: [PATCH] * Fix "cgo" binary be defining LC_ALL=C inside the binary. svn path=/nixpkgs/trunk/; revision=18350 --- .../cgo-set-local-to-match-gcc-error-messages.patch | 13 +++++++++++++ pkgs/development/compilers/go/default.nix | 4 +--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/compilers/go/cgo-set-local-to-match-gcc-error-messages.patch diff --git a/pkgs/development/compilers/go/cgo-set-local-to-match-gcc-error-messages.patch b/pkgs/development/compilers/go/cgo-set-local-to-match-gcc-error-messages.patch new file mode 100644 index 000000000000..c0da4541a67d --- /dev/null +++ b/pkgs/development/compilers/go/cgo-set-local-to-match-gcc-error-messages.patch @@ -0,0 +1,13 @@ +diff -r 21cae7efdcc6 src/cmd/cgo/main.go +--- a/src/cmd/cgo/main.go Sat Nov 14 12:23:24 2009 -0800 ++++ b/src/cmd/cgo/main.go Sun Nov 15 00:00:09 2009 +0100 +@@ -52,6 +52,9 @@ + fatal("unknown architecture %s", arch) + } + ++ // Define the language of gcc error messages. ++ os.Setenv("LC_ALL", "C"); ++ + p := openProg(input); + for _, cref := range p.Crefs { + // Convert C.ulong to C.unsigned long, etc. diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix index 7da02f121b3c..ebec69535e1e 100644 --- a/pkgs/development/compilers/go/default.nix +++ b/pkgs/development/compilers/go/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation { patches = [ ./disable-system-dependent-tests.patch ./pkg-log-test-accept-period-in-file-path.patch + ./cgo-set-local-to-match-gcc-error-messages.patch ]; prePatch = '' @@ -33,9 +34,6 @@ stdenv.mkDerivation { GOOS = "linux"; GOARCH = "386"; - # The go-c interface depends on the error output of GCC. - LC_ALL = "C"; - installPhase = '' ensureDir "$out" ensureDir "$out/bin"