The rocminfo CMake file uses a custom variable named ROCRTST_BLD_TYPE to set CMAKE_BUILD_TYPE. When not set, this defaults to Debug, which adds -O0 to CXXFLAGS. This overrides the optimization flags in CXXFLAGS in make.conf. When the CXXFLAGS in make.conf contain _FORTIFY_SOURCE, this breaks compilation with the following error: /usr/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] 412 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ Proposed fix for 5.1.3 on https://github.com/gentoo/gentoo/pull/27145 Reproducible: Always
Please update your PR to tag this bug.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65f5eec96be908fc0fc6ff1a4811242d049b8ef6 commit 65f5eec96be908fc0fc6ff1a4811242d049b8ef6 Author: Stijn Tintel <stijn@linux-ipv6.be> AuthorDate: 2022-09-04 19:22:22 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-11 16:25:16 +0000 dev-util/rocminfo: enable release build The rocminfo CMake file uses a custom variable named ROCRTST_BLD_TYPE to set CMAKE_BUILD_TYPE. When not set, this defaults to Debug, which adds -O0 to CXXFLAGS. This overrides the optimization flags in CXXFLAGS in make.conf. When the CXXFLAGS in make.conf contain _FORTIFY_SOURCE, this breaks compilation with the following error: /usr/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] 412 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ Fix this by setting the ROCRTST_BLD_TYPE variable to Release in mycmakeargs. Closes: https://bugs.gentoo.org/887583 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Closes: https://github.com/gentoo/gentoo/pull/27145 Signed-off-by: Sam James <sam@gentoo.org> dev-util/rocminfo/rocminfo-5.1.3.ebuild | 5 +++++ dev-util/rocminfo/rocminfo-5.3.3.ebuild | 5 +++++ dev-util/rocminfo/rocminfo-5.4.3.ebuild | 5 +++++ dev-util/rocminfo/rocminfo-9999.ebuild | 5 +++++ 4 files changed, 20 insertions(+)