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

Bug 911858

Summary: games-action/prismlauncher-7.2 appends -O2 after CXXFLAGS set in make.conf
Product: Gentoo Linux Reporter: Kostadin Shishmanov <kocelfc>
Component: Current packagesAssignee: Thiago <flowlnlnln>
Status: RESOLVED FIXED    
Severity: normal CC: andrewammerlaan, esigra, proxy-maint
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/33731
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 59506    
Attachments: emerge --info and build log compressed with xz

Description Kostadin Shishmanov 2023-08-07 12:47:53 UTC
Created attachment 867282 [details]
emerge --info and build log compressed with xz

games-action/prismlauncher-7.2 appends -O2 after CXXFLAGS set in make.conf, thus overriding -O3, below are some of the lines. The rest are in the log.


[25/474] /usr/bin/x86_64-pc-linux-gnu-g++  -I/var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2_build/libraries/libnbtplusplus -I/var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2/libraries/libnbtplusplus -I/var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2_build/libraries/libnbtplusplus/nbt++_autogen/include -I/var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2/libraries/libnbtplusplus/include  -Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 -march=native -O3 -pipe -flto=auto -fno-semantic-interposition -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -DUNICODE -D_UNICODE -O2   -std=gnu++11 -fPIC -MD -MT libraries/libnbtplusplus/CMakeFiles/nbt++.dir/src/tag.cpp.o -MF libraries/libnbtplusplus/CMakeFiles/nbt++.dir/src/tag.cpp.o.d -o libraries/libnbtplusplus/CMakeFiles/nbt++.dir/src/tag.cpp.o -c /var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2/libraries/libnbtplusplus/src/tag.cpp
[26/474] /usr/bin/x86_64-pc-linux-gnu-g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -I/var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2_build/libraries/systeminfo -I/var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2/libraries/systeminfo -I/var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2_build/libraries/systeminfo/systeminfo_autogen/include -I/var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2/libraries/systeminfo/include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork  -Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 -march=native -O3 -pipe -flto=auto -fno-semantic-interposition -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -DUNICODE -D_UNICODE -O2   -std=gnu++17 -fPIC -fPIC -MD -MT libraries/systeminfo/CMakeFiles/systeminfo.dir/src/sys_unix.cpp.o -MF libraries/systeminfo/CMakeFiles/systeminfo.dir/src/sys_unix.cpp.o.d -o libraries/systeminfo/CMakeFiles/systeminfo.dir/src/sys_unix.cpp.o -c /var/tmp/portage/games-action/prismlauncher-7.2/work/PrismLauncher-7.2/libraries/systeminfo/src/sys_unix.cpp
Comment 1 Larry the Git Cow gentoo-dev 2023-11-09 07:47:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111127c008c0f37857692cb8ca86ad973a8c34cb

commit 111127c008c0f37857692cb8ca86ad973a8c34cb
Author:     Thiago Donato Ferreira <flowlnlnln@gmail.com>
AuthorDate: 2023-11-08 22:36:21 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2023-11-09 07:47:10 +0000

    games-action/prismlauncher: remove CMAKE_CXX_FLAGS_RELEASE from upstream
    
    According to the CMake documentation, the CMAKE_<LANG>_FLAGS_<CONFIG>
    flags will always be added after the CMAKE_<LANG>_FLAGS, which are the
    ones affected by the CXXFLAGS environment variable Gentoo uses.
    
    So, as to not override the user settings, we remove the line that sets
    that variable, handling both the -D_FORTIFY_SOURCE=2 and -O2 flags.
    
    CMake reference:
    https://cmake.org/cmake/help/v3.28/variable/CMAKE_LANG_FLAGS.html#variable:CMAKE_%3CLANG%3E_FLAGS
    
    Closes: https://bugs.gentoo.org/911858
    Signed-off-by: Thiago Donato Ferreira <flowlnlnln@gmail.com>
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 .../{prismlauncher-7.2.ebuild => prismlauncher-7.2-r1.ebuild}       | 6 ++++--
 games-action/prismlauncher/prismlauncher-9999.ebuild                | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)