From f12bba7363577ac6e63955aa675828363bec7e1b Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 7 Jul 2024 02:53:31 -0400 Subject: dev-build/cmake: mark as LTO-unsafe under bootstrap as well We filter-lto due to ODR violations. But only in src_configure, which is common enough as that's where we set up the environment for configuring, in general. However cmake is a bit special as we also need to bootstrap it, and we do this in src_prepare(). We need to do that filtering there as well. While we are at it, the solaris linking issue is most probably relevant the same way, although I have not actually tested this... Bug: https://bugs.gentoo.org/858335 Signed-off-by: Eli Schwartz Acked-by: Sam James --- dev-build/cmake/cmake-3.28.5.ebuild | 15 +++++++++------ dev-build/cmake/cmake-3.29.6.ebuild | 15 +++++++++------ dev-build/cmake/cmake-3.30.0.ebuild | 15 +++++++++------ dev-build/cmake/cmake-9999.ebuild | 15 +++++++++------ 4 files changed, 36 insertions(+), 24 deletions(-) (limited to 'dev-build') diff --git a/dev-build/cmake/cmake-3.28.5.ebuild b/dev-build/cmake/cmake-3.28.5.ebuild index faf79e66a232..03a085cef924 100644 --- a/dev-build/cmake/cmake-3.28.5.ebuild +++ b/dev-build/cmake/cmake-3.28.5.ebuild @@ -178,13 +178,9 @@ src_prepare() { -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" - if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then - CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" - cmake_src_bootstrap - fi -} + ## in theory we could handle these flags in src_configure, as we do in many other packages. But we *must* + ## handle them as part of bootstrapping, sadly. -src_configure() { # Fix linking on Solaris [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl @@ -192,6 +188,13 @@ src_configure() { # https://gitlab.kitware.com/cmake/cmake/-/issues/20740 filter-lto + if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then + CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" + cmake_src_bootstrap + fi +} + +src_configure() { local mycmakeargs=( -DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMake_ENABLE_DEBUGGER=$(usex dap) diff --git a/dev-build/cmake/cmake-3.29.6.ebuild b/dev-build/cmake/cmake-3.29.6.ebuild index 10d9abcc9ff8..dc2e2378fa00 100644 --- a/dev-build/cmake/cmake-3.29.6.ebuild +++ b/dev-build/cmake/cmake-3.29.6.ebuild @@ -178,13 +178,9 @@ src_prepare() { -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" - if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then - CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" - cmake_src_bootstrap - fi -} + ## in theory we could handle these flags in src_configure, as we do in many other packages. But we *must* + ## handle them as part of bootstrapping, sadly. -src_configure() { # Fix linking on Solaris [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl @@ -192,6 +188,13 @@ src_configure() { # https://gitlab.kitware.com/cmake/cmake/-/issues/20740 filter-lto + if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then + CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" + cmake_src_bootstrap + fi +} + +src_configure() { local mycmakeargs=( -DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMake_ENABLE_DEBUGGER=$(usex dap) diff --git a/dev-build/cmake/cmake-3.30.0.ebuild b/dev-build/cmake/cmake-3.30.0.ebuild index 2a1fa8a0fa49..c119ad22dc76 100644 --- a/dev-build/cmake/cmake-3.30.0.ebuild +++ b/dev-build/cmake/cmake-3.30.0.ebuild @@ -177,13 +177,9 @@ src_prepare() { -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" - if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then - CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" - cmake_src_bootstrap - fi -} + ## in theory we could handle these flags in src_configure, as we do in many other packages. But we *must* + ## handle them as part of bootstrapping, sadly. -src_configure() { # Fix linking on Solaris [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl @@ -191,6 +187,13 @@ src_configure() { # https://gitlab.kitware.com/cmake/cmake/-/issues/20740 filter-lto + if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then + CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" + cmake_src_bootstrap + fi +} + +src_configure() { local mycmakeargs=( -DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMake_ENABLE_DEBUGGER=$(usex dap) diff --git a/dev-build/cmake/cmake-9999.ebuild b/dev-build/cmake/cmake-9999.ebuild index 12f94e64fb01..199bff8efd14 100644 --- a/dev-build/cmake/cmake-9999.ebuild +++ b/dev-build/cmake/cmake-9999.ebuild @@ -178,13 +178,9 @@ src_prepare() { -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" - if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then - CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" - cmake_src_bootstrap - fi -} + ## in theory we could handle these flags in src_configure, as we do in many other packages. But we *must* + ## handle them as part of bootstrapping, sadly. -src_configure() { # Fix linking on Solaris [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl @@ -192,6 +188,13 @@ src_configure() { # https://gitlab.kitware.com/cmake/cmake/-/issues/20740 filter-lto + if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then + CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" + cmake_src_bootstrap + fi +} + +src_configure() { local mycmakeargs=( -DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMake_ENABLE_DEBUGGER=$(usex dap) -- cgit v1.2.3-65-gdbad