]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix pkg-config flag sanitization
authorRoland Shoemaker <roland@golang.org>
Tue, 3 Feb 2026 02:29:51 +0000 (18:29 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 4 Feb 2026 20:14:51 +0000 (12:14 -0800)
commit28fbdf7acb4146b5bc3d88128e407d1344691839
treebc34a8a5364e1fd7b18cb02b33d9628f131f5288
parent045d1270a7c299c6e40cccf3776860749abfe18e
cmd/go: fix pkg-config flag sanitization

Implement a new pkg-config safe flag list (containing everything except
for --log-file) and use that when checking flags passed to pkg-config,
instead of using checkCompilerFlags.

Fixes #77387

Change-Id: Id6141d0a2934053aa43e3aa8ce402bd499c4c028
Reviewed-on: https://go-review.googlesource.com/c/go/+/741042
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/security.go
src/cmd/go/testdata/script/cgo_bad_directives.txt