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

Bug 806442

Summary: dev-util/duma: unexpected CFLAGS dropping
Product: Gentoo Linux Reporter: Sam James <sam>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 59506    

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-05 01:30:27 UTC
When adding a workaround for bug 789708, I noticed the following in the only version in tree (2.5.15-r2) in src_configure:
> # other flags will break duma
> export CFLAGS="-O0 -Wall -Wextra -U_FORTIFY_SOURCE"

It seems like it'd be better to use strip-flags from flag-o-matic if truly necessary, but that said, it seems unlikely we need -Wall -Wextra in order to compile. Or replace -O? with -O0, which is preferred, to allow e.g. arch specific FLAGS.

Additionally, this package has some parts in C++, so at least for those components, CXXFLAGS is used:
>x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -std=c++14 -fPIC -DPIC -DDUMA_SO_LIBRARY -c dumatestpp.cpp -o dumatestpp_so.o

... which isn't a problem per-se, but if the C code really needs -O0, it's not a far leap to think that maybe the C++ will too. It'd be worth updating the comment at least even if not.