+++ /dev/null
---- golang-1.4.2/src/cmd/cgo/gcc.go.orig 2015-02-18 05:38:34.000000000 +0100
-+++ golang-1.4.2/src/cmd/cgo/gcc.go 2015-06-28 11:34:02.057120270 +0200
-@@ -764,6 +764,7 @@
- "-gdwarf-2", // generate DWARF v2 debugging symbols
- "-c", // do not link
- "-xc", // input language is C
-+ "-Wa,--nocompress-debug-sections", // do not compress debug sections
- )
- if strings.Contains(c[0], "clang") {
- c = append(c,
---- golang-1.4.3/src/cmd/ld/ldelf.c.orig 2015-09-23 06:37:36.000000000 +0200
-+++ golang-1.4.3/src/cmd/ld/ldelf.c 2016-02-02 20:45:59.791651383 +0100
-@@ -894,6 +894,10 @@
- case R('8', R_386_PLT32):
- case R('8', R_386_GOTOFF):
- case R('8', R_386_GOTPC):
-+#ifndef R_386_GOT32X
-+#define R_386_GOT32X 43
-+#endif
-+ case R('8', R_386_GOT32X):
- *siz = 4;
- break;
- case R('6', R_X86_64_64):
---- golang-1.4.3/src/cmd/8l/asm.c.orig 2015-09-23 06:37:36.000000000 +0200
-+++ golang-1.4.3/src/cmd/8l/asm.c 2016-02-02 21:07:25.341597434 +0100
-@@ -114,7 +114,11 @@
- }
- return;
-
-+#ifndef R_386_GOT32X
-+#define R_386_GOT32X 43
-+#endif
- case 256 + R_386_GOT32:
-+ case 256 + R_386_GOT32X:
- if(targ->type != SDYNIMPORT) {
- // have symbol
- if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
# - fix CC containing spaces (ccache)
# - check if hg use at build time can be dropped
# - build all target archs, subpackage them: http://golang.org/doc/install/source#environment
+# or choose only useful crosscompilers?
# - subpackage -src files?
-# - subpackage for "shared"?
# Conditional build:
%bcond_without verbose # verbose build (V=1)
%bcond_without tests # build without tests [nop actually]
%bcond_without shared # Build golang shared objects for stdlib
-%bcond_without ext_linker # Build golang using external/internal(close to cgo disabled) linking.
-%bcond_without cgo
+%bcond_without ext_linker # Build golang using external/internal (close to cgo disabled) linking
+%bcond_without cgo # cgo (importing C libraries) support
%ifnarch %{ix86} %{x8664} %{arm} ppc64le aarch64
%undefine with_shared
Source0: https://storage.googleapis.com/golang/go%{version}.src.tar.gz
# Source0-md5: bf3fce6ccaadd310159c9e874220e2a2
Patch0: ca-certs.patch
-Patch1: %{name}-binutils.patch
Patch2: %{name}-1.2-verbose-build.patch
Patch4: go1.5beta1-disable-TestGdbPython.patch
Patch5: go1.5-zoneinfo_testing_only.patch
%endif
Requires: ca-certificates
Conflicts: gcc-go
-ExclusiveArch: %{ix86} %{x8664} %{arm}
+ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 mips64 ppc64 ppc64le
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define no_install_post_strip 1
%ifarch %{x8664}
%define GOARCH amd64
%endif
+%ifarch %{arm}
+%define GOARCH arm
+%endif
+%ifarch aarch64
+%define GOARCH arm64
+%endif
+%ifarch mips64
+%define GOARCH mips64x
+%endif
+%ifarch ppc64 ppc64le
+%define GOARCH %{_arch}
+%endif
%description
Go is an open source programming environment that makes it easy to
%package shared
Summary: Golang shared object libraries
+Summary(pl.UTF-8): Biblioteki obiektów współdzielonych dla języka Go
Group: Libraries
Requires: %{name} = %{version}-%{release}
%description shared
-Golang shared object libraries
+Golang shared object libraries.
+
+%description shared -l pl.UTF-8
+Biblioteki obiektów współdzielonych dla języka Go.
%package doc
-Summary: Manual for go
-Summary(fr.UTF-8): Documentation pour go
-Summary(it.UTF-8): Documentazione di go
-Summary(pl.UTF-8): Podręcznik dla go
+Summary: Documentation for Go language
+Summary(fr.UTF-8): Documentation pour Go
+Summary(it.UTF-8): Documentazione di Go
+Summary(pl.UTF-8): Dokumentacja do języka Go
Group: Documentation
%if "%{_rpmversion}" >= "5"
BuildArch: noarch
%endif
%description doc
-Documentation for go.
+Documentation for Go language.
%description doc -l fr.UTF-8
-Documentation pour go.
+Documentation pour Go.
%description doc -l it.UTF-8
-Documentazione di go.
+Documentazione di Go.
%description doc -l pl.UTF-8
-Dokumentacja do go.
+Dokumentacja do języka Go.
%prep
%setup -qc
-mv go/* .
+%{__mv} go/* .
%patch0 -p1
-#%patch1 -p1 seems outdated, compiler rewritten in .go instead of .c
%patch2 -p1
%patch4 -p1
%patch5 -p1