diff --git a/go-compilers.spec b/go-compilers.spec index 5c97914547bea9e17c5adc6981714f4e62d4e65c..acb41c5fa1282dfe7554e8466ebec20b1328dc86 100644 --- a/go-compilers.spec +++ b/go-compilers.spec @@ -1,13 +1,14 @@ +%define anolis_release .0.2 Name: go-compilers Version: 1 -Release: 20%{?dist} +Release: 20%{anolis_release}%{?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} +%global go_arches x86_64 aarch64 ppc64le s390x %{ix86} loongarch64 ExclusiveArch: %{go_arches} # for install, cut and rm commands @@ -49,6 +50,12 @@ install -m 644 -D %{SOURCE0} %{buildroot}%{_rpmconfigdir}/macros.d/macros.golang %endif %changelog +* Thu Nov 18 2021 Liwei Ge - 1-20.0.2 +- Disable pie buildmode for loongarch64 + +* Tue Nov 16 2021 Liwei Ge - 1-20.0.1 +- Support loongarch64 platform + * Fri Dec 21 2018 Tom Stellard - 1-20 - Add -compressdwarf=false to ldflags diff --git a/macros.golang-compiler b/macros.golang-compiler index 689e6d1672aa268b74e7e574fe1f3944a622d1ca..2a1f6d7b5fe087d58198832afc5adb2eb2bd6452 100644 --- a/macros.golang-compiler +++ b/macros.golang-compiler @@ -8,7 +8,7 @@ # Define commands for building # BUILD_ID can be generated for golang build no matter of debuginfo %gobuild(o:) \ -%ifnarch ppc64 \ +%ifnarch ppc64 loongarch64\ 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 %{?**};\