diff options
author | Дилян Палаузов <git-dpa@aegee.org> | 2021-09-23 14:25:02 +0200 |
---|---|---|
committer | Дилян Палаузов <git-dpa@aegee.org> | 2021-09-23 16:38:04 +0200 |
commit | ce080d25cdc941a789df8ba6c4891d702a8f18bd (patch) | |
tree | 0fdae1501b8c0949f5bcdc77ff58ff0124b135bb /Makefile | |
parent | 6b8371b1a3a7364d0527d5d87a8aa9a3d1294ac9 (diff) | |
download | podman-ce080d25cdc941a789df8ba6c4891d702a8f18bd.tar.gz podman-ce080d25cdc941a789df8ba6c4891d702a8f18bd.tar.bz2 podman-ce080d25cdc941a789df8ba6c4891d702a8f18bd.zip |
Makefile: use -ldflags/-gccgoflags depending on the go implemenatiton
Insisting on “DCO” imposes formalities, that serve self-purpose. One cannot
assume that the submitter has time or will to read texts about symbolism in
software contributions. If the system wants to see the text
nrEAUIEUAIe eanuitdnuae EAIUEAUIAIE »ℓ§444.3.72b)°»°ℓ§euaieauuae
in each commit, people will write this, or any other text, that the system wants to
see. All such text, which presence is mandated by the system, has the same value.
Signed-off-by: Дилян Палаузов <git-dpa@aegee.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -23,6 +23,7 @@ export GOPROXY=https://proxy.golang.org GO ?= go +GO_LDFLAGS:= $(shell if $(GO) version|grep -q gccgo ; then echo "-gccgoflags"; else echo "-ldflags"; fi) GOCMD = CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO) COVERAGE_PATH ?= .coverage DESTDIR ?= @@ -244,11 +245,11 @@ gofmt: ## Verify the source code gofmt .PHONY: test/checkseccomp/checkseccomp test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go) - $(GOCMD) build $(BUILDFLAGS) -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ ./test/checkseccomp + $(GOCMD) build $(BUILDFLAGS) $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ ./test/checkseccomp .PHONY: test/testvol/testvol test/testvol/testvol: .gopathok $(wildcard test/testvol/*.go) - $(GOCMD) build $(BUILDFLAGS) -ldflags '$(LDFLAGS_PODMAN)' -o $@ ./test/testvol + $(GOCMD) build $(BUILDFLAGS) $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' -o $@ ./test/testvol .PHONY: volume-plugin-test-image volume-plugin-test-img: @@ -256,7 +257,7 @@ volume-plugin-test-img: .PHONY: test/goecho/goecho test/goecho/goecho: .gopathok $(wildcard test/goecho/*.go) - $(GOCMD) build $(BUILDFLAGS) -ldflags '$(LDFLAGS_PODMAN)' -o $@ ./test/goecho + $(GOCMD) build $(BUILDFLAGS) $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' -o $@ ./test/goecho test/version/version: .gopathok version/version.go $(GO) build -o $@ ./test/version/ @@ -299,7 +300,7 @@ ifeq (,$(findstring systemd,$(BUILDTAGS))) endif $(GOCMD) build \ $(BUILDFLAGS) \ - -ldflags '$(LDFLAGS_PODMAN)' \ + $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' \ -tags "$(BUILDTAGS)" \ -o $@ ./cmd/podman @@ -310,14 +311,14 @@ $(SRCBINDIR): $(SRCBINDIR)/podman$(BINSFX): $(SRCBINDIR) .gopathok $(SOURCES) go.mod go.sum $(GOCMD) build \ $(BUILDFLAGS) \ - -ldflags '$(LDFLAGS_PODMAN)' \ + $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' \ -tags "${REMOTETAGS}" \ -o $@ ./cmd/podman $(SRCBINDIR)/podman-remote-static: $(SRCBINDIR) .gopathok $(SOURCES) go.mod go.sum $(GOCMD) build \ $(BUILDFLAGS) \ - -ldflags '$(LDFLAGS_PODMAN_STATIC)' \ + $(GO_LDFLAGS) '$(LDFLAGS_PODMAN_STATIC)' \ -tags "${REMOTETAGS}" \ -o $@ ./cmd/podman @@ -372,7 +373,7 @@ bin/podman.cross.%: .gopathok CGO_ENABLED=0 \ $(GO) build \ $(BUILDFLAGS) \ - -ldflags '$(LDFLAGS_PODMAN)' \ + $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' \ -tags '$(BUILDTAGS_CROSS)' \ -o "$@" ./cmd/podman |