Browse Source

buildah ppc64 build changes cgo&nopie

Signed-off-by: virtbuilder_pel7ppc64bebuilder0 <virtbuilder@powerel.org>
master
virtbuilder_pel7ppc64bebuilder0 5 years ago
parent
commit
9adc496f9c
  1. 10
      SPECS/buildah.spec

10
SPECS/buildah.spec

@ -3,6 +3,9 @@ @@ -3,6 +3,9 @@
%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
%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 provider github
%define provider_tld com
%define project containers
@ -85,10 +88,15 @@ mv vendor src @@ -85,10 +88,15 @@ mv vendor src
export GOPATH=$(pwd)/_build:$(pwd)
export BUILDTAGS='seccomp selinux'
export GO111MODULE=off
%ifarch ppc64
export CGO_ENABLED=1
%endif
%gobuild -o %{name} %{import_path}/cmd/%{name}
%gobuild -o imgtype %{import_path}/tests/imgtype
GOMD2MAN=go-md2man %{__make} -C docs

%ifarch ppc64
unset CGO_ENABLED
%endif

%install
export GOPATH=$(pwd)/_build:$(pwd):%{gopath}

Loading…
Cancel
Save