Browse Source

podman ppc64 big endian changes cgo&no-pie

Signed-off-by: virtbuilder_pel7ppc64bebuilder0 <virtbuilder@powerel.org>
master
virtbuilder_pel7ppc64bebuilder0 4 years ago
parent
commit
e3682a9e96
  1. 11
      SPECS/podman.spec

11
SPECS/podman.spec

@ -1,7 +1,12 @@
%global _find_debuginfo_dwz_opts %{nil} %global _find_debuginfo_dwz_opts %{nil}
%global _dwz_low_mem_die_limit 0 %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 %{?**}; %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 gogenerate go generate


%define provider github %define provider github
@ -345,11 +350,17 @@ ln -s vendor src


# build %%{name} # 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)" 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} %gobuild -o bin/%{name} %{import_path}/cmd/%{name}


# build %%{name}-remote # build %%{name}-remote
export BUILDTAGS+=" remoteclient" export BUILDTAGS+=" remoteclient"
%gobuild -o bin/%{name}-remote %{import_path}/cmd/%{name} %gobuild -o bin/%{name}-remote %{import_path}/cmd/%{name}
%ifarch ppc64
unset CGO_ENABLED
%endif




%install %install

Loading…
Cancel
Save