Summary: | net-misc/bird-2.0.10 does not respect CFLAGS | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Alarig Le Lay <alarig> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arkamar, ionen, proxy-maint, sam |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/gentoo/pull/20334 https://github.com/gentoo/gentoo/pull/29942 https://github.com/gentoo/gentoo/pull/29980 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 59506 | ||
Attachments: |
build.log
lxc-build QA CFLAGS |
Description
Agostino Sarubbo
2021-04-10 08:22:25 UTC
Created attachment 698895 [details]
build.log
build log and emerge --info
Created attachment 698931 [details]
lxc-build
Which options are you using for the QA messages?
I use the same CFLAGS and FEATURES as you (except buildpkg) and your EMERGE_DEFAULT_OPTS aren’t about QA, but I don’t have any warning.
(In reply to Alarig Le Lay from comment #2) > Created attachment 698931 [details] > lxc-build > > Which options are you using for the QA messages? > > I use the same CFLAGS and FEATURES as you (except buildpkg) and your > EMERGE_DEFAULT_OPTS aren’t about QA, but I don’t have any warning. Make sure you set it in LDFLAGS too. CFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches" CXXFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches" LDFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--as-needed" PORTAGE_ELOG_CLASSES="${PORTAGE_ELOG_CLASSES} qa" I see you've only set CFLAGS, there's sneaky thing about the flags check: if [[ "${CFLAGS}" == *-frecord-gcc-switches* ]] && \ [[ "${CXXFLAGS}" == *-frecord-gcc-switches* ]] && \ [[ "${FFLAGS}" == *-frecord-gcc-switches* ]] && \ [[ "${FCFLAGS}" == *-frecord-gcc-switches* ]] Needs to be set in all four (even fortran), or else it does nothing. I added it everywhere: bird ~ # grep FLAGS= /etc/portage/make.conf CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" CXXFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -frecord-gcc-switches" FFLAGS="${FFLAGS} -frecord-gcc-switches" FCFLAGS="${FCFLAGS} -frecord-gcc-switches" bird ~ # emerge --info | grep FLAGS= setlocale: unsupported locale setting setlocale: unsupported locale setting CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" CXXFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" FCFLAGS="-O2 -pipe -frecord-gcc-switches" FFLAGS="-O2 -pipe -frecord-gcc-switches" LDFLAGS="-Wl,-O1 -Wl,--as-needed -frecord-gcc-switches" But I still don’t have any warning Try these: CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" CXXFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" FCFLAGS="-O2 -pipe -frecord-gcc-switches" FFLAGS="-O2 -pipe -frecord-gcc-switches" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0" PORTAGE_ELOG_CLASSES="${PORTAGE_ELOG_CLASSES} qa" Additionally, MAKEOPTS='VERBOSE=1' will probably be useful here. Think problem seem to be because of lto and linker flags, if you have -frecord-gcc-switches in LDFLAGS then it spares you the warning because flag was used at link time. Honestly detection on this one may be a bit bogus, I do see flags being used in all the right place (CFLAGS for building, LDFLAGS for linking, but then it adds that -flto). Created attachment 699060 [details]
QA CFLAGS
Thanks! I do have the notice now.
However, with the verbose build, it seems to me that the CFLAGS are respected
Considering adding non-essential flags that users didn't ask for isn't so great, you could fix this by doing: bird_cv_c_lto=no econf \ [...] And then no QA notice. Additionally defining `emake VERBOSE=1` is always a nice gesture so users can see what's going on. (In reply to Ionen Wolkens from comment #11) > bird_cv_c_lto=no econf \ [...] or minor self-nitpick, I find these are better as arguments e.g. econf bird_cv_c_lto=no I created a merge request to add the lto flag, which is enabled by default. So you will be able to test your CI without lto. I don’t want to disable it by default because: 1. a BGP convergence on fullviews is already long enough and LTO is meant to have more efficient binaries 2. it has been introduced in 2.0.7 (2019-10-11), which has been pulled in the tree Mon Feb 10 13:53:17 2020 +0000 and nobody complained about it 3. bird developers know better than me what they are doing with the gcc build/link flags (In reply to Alarig Le Lay from comment #13) > I created a merge request to add the lto flag, which is enabled by default. > So you will be able to test your CI without lto. > I don’t want to disable it by default because: > 1. a BGP convergence on fullviews is already long enough and LTO is meant > to have more efficient binaries > 2. it has been introduced in 2.0.7 (2019-10-11), which has been pulled in > the tree Mon Feb 10 13:53:17 2020 +0000 and nobody complained about it > 3. bird developers know better than me what they are doing with the gcc > build/link flags Argument 1. can be invoked for pretty much half the ::gentoo tree, yet we don't prematurely optimize for all these specific use cases. People caring about a specific performance edge-case have all the tools they need to optimize them. I’m not prematurely optimising, I’m keeping a compilation option used upstream to build the code as it’s meant to be. By searching "lto site:https://bird.network.cz/pipermail/bird-users/", I think that LTO never created any issue (on Gentoo and elsewhere), plus the ebuild does in fact respect the CFLAGS (thus, moving the bug from net-misc/bird-2.0.{7,8} to tinderbox). So I really don’t see why I should modify something working. ci has reproduced this issue with version 2.0.9 - Updating summary. ci has reproduced this issue with version 2.0.10 - Updating summary. 447ab933512e18f1d9d3e37cdf84b8b8d12f08e4 |