From e3682a9e962bf5d662817d62624b181a784d9b58 Mon Sep 17 00:00:00 2001 From: virtbuilder_pel7ppc64bebuilder0 Date: Thu, 28 May 2020 01:09:02 +0200 Subject: [PATCH] podman ppc64 big endian changes cgo&no-pie Signed-off-by: virtbuilder_pel7ppc64bebuilder0 --- SPECS/podman.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SPECS/podman.spec b/SPECS/podman.spec index 4372df4..e891c05 100644 --- a/SPECS/podman.spec +++ b/SPECS/podman.spec @@ -1,7 +1,12 @@ %global _find_debuginfo_dwz_opts %{nil} %global _dwz_low_mem_die_limit 0 + %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 -x %{?**}; +%ifarch ppc64 +# certain options do not exist on ppc64 big endian +%define gobuild(o:) GO111MODULE=off go build -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 -x %{?**}; +%endif %define gogenerate go generate %define provider github @@ -345,11 +350,17 @@ ln -s vendor src # build %%{name} export BUILDTAGS="systemd varlink seccomp exclude_graphdriver_devicemapper $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) $(hack/libdm_tag.sh) $(hack/ostree_tag.sh) $(hack/selinux_tag.sh)" +%ifarch ppc64 +export CGO_ENABLED=1 +%endif %gobuild -o bin/%{name} %{import_path}/cmd/%{name} # build %%{name}-remote export BUILDTAGS+=" remoteclient" %gobuild -o bin/%{name}-remote %{import_path}/cmd/%{name} +%ifarch ppc64 +unset CGO_ENABLED +%endif %install