1
0
mirror of https://github.com/cmur2/miflorad.git synced 2024-12-22 12:54:25 +01:00

module: enable PIE and RELRO binary protections in go build

This commit is contained in:
cn 2018-12-25 22:16:17 +01:00
parent 327712a9c3
commit 1ac4c23696

View File

@ -35,12 +35,12 @@ remote-run: clean
.PHONY: cmd/munin-miflora/miflorad .PHONY: cmd/munin-miflora/miflorad
cmd/munin-miflora/miflorad: cmd/munin-miflora/miflorad:
cd cmd/miflorad && CGO_ENABLED=0 go build -ldflags "-X main.version=$(MIFLORAD_VERSION)" && cd ../.. cd cmd/miflorad && CGO_ENABLED=0 go build -buildmode=pie -ldflags "-X main.version=$(MIFLORAD_VERSION)" && cd ../..
.PHONY: cmd/munin-miflora/munin-miflora .PHONY: cmd/munin-miflora/munin-miflora
cmd/munin-miflora/munin-miflora: cmd/munin-miflora/munin-miflora:
cd cmd/munin-miflora && CGO_ENABLED=0 go build && cd ../.. cd cmd/munin-miflora && CGO_ENABLED=0 go build -buildmode=pie && cd ../..
.PHONY: cmd/munin-miflora/munin-miflora-gatt .PHONY: cmd/munin-miflora/munin-miflora-gatt
cmd/munin-miflora/munin-miflora-gatt: cmd/munin-miflora/munin-miflora-gatt:
cd cmd/munin-miflora-gatt && CGO_ENABLED=0 go build && cd ../.. cd cmd/munin-miflora-gatt && CGO_ENABLED=0 go build -buildmode=pie && cd ../..