<div>I think it's better me to clarify the context. I'm maintainer of the AUR nginx-unit package.</div><div>There is no special flags added in build script, it pretty straight and simple. I found out that this problem caused by pretty recent (21 Apr) change in makepkg.conf which controls default build flags for AUR packages. Diff link: <a href="https://github.com/archlinux/svntogit-packages/commit/6e5f24f4d27de47951fb544e8b1fbea6c980728b#diff-aa431972f97987bd39935a453ba088684a338d91a1a224f86ab640352fec1d49R41" rel="noopener noreferrer" target="_blank">https://github.com/archlinux/svntogit-packages/commit/6e5f24f4d27de47951fb544e8b1fbea6c980728b#diff-aa431972f97987bd39935a453ba088684a338d91a1a224f86ab640352fec1d49R41</a></div><div> </div><div>So I shoud apologize for disturbing, I'm going to fix this in the build script.</div><div> </div><div>10.06.2021, 16:59, "Max Romanov" <max.romanov@nginx.com>:</div><blockquote><div style="word-wrap:break-word"><div>Hello!</div> <div><blockquote><div>On 10 Jun 2021, at 00:24, Васильев Zmey! Олег <<a href="mailto:zmey1992@ya.ru" rel="noopener noreferrer">zmey1992@ya.ru</a>> wrote:</div> <div><div>Hi!</div><div> </div><div>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'</div><div>Go complains that there are invalid (untrusted) flags:</div><div><div>go build <a href="http://unit.nginx.org/go:" rel="noopener noreferrer">unit.nginx.org/go:</a> invalid flag in #cgo CFLAGS: -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS</div></div><div><div>go build <a href="http://unit.nginx.org/go:" rel="noopener noreferrer">unit.nginx.org/go:</a> invalid flag in #cgo CFLAGS: -fcf-protection</div></div></div></blockquote><div> </div><div>Most likely these flags were added because you have specified it when configuring Unit.</div> <blockquote><div><div><div> </div><div>So please consider to either add CGO_CFLAGS_ALLOW to build script or remove these options.</div></div></div></blockquote><div> </div><div>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.</div><div> </div><div>If my assumption is wrong, please describe what you are doing with more details.</div> <blockquote><div><div><div> </div><div>WBR, Oleg.</div></div></div></blockquote><div> </div><div>—</div><div>Best regards,</div><div>Max</div> <blockquote><div>_______________________________________________<br />unit mailing list<br /><a href="mailto:unit@nginx.org" rel="noopener noreferrer">unit@nginx.org</a><br /><a href="https://mailman.nginx.org/mailman/listinfo/unit" rel="noopener noreferrer">https://mailman.nginx.org/mailman/listinfo/unit</a></div></blockquote></div><div> </div></div>,<p>_______________________________________________<br />unit mailing list<br /><a href="mailto:unit@nginx.org" rel="noopener noreferrer">unit@nginx.org</a><br /><a href="https://mailman.nginx.org/mailman/listinfo/unit" rel="noopener noreferrer">https://mailman.nginx.org/mailman/listinfo/unit</a></p></blockquote>