golang: Remove old, unused compilers
This commit is contained in:
parent
88b1d7e5d9
commit
e27567cff1
@ -1,95 +0,0 @@
|
||||
{ stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata}:
|
||||
|
||||
let
|
||||
loader386 = "${glibc}/lib/ld-linux.so.2";
|
||||
loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
|
||||
loaderArm = "${glibc}/lib/ld-linux.so.3";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "go-1.0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://go.googlecode.com/files/go1.0.3.src.tar.gz;
|
||||
sha256 = "1pz31az3icwqfqfy3avms05jnqr0qrbrx9yqsclkdwbjs4rkbfkz";
|
||||
};
|
||||
|
||||
buildInputs = [ bison glibc bash makeWrapper ];
|
||||
|
||||
# I'm not sure what go wants from its 'src', but the go installation manual
|
||||
# describes an installation keeping the src.
|
||||
preUnpack = ''
|
||||
mkdir -p $out/share
|
||||
cd $out/share
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
cd ..
|
||||
if [ ! -d go ]; then
|
||||
mv * go
|
||||
fi
|
||||
cd go
|
||||
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
# !!! substituteInPlace does not seems to be effective.
|
||||
sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c
|
||||
sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c
|
||||
sed -i 's,/lib64/ld-linux-x86-64.so.3,${loaderArm},' src/cmd/5l/asm.c
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go
|
||||
|
||||
#sed -i -e 's,/bin/cat,${coreutils}/bin/cat,' \
|
||||
# -e 's,/bin/echo,${coreutils}/bin/echo,' \
|
||||
# src/pkg/exec/exec_test.go
|
||||
|
||||
# Disabling the 'os/http/net' tests (they want files not available in
|
||||
# chroot builds)
|
||||
rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go}
|
||||
# The os test wants to read files in an existing path. Just it don't be /usr/bin.
|
||||
sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go
|
||||
sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go
|
||||
# Disable the hostname test
|
||||
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
|
||||
'';
|
||||
|
||||
patches = [ ./cacert.patch ./1_0-opt-error.patch ./1_0-gcc-bug.patch ];
|
||||
|
||||
GOOS = "linux";
|
||||
GOARCH = if stdenv.system == "i686-linux" then "386"
|
||||
else if stdenv.system == "x86_64-linux" then "amd64"
|
||||
else if stdenv.system == "armv5tel-linux" then "arm"
|
||||
else throw "Unsupported system";
|
||||
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
./all.bash
|
||||
cd -
|
||||
|
||||
# Wrap the tools to define the location of the
|
||||
# libraries.
|
||||
for a in go gofmt godoc; do
|
||||
wrapProgram "$out/bin/$a" \
|
||||
--set "GOROOT" $out/share/go \
|
||||
${if stdenv.system == "armv5tel-linux" then "--set GOARM $GOARM" else ""}
|
||||
done
|
||||
|
||||
# Copy the emacs configuration for Go files.
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
branch = "1.0";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = "BSD";
|
||||
maintainers = with stdenv.lib.maintainers; [ pierron viric ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
{ stdenv, fetchurl, bison, bash, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "go-1.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://go.googlecode.com/files/go1.1.2.src.tar.gz;
|
||||
sha256 = "0w7bchhb4b053az3wjp6z342rs9lp9nxf4w2mnfd1b89d6sb7izz";
|
||||
};
|
||||
|
||||
buildInputs = [ bison bash makeWrapper ];
|
||||
|
||||
preUnpack = ''
|
||||
mkdir -p $out/share
|
||||
cd $out/share
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
cd ..
|
||||
if [ ! -d go ]; then
|
||||
mv * go
|
||||
fi
|
||||
cd go
|
||||
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go}
|
||||
# The os test wants to read files in an existing path. Just it don't be /usr/bin.
|
||||
sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go
|
||||
sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go
|
||||
# Disable some tests
|
||||
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
|
||||
sed -i '/TestShutdownUnix/areturn' src/pkg/net/net_test.go
|
||||
|
||||
'';
|
||||
|
||||
# Unfortunately we have to use Mac OS X's own GCC
|
||||
preBuild = ''
|
||||
export PATH=/usr/bin:$PATH
|
||||
'';
|
||||
|
||||
#patches = [ ./cacert.patch ];
|
||||
|
||||
GOOS = "darwin";
|
||||
GOARCH = if stdenv.system == "x86_64-darwin" then "amd64" else "386";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
|
||||
# CGO is broken on Maverick. See: http://code.google.com/p/go/issues/detail?id=5926
|
||||
# Reevaluate once go 1.1.3 is out
|
||||
export CGO_ENABLED=0
|
||||
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
./all.bash
|
||||
cd -
|
||||
|
||||
# Wrap the tools to define the location of the
|
||||
# libraries.
|
||||
for a in go gofmt godoc; do
|
||||
wrapProgram "$out/bin/$a" \
|
||||
--set "GOROOT" $out/share/go
|
||||
done
|
||||
|
||||
# Copy the emacs configuration for Go files.
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ zef ];
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
{ stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc
|
||||
, removeGodocExternals ? false }:
|
||||
|
||||
let
|
||||
loader386 = "${glibc}/lib/ld-linux.so.2";
|
||||
loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
|
||||
loaderArm = "${glibc}/lib/ld-linux.so.3";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "go-1.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://go.googlecode.com/files/go1.1.2.src.tar.gz;
|
||||
sha256 = "0w7bchhb4b053az3wjp6z342rs9lp9nxf4w2mnfd1b89d6sb7izz";
|
||||
};
|
||||
|
||||
buildInputs = [ bison glibc bash makeWrapper ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
|
||||
|
||||
# I'm not sure what go wants from its 'src', but the go installation manual
|
||||
# describes an installation keeping the src.
|
||||
preUnpack = ''
|
||||
mkdir -p $out/share
|
||||
cd $out/share
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
cd ..
|
||||
if [ ! -d go ]; then
|
||||
mv * go
|
||||
fi
|
||||
cd go
|
||||
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
# !!! substituteInPlace does not seems to be effective.
|
||||
sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c
|
||||
sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c
|
||||
sed -i 's,/lib64/ld-linux-x86-64.so.3,${loaderArm},' src/cmd/5l/asm.c
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go
|
||||
sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go
|
||||
|
||||
#sed -i -e 's,/bin/cat,${coreutils}/bin/cat,' \
|
||||
# -e 's,/bin/echo,${coreutils}/bin/echo,' \
|
||||
# src/pkg/exec/exec_test.go
|
||||
|
||||
# Disabling the 'os/http/net' tests (they want files not available in
|
||||
# chroot builds)
|
||||
rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go}
|
||||
# The os test wants to read files in an existing path. Just it don't be /usr/bin.
|
||||
sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go
|
||||
sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go
|
||||
# Disable the hostname test
|
||||
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
|
||||
# ParseInLocation fails the test
|
||||
sed -i '/TestParseInSydney/areturn' src/pkg/time/time_test.go
|
||||
'' + stdenv.lib.optionalString removeGodocExternals ''
|
||||
sed -i -e '/googleapi/d' -e '/javascript">$/,+6d' lib/godoc/godoc.html
|
||||
'';
|
||||
|
||||
patches = [ ./cacert.patch ];
|
||||
|
||||
GOOS = "linux";
|
||||
GOARCH = if stdenv.system == "i686-linux" then "386"
|
||||
else if stdenv.system == "x86_64-linux" then "amd64"
|
||||
else if stdenv.system == "armv5tel-linux" then "arm"
|
||||
else throw "Unsupported system";
|
||||
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
./all.bash
|
||||
cd -
|
||||
|
||||
# Wrap the tools to define the location of the
|
||||
# libraries.
|
||||
for a in go gofmt godoc; do
|
||||
wrapProgram "$out/bin/$a" \
|
||||
--set "GOROOT" $out/share/go \
|
||||
${if stdenv.system == "armv5tel-linux" then "--set GOARM $GOARM" else ""}
|
||||
done
|
||||
|
||||
# Copy the emacs configuration for Go files.
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
branch = "1.1";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ pierron viric ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
{ stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc
|
||||
, libgpgerror }:
|
||||
|
||||
let
|
||||
loader386 = "${glibc}/lib/ld-linux.so.2";
|
||||
loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
|
||||
loaderArm = "${glibc}/lib/ld-linux.so.3";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "go-1.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = https://storage.googleapis.com/golang/go1.2.2.src.tar.gz;
|
||||
sha1 = "3ce0ac4db434fc1546fec074841ff40dc48c1167";
|
||||
};
|
||||
|
||||
buildInputs = [ bison glibc bash makeWrapper libgpgerror ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
|
||||
|
||||
# I'm not sure what go wants from its 'src', but the go installation manual
|
||||
# describes an installation keeping the src.
|
||||
preUnpack = ''
|
||||
mkdir -p $out/share
|
||||
cd $out/share
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
cd ..
|
||||
if [ ! -d go ]; then
|
||||
mv * go
|
||||
fi
|
||||
cd go
|
||||
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
# !!! substituteInPlace does not seems to be effective.
|
||||
sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c
|
||||
sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c
|
||||
sed -i 's,/lib64/ld-linux-x86-64.so.3,${loaderArm},' src/cmd/5l/asm.c
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go
|
||||
sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go
|
||||
|
||||
#sed -i -e 's,/bin/cat,${coreutils}/bin/cat,' \
|
||||
# -e 's,/bin/echo,${coreutils}/bin/echo,' \
|
||||
# src/pkg/exec/exec_test.go
|
||||
|
||||
# Disabling the 'os/http/net' tests (they want files not available in
|
||||
# chroot builds)
|
||||
rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go}
|
||||
# The os test wants to read files in an existing path. Just it don't be /usr/bin.
|
||||
sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go
|
||||
sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go
|
||||
# Disable the hostname test
|
||||
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
|
||||
# ParseInLocation fails the test
|
||||
sed -i '/TestParseInSydney/areturn' src/pkg/time/time_test.go
|
||||
'';
|
||||
|
||||
patches = [ ./cacert-1.2.patch ];
|
||||
|
||||
GOOS = "linux";
|
||||
GOARCH = if stdenv.system == "i686-linux" then "386"
|
||||
else if stdenv.system == "x86_64-linux" then "amd64"
|
||||
else if stdenv.system == "armv5tel-linux" then "arm"
|
||||
else throw "Unsupported system";
|
||||
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
|
||||
GO386 = 387; # from Arch: don't assume sse2 on i686
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
./all.bash
|
||||
cd -
|
||||
|
||||
# Copy the emacs configuration for Go files.
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
branch = "1.2";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ pierron viric ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
{ stdenv, lib, fetchurl, fetchhg, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl }:
|
||||
|
||||
let
|
||||
loader386 = "${glibc}/lib/ld-linux.so.2";
|
||||
loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
|
||||
loaderArm = "${glibc}/lib/ld-linux.so.3";
|
||||
srcs = {
|
||||
golang = fetchurl {
|
||||
url = https://storage.googleapis.com/golang/go1.3.3.src.tar.gz;
|
||||
sha1 = "b54b7deb7b7afe9f5d9a3f5dd830c7dede35393a";
|
||||
};
|
||||
tools = fetchhg {
|
||||
url = https://code.google.com/p/go.tools/;
|
||||
rev = "e1c276c4e679";
|
||||
sha256 = "0x62njflwkd99i2ixbksg6mjppl1wfg86f0g3swn350l1h0xzp76";
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "go-1.3.3";
|
||||
|
||||
src = srcs.golang;
|
||||
|
||||
# perl is used for testing go vet
|
||||
buildInputs = [ bison bash makeWrapper perl ] ++ lib.optionals stdenv.isLinux [ glibc ] ;
|
||||
|
||||
# I'm not sure what go wants from its 'src', but the go installation manual
|
||||
# describes an installation keeping the src.
|
||||
preUnpack = ''
|
||||
mkdir -p $out/share
|
||||
cd $out/share
|
||||
'';
|
||||
postUnpack = ''
|
||||
mkdir -p $out/share/go/src/pkg/code.google.com/p/
|
||||
cp -rv --no-preserve=mode,ownership ${srcs.tools} $out/share/go/src/pkg/code.google.com/p/go.tools
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
# Ensure that the source directory is named go
|
||||
cd ..
|
||||
if [ ! -d go ]; then
|
||||
mv * go
|
||||
fi
|
||||
cd go
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
|
||||
# Disabling the 'os/http/net' tests (they want files not available in
|
||||
# chroot builds)
|
||||
rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go}
|
||||
# !!! substituteInPlace does not seems to be effective.
|
||||
# The os test wants to read files in an existing path. Just don't let it be /usr/bin.
|
||||
sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go
|
||||
sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go
|
||||
# Disable the unix socket test
|
||||
sed -i '/TestShutdownUnix/areturn' src/pkg/net/net_test.go
|
||||
# Disable the hostname test
|
||||
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
|
||||
sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go
|
||||
# ParseInLocation fails the test
|
||||
sed -i '/TestParseInSydney/areturn' src/pkg/time/format_test.go
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go
|
||||
sed -i 's,/lib/ld-linux.so.3,${loaderArm},' src/cmd/5l/asm.c
|
||||
sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c
|
||||
sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c
|
||||
'';
|
||||
|
||||
patches = [ ./cacert-1.2.patch ./R_386_GOT32.patch ];
|
||||
|
||||
GOOS = if stdenv.isDarwin then "darwin" else "linux";
|
||||
GOARCH = if stdenv.isDarwin then "amd64"
|
||||
else if stdenv.system == "i686-linux" then "386"
|
||||
else if stdenv.system == "x86_64-linux" then "amd64"
|
||||
else if stdenv.system == "armv5tel-linux" then "arm"
|
||||
else throw "Unsupported system";
|
||||
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
|
||||
GO386 = 387; # from Arch: don't assume sse2 on i686
|
||||
CGO_ENABLED = if stdenv.isDarwin then 0 else 1;
|
||||
|
||||
installPhase = ''
|
||||
export CC=cc
|
||||
mkdir -p "$out/bin"
|
||||
unset GOPATH
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
./all.bash
|
||||
cd -
|
||||
|
||||
# Build extra tooling
|
||||
# TODO: Fix godoc tests
|
||||
TOOL_ROOT=code.google.com/p/go.tools/cmd
|
||||
go install -v $TOOL_ROOT/cover $TOOL_ROOT/vet $TOOL_ROOT/godoc
|
||||
go test -v $TOOL_ROOT/cover $TOOL_ROOT/vet # $TOOL_ROOT/godoc
|
||||
|
||||
# Copy the emacs configuration for Go files.
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
branch = "1.3";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
./cacert-1.4.patch
|
||||
./remove-tools.patch
|
||||
./remove-tools-1.4.patch
|
||||
];
|
||||
|
||||
GOOS = if stdenv.isDarwin then "darwin" else "linux";
|
||||
|
@ -1,19 +0,0 @@
|
||||
http://code.google.com/p/go/source/detail?r=8b13b2ec6b18
|
||||
--- a/src/cmd/cgo/gcc.go 2014-07-02 12:00:12.171796197 +0200
|
||||
+++ b/src/cmd/cgo/gcc.go 2014-07-02 12:01:57.844472754 +0200
|
||||
@@ -840,6 +840,15 @@
|
||||
func (p *Package) gccErrors(stdin []byte) string {
|
||||
// TODO(rsc): require failure
|
||||
args := p.gccCmd()
|
||||
+
|
||||
+ // GCC 4.8.0 has a bug: it sometimes does not apply
|
||||
+ // -Wunused-value to values that are macros defined in system
|
||||
+ // headers. See issue 5118. Adding -Wsystem-headers avoids
|
||||
+ // that problem. This will produce additional errors, but it
|
||||
+ // doesn't matter because we will ignore all errors that are
|
||||
+ // not marked for the cgo-test file.
|
||||
+ args = append(args, "-Wsystem-headers")
|
||||
+
|
||||
if *debugGcc {
|
||||
fmt.Fprintf(os.Stderr, "$ %s <<EOF\n", strings.Join(args, " "))
|
||||
os.Stderr.Write(stdin)
|
@ -1,12 +0,0 @@
|
||||
https://code.google.com/p/go-wiki/wiki/OlderVersions
|
||||
--- a/src/cmd/cc/funct.c 2014-07-02 11:54:42.230663598 +0200
|
||||
+++ b/src/cmd/cc/funct.c 2014-07-02 11:55:01.653790128 +0200
|
||||
@@ -269,7 +269,7 @@
|
||||
goto bad;
|
||||
|
||||
f = alloc(sizeof(*f));
|
||||
- for(o=0; o<sizeof(f->sym); o++)
|
||||
+ for(o=0; o<nelem(f->sym); o++)
|
||||
f->sym[o] = S;
|
||||
|
||||
t->funct = f;
|
@ -1,46 +0,0 @@
|
||||
From 609d996fac7f68b34032572b7bde627f658b95f2 Mon Sep 17 00:00:00 2001
|
||||
From: Russ Cox <rsc@golang.org>
|
||||
Date: Mon, 6 Oct 2014 14:17:48 -0400
|
||||
Subject: [PATCH] cmd/8l: accept R_386_GOT32 in push instruction
|
||||
|
||||
Fixes #8382.
|
||||
|
||||
LGTM=iant
|
||||
R=iant
|
||||
CC=golang-codereviews
|
||||
https://golang.org/cl/149540045
|
||||
---
|
||||
src/cmd/8l/asm.c | 18 +++++++++++++-----
|
||||
1 file changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c
|
||||
index c135dce..98c0424 100644
|
||||
--- a/src/cmd/8l/asm.c
|
||||
+++ b/src/cmd/8l/asm.c
|
||||
@@ -117,13 +117,21 @@ adddynrel(LSym *s, Reloc *r)
|
||||
case 256 + R_386_GOT32:
|
||||
if(targ->type != SDYNIMPORT) {
|
||||
// have symbol
|
||||
- // turn MOVL of GOT entry into LEAL of symbol itself
|
||||
- if(r->off < 2 || s->p[r->off-2] != 0x8b) {
|
||||
- diag("unexpected GOT reloc for non-dynamic symbol %s", targ->name);
|
||||
+ if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
|
||||
+ // turn MOVL of GOT entry into LEAL of symbol address, relative to GOT.
|
||||
+ s->p[r->off-2] = 0x8d;
|
||||
+ r->type = R_GOTOFF;
|
||||
return;
|
||||
}
|
||||
- s->p[r->off-2] = 0x8d;
|
||||
- r->type = R_GOTOFF;
|
||||
+ if(r->off >= 2 && s->p[r->off-2] == 0xff && s->p[r->off-1] == 0xb3) {
|
||||
+ // turn PUSHL of GOT entry into PUSHL of symbol itself.
|
||||
+ // use unnecessary SS prefix to keep instruction same length.
|
||||
+ s->p[r->off-2] = 0x36;
|
||||
+ s->p[r->off-1] = 0x68;
|
||||
+ r->type = R_ADDR;
|
||||
+ return;
|
||||
+ }
|
||||
+ diag("unexpected GOT reloc for non-dynamic symbol %s", targ->name);
|
||||
return;
|
||||
}
|
||||
addgotsym(ctxt, targ);
|
@ -1,15 +0,0 @@
|
||||
Go comes with hardcoded cacert. We add the usual in NixOS,
|
||||
for easier NixOS life.
|
||||
|
||||
diff --git a/src/pkg/crypto/x509/root_unix.go b/src/pkg/crypto/x509/root_unix.go
|
||||
index 76e79f4..6ef1dd3 100644
|
||||
--- a/src/pkg/crypto/x509/root_unix.go
|
||||
+++ b/src/pkg/crypto/x509/root_unix.go
|
||||
@@ -15,6 +15,7 @@ var certFiles = []string{
|
||||
"/etc/ssl/ca-bundle.pem", // OpenSUSE
|
||||
"/etc/ssl/cert.pem", // OpenBSD
|
||||
"/usr/local/share/certs/ca-root-nss.crt", // FreeBSD/DragonFly
|
||||
+ "/etc/ssl/certs/ca-bundle.crt", // NixOS
|
||||
}
|
||||
|
||||
func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) {
|
@ -1,15 +0,0 @@
|
||||
Go comes with hardcoded cacert. We add the usual in NixOS,
|
||||
for easier NixOS life.
|
||||
|
||||
diff --git a/src/pkg/crypto/x509/root_unix.go b/src/pkg/crypto/x509/root_unix.go
|
||||
index 76e79f4..6ef1dd3 100644
|
||||
--- a/src/pkg/crypto/x509/root_unix.go
|
||||
+++ b/src/pkg/crypto/x509/root_unix.go
|
||||
@@ -15,6 +15,7 @@ var certFiles = []string{
|
||||
"/etc/ssl/ca-bundle.pem", // OpenSUSE
|
||||
"/etc/ssl/cert.pem", // OpenBSD
|
||||
"/usr/local/share/certs/ca-root-nss.crt", // FreeBSD
|
||||
+ "/etc/ssl/certs/ca-bundle.crt", // NixOS
|
||||
}
|
||||
|
||||
func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) {
|
@ -1,28 +0,0 @@
|
||||
{ lib, goPackages, fetchFromGitHub }:
|
||||
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
rev = "c7329055e2aeb253a947e5cc876586ff4ca19199";
|
||||
name = "gox-${lib.strings.substring 0 7 rev}";
|
||||
goPackagePath = "github.com/mitchellh/gox";
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "mitchellh";
|
||||
repo = "gox";
|
||||
sha256 = "0zhb88jjxqn3sdc4bpzvajqvgi9igp5gk03q12gaksaxhy2wl4jy";
|
||||
};
|
||||
|
||||
buildInputs = [ iochan ];
|
||||
|
||||
propagatedBuildInputs = [ go ];
|
||||
|
||||
dontInstallSrc = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple, no-frills tool for Go cross compilation that behaves a lot like standard go build";
|
||||
homepage = https://github.com/mitchellh/gox;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -4039,18 +4039,6 @@ let
|
||||
|
||||
dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix { inherit stdenv fetchNuGet; });
|
||||
|
||||
go_1_0 = callPackage ../development/compilers/go/1.0.nix { };
|
||||
|
||||
go_1_1 =
|
||||
if stdenv.isDarwin then
|
||||
callPackage ../development/compilers/go/1.1-darwin.nix { }
|
||||
else
|
||||
callPackage ../development/compilers/go/1.1.nix { };
|
||||
|
||||
go_1_2 = callPackage ../development/compilers/go/1.2.nix { };
|
||||
|
||||
go_1_3 = callPackage ../development/compilers/go/1.3.nix { };
|
||||
|
||||
go_1_4 = callPackage ../development/compilers/go/1.4.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
@ -4059,7 +4047,7 @@ let
|
||||
|
||||
go-repo-root = callPackage ../development/tools/misc/go-repo-root { };
|
||||
|
||||
gox = callPackage ../development/compilers/go/gox.nix { };
|
||||
gox = goPackages.gox;
|
||||
|
||||
gprolog = callPackage ../development/compilers/gprolog { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user