Summary: | games-action/minetest: build system appends additional flags to user CXXFLAGS | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Samuel Bauer <samuel.bauer> |
Component: | Current packages | Assignee: | Marek Szuba (RETIRED) <marecki> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra, games |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 59506 | ||
Attachments: | minetest-5.6.0.ebuild.patch |
Your patch is too aggressive, in addition to the unwanted optimisation flags it also removes -g (which should very much be left alone for "release with DEBUG info" builds, not in the least because most of the debug symbols will normally be stripped anyway) and -DNDEBUG. Not to mention that the use of sed should be reserved for either dynamic changes such as injection of ebuild variables, or when a patch would be too large. Technicalities aside, I'll have a look at what Minetest upstream has got to say about build flags, to determine whether we need something like USE=custom-flags, or simply ditch the ones they set by default like you suggest. Stay tuned. I didn't notice I removed -DNDEBUG. fixed locally. I use splitdebug feature for minetest on one of my box, so I set -ggdb3 in my CFLAGS, but build system appends -g. User wanting debug feature should be able to set them up manually, and as said symbol will be stripped by default anyway. other flag removed: "-pipe" "-O3" "-fomit-frame-pointer" "-funroll-loop" Forcing -g is indeed a waste of resources and time as it slows down the build only for things to be thrown away. Gentoo packages normally drop it if upstream add it in. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44c4388090c24c1878564cbb29f735f5c126ce81 commit 44c4388090c24c1878564cbb29f735f5c126ce81 Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2022-09-07 09:04:53 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2022-09-07 09:08:02 +0000 games-action/minetest: suppress upstream optimisation flags Upstream build scripts add -O3 -funroll-loops -fomit-frame-pointers to CXXFLAGS, and since they are appended rather than prepended they may override optimisation flags set by the user. Closes: https://bugs.gentoo.org/868540 Signed-off-by: Marek Szuba <marecki@gentoo.org> .../files/minetest-5.6.0-no_upstream_optflags.patch | 15 +++++++++++++++ .../{minetest-5.6.0.ebuild => minetest-5.6.0-r1.ebuild} | 2 ++ 2 files changed, 17 insertions(+) |
Created attachment 803257 [details] minetest-5.6.0.ebuild.patch I recently saw that a bunch of flags were added after custom gentoo flags when compiling minetest. I propose a patch for this attached there. It still retain all upstream flags related to math optimization as I'm really not sure they should be touched.