On 10 Jun 2021, at 00:24, Васильев Zmey! Олег firstname.lastname@example.org wrote:
Tried to build Unit 1.24 and found out that I can't compile Go module without environment variable set: CGO_CFLAGS_ALLOW='-Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS|-fcf-protection' Go complains that there are invalid (untrusted) flags: go build unit.nginx.org/go: invalid flag in #cgo CFLAGS: -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS go build unit.nginx.org/go: invalid flag in #cgo CFLAGS: -fcf-protection
Most likely these flags were added because you have specified it when configuring Unit.
So please consider to either add CGO_CFLAGS_ALLOW to build script or remove these options.
If I’m right thinking you are building Unit and Go module from sources with these flags, it is up to you to control your building environment.
If my assumption is wrong, please describe what you are doing with more details.
— Best regards, Max