Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 887285

Summary: dev-lang/go-1.19.4: cgo runtime sets -Werror
Product: Gentoo Linux Reporter: tastytea <gentoo>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: CONFIRMED ---    
Severity: normal CC: ago, esigra
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/golang/go/issues/63903
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 260867, 916580    

Description tastytea 2022-12-20 06:02:28 UTC
/go/src/runtime/cgo/cgo.go (in the tarball, installed into /usr/lib/ here) contains:
> #cgo CFLAGS: -Wall -Werror -fno-stack-protector

This seems to add -Werror to everything that is compiled with cgo.

-Werror is not recommended for releases and should always be disabled when encountered in build-logs, because there are numerous cases where this breaks without purpose.
See also: https://devmanual.gentoo.org/ebuild-writing/common-mistakes/index.html#-werror-compiler-flag-not-removed
Comment 1 tastytea 2022-12-20 06:04:12 UTC
*** Bug 887229 has been marked as a duplicate of this bug. ***