From dd868e077f822e4f5542daf36fd0084a70997ef8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 27 Jul 2021 16:35:01 +0000 Subject: [PATCH] import go-compilers-1-20.el8 --- .gitignore | 0 .go-compilers.metadata | 0 SOURCES/macros.golang-compiler | 19 ++++++ SPECS/go-compilers.spec | 120 +++++++++++++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 .gitignore create mode 100644 .go-compilers.metadata create mode 100644 SOURCES/macros.golang-compiler create mode 100644 SPECS/go-compilers.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.go-compilers.metadata b/.go-compilers.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/macros.golang-compiler b/SOURCES/macros.golang-compiler new file mode 100644 index 0000000..689e6d1 --- /dev/null +++ b/SOURCES/macros.golang-compiler @@ -0,0 +1,19 @@ +# Copyright (c) 2015 Jakub Cajka , Jan Chaloupka +# This file is distributed under the terms of GNU GPL license version 3, or +# any later version. + +# This file contains macros for building projects in golang for packages +# with golang compiler or gcc-go compiler based on an architecture. + +# Define commands for building +# BUILD_ID can be generated for golang build no matter of debuginfo +%gobuild(o:) \ +%ifnarch ppc64 \ +go build -buildmode pie -compiler gc -tags=rpm_crashtraceback -ldflags "-compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};\ +%else \ +go build -compiler gc -tags=rpm_crashtraceback -ldflags "-compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};\ +%endif \ + +# Define commands for testing +%gotest() go test -compiler gc -ldflags "${LDFLAGS:-}" %{?**}; + diff --git a/SPECS/go-compilers.spec b/SPECS/go-compilers.spec new file mode 100644 index 0000000..5c97914 --- /dev/null +++ b/SPECS/go-compilers.spec @@ -0,0 +1,120 @@ +Name: go-compilers +Version: 1 +Release: 20%{?dist} +Summary: Go language compilers for various architectures +Group: Development/Tools +License: GPLv3+ +Source0: macros.golang-compiler + +# FIXME: This is defined in go-srpm-macros why do we need it here? +%global go_arches x86_64 aarch64 ppc64le s390x %{ix86} +ExclusiveArch: %{go_arches} + +# for install, cut and rm commands +BuildRequires: coreutils +# for go specific macros +BuildRequires: go-srpm-macros + +%description +The package provides correct golang language compiler +base on an architectures. + +%ifarch %{golang_arches} +%package golang-compiler +Summary: compiler for golang + +Requires: golang + +Provides: compiler(go-compiler) = 2 +Provides: compiler(golang) + +%description golang-compiler +Compiler for golang. +%endif + +%prep +# nothing to prep, just for hooks + +%build +# nothing to build, just for hooks + +%install +%ifarch %{golang_arches} +install -m 644 -D %{SOURCE0} %{buildroot}%{_rpmconfigdir}/macros.d/macros.golang-compiler +%endif + +%ifarch %{golang_arches} +%files golang-compiler +%{_rpmconfigdir}/macros.d/macros.golang-compiler +%endif + +%changelog +* Fri Dec 21 2018 Tom Stellard - 1-20 +- Add -compressdwarf=false to ldflags + +* Mon Nov 19 2018 Derek Parker - 1-19 +- Update to remove SCL +- Resolves: rhbz#1642080 + +* Mon Aug 6 2018 Derek Parker - 1-18 +- Update to use new golang SCL package + +* Wed Jun 20 2018 Derek Parker - 1-17 +- Fix gobuild macro more, seperate for greedy arguments + +* Fri Jun 15 2018 Troy Dawson - 1-16 +- Fix gobuild macro + +* Fri Apr 13 2018 Tom Stellard - 1-15 +- Use go-toolset-7 instead of golang +- Drop gcc-go + +* Wed Aug 02 2017 Fedora Release Engineering - 1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Jul 14 2017 Jakub Čajka - 1-12 +- rebuild for ppc64 drop + +* Wed Feb 15 2017 Jakub Čajka - 1-11 +- pie is not supported on ppc64 + +* Fri Feb 10 2017 Fedora Release Engineering - 1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 27 2017 Jakub Čajka - 1-9 +- Add crash traceback level to golang as default +- Switch to PIE and push distribution ld flags +- Resolves BZ#1413529 +- Related BZ#1411242 + +* Wed Jul 20 2016 Jakub Čajka - 1-8 +- Build for s390x switch to golang +- Related: bz1357394 + +* Wed Apr 13 2016 Dan Horák - 1-7 +- fix bug in gcc-go version of gotest macro + +* Wed Feb 03 2016 Fedora Release Engineering - 1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jan 28 2016 Jakub Čajka - 1-5 +- Build for {power64} switch to golang + +* Fri Jan 22 2016 Jakub Čajka - 1-4 +- version provides to make seamless transition between compilers possible +- Resolves: bz#1300717 + +* Thu Nov 12 2015 Jakub Čajka - 1-3 +- remove version requirement from gcc-go subpackage to avoid cyclic + dependency due to macro declaration in subpackage + +* Thu Sep 10 2015 jchaloup - 1-2 +- go_compiler macro must be in go-srpm-macros package as it is used + to pick compiler(go-compiler) which would provide go_compiler + +* Tue Jul 07 2015 Jan Chaloupka - 1-1 +- Initial commit + resolves: #1258182