diff options
author | Marek Szuba <marecki@gentoo.org> | 2022-09-07 10:04:53 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2022-09-07 10:08:02 +0100 |
commit | 44c4388090c24c1878564cbb29f735f5c126ce81 (patch) | |
tree | 30812dd5dd789c2162594d5ee89ffdb1bf8024d7 /games-action | |
parent | sys-apps/fwupd: explicitly call xdg_pkg_post{inst,rm} (diff) | |
download | gentoo-44c4388090c24c1878564cbb29f735f5c126ce81.tar.gz gentoo-44c4388090c24c1878564cbb29f735f5c126ce81.tar.bz2 gentoo-44c4388090c24c1878564cbb29f735f5c126ce81.zip |
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>
Diffstat (limited to 'games-action')
-rw-r--r-- | games-action/minetest/files/minetest-5.6.0-no_upstream_optflags.patch | 15 | ||||
-rw-r--r-- | games-action/minetest/minetest-5.6.0-r1.ebuild (renamed from games-action/minetest/minetest-5.6.0.ebuild) | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/games-action/minetest/files/minetest-5.6.0-no_upstream_optflags.patch b/games-action/minetest/files/minetest-5.6.0-no_upstream_optflags.patch new file mode 100644 index 000000000000..68d71679924b --- /dev/null +++ b/games-action/minetest/files/minetest-5.6.0-no_upstream_optflags.patch @@ -0,0 +1,15 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -756,11 +756,10 @@ + endif() + endif() + +- set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${OTHER_FLAGS} -pipe -funroll-loops") ++ set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${OTHER_FLAGS}") + if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os") + else() +- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -fomit-frame-pointer") + if(CMAKE_SYSTEM_NAME STREQUAL "Linux" + AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" + AND CMAKE_CXX_COMPILER_VERSION MATCHES "^9\\.") diff --git a/games-action/minetest/minetest-5.6.0.ebuild b/games-action/minetest/minetest-5.6.0-r1.ebuild index 586774932b7f..6d626a4d0046 100644 --- a/games-action/minetest/minetest-5.6.0.ebuild +++ b/games-action/minetest/minetest-5.6.0-r1.ebuild @@ -3,6 +3,7 @@ EAPI=8 +CMAKE_BUILD_TYPE="Release" LUA_COMPAT=( lua5-1 luajit ) inherit cmake flag-o-matic lua-single systemd xdg @@ -64,6 +65,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-5.4.1-system_puc_lua.patch + "${FILESDIR}"/${PN}-5.6.0-no_upstream_optflags.patch ) src_prepare() { |