Skip to content

Commit

Permalink
Quotes extldflags in the Makefile
Browse files Browse the repository at this point in the history
I was using multiple space separated LDFLAGS when building, for example
LDFLAGS="-Wl,-O1 -Wl,--sort-common" make build
which appears to correspond with recommendations from the go project
- in the [golang link docs](https://pkg.go.dev/cmd/link)
- and [this issue](golang/go#6234)

Signed-off-by: Michael Stergianis <[email protected]>
  • Loading branch information
Michael Stergianis committed Mar 16, 2024
1 parent 95b5aef commit c758773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ BINDIR:=/usr/bin/
## build: Build the program
build: out
@echo "=====> Building..."
$(GOCMD) build -ldflags "-s -w -X 'github.com/buildpacks/pack.Version=${PACK_VERSION}' -extldflags ${LDFLAGS}" -trimpath -o ./out/$(PACK_BIN) -a ./cmd/pack
$(GOCMD) build -ldflags "-s -w -X 'github.com/buildpacks/pack.Version=${PACK_VERSION}' -extldflags '${LDFLAGS}'" -trimpath -o ./out/$(PACK_BIN) -a ./cmd/pack

## all: Run clean, verify, test, and build operations
all: clean verify test build
Expand Down

0 comments on commit c758773

Please sign in to comment.