From 349670f550c2c685b8377ab62a1120d4eb8320c0 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Thu, 18 Nov 2021 14:44:51 +0800 Subject: [PATCH] build: support loongarch64 build Signed-off-by: Liwei Ge --- buildah.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/buildah.spec b/buildah.spec index a0cc713..16502e1 100644 --- a/buildah.spec +++ b/buildah.spec @@ -1,12 +1,17 @@ +%define anolis_release .0.1 %global _find_debuginfo_dwz_opts %{nil} %global _dwz_low_mem_die_limit 0 +%ifnarch loongarch64 +%define pie_mode -buildmode pie +%endif + %if 0%{?rhel} > 7 && ! 0%{?fedora} %define gobuild(o:) \ -go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**}; +go build %{?!pie_mode} -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**}; %else %if ! 0%{?gobuild:1} -%define gobuild(o:) GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**}; +%define gobuild(o:) GO111MODULE=off go build %{?!pie_mode} -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**}; %endif %endif @@ -17,7 +22,7 @@ go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl Name: buildah Version: 1.21.4 -Release: 2%{?dist} +Release: 2%{anolis_release}%{?dist} Summary: A command line tool used for creating OCI Images License: ASL 2.0 URL: https://%{name}.io @@ -127,6 +132,9 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} -C docs install %{_datadir}/%{name}/test %changelog +* Thu Nov 18 2021 Liwei Ge - 1.21.4-2.0.1 +- Support loongarch64 platform + * Thu Jul 29 2021 Jindrich Novy - 1.21.4-2 - update to the latest content of https://github.com/containers/buildah/tree/release-1.21 (https://github.com/containers/buildah/commit/d1e9240) -- Gitee