public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
Date: Sun, 22 Nov 2020 21:20:34 +0000 (UTC)	[thread overview]
Message-ID: <1606080031.6dd356bb47e026d4f52dda46237491b0d7170357.slyfox@gentoo> (raw)

commit:     6dd356bb47e026d4f52dda46237491b0d7170357
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 22 21:20:22 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Nov 22 21:20:31 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dd356bb

dev-util/ccache: drop -latomic patch

Upstream added -latomic detection.

Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-util/ccache/ccache-4.1.ebuild             | 39 ---------------------------
 dev-util/ccache/files/ccache-4.1-atomic.patch | 23 ----------------
 2 files changed, 62 deletions(-)

diff --git a/dev-util/ccache/ccache-4.1.ebuild b/dev-util/ccache/ccache-4.1.ebuild
index a783943f868..8f04356c74b 100644
--- a/dev-util/ccache/ccache-4.1.ebuild
+++ b/dev-util/ccache/ccache-4.1.ebuild
@@ -35,39 +35,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.5-nvcc-test.patch
 	"${FILESDIR}"/${PN}-4.0-objdump.patch
 	"${FILESDIR}"/${PN}-4.1-avoid-run-user.patch
-	"${FILESDIR}"/${PN}-4.1-atomic.patch
 )
 
-# ccache does not do it automatically. TODO: fix upstream
-need_latomic() {
-	# test if -latomic is needed and helps. -latomic is needed
-	# at least on ppc32. Use bit of inodeCache.cpp test.
-	cat >"${T}"/a-test.cc <<-EOF
-	#include <atomic>
-	#include <cstdint>
-	std::atomic<std::int64_t> a;
-	int main() { return a.load() == 0; }
-	EOF
-
-	local cxx_cmd=(
-		$(tc-getCXX)
-		$CXXFLAGS
-		$LDFLAGS
-		"${T}"/a-test.cc
-		-o "${T}"/a-test
-	)
-
-	einfo "${cxx_cmd[@]}"
-	"${cxx_cmd[@]}" && return 1
-
-	einfo "Trying to add -latomic"
-	einfo "${cxx_cmd[@]}"
-	cxx_cmd+=(-latomic)
-	"${cxx_cmd[@]}" && return 0
-
-	return 1
-}
-
 src_prepare() {
 	cmake_src_prepare
 
@@ -79,15 +48,7 @@ src_prepare() {
 	tc-export CC OBJDUMP
 }
 
-src_configure() {
-	local mycmakeargs=(
-		-DLINK_WITH_ATOMIC=$(need_latomic && echo YES || echo NO)
-	)
-	cmake_src_configure
-}
-
 src_install() {
-	# TODO: install manpage: https://github.com/ccache/ccache/issues/684
 	cmake_src_install
 
 	dobin ccache-config

diff --git a/dev-util/ccache/files/ccache-4.1-atomic.patch b/dev-util/ccache/files/ccache-4.1-atomic.patch
deleted file mode 100644
index dc48c4a5c89..00000000000
--- a/dev-util/ccache/files/ccache-4.1-atomic.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-powerpc, sparc and many other 32-bit arches need
-explicit libatomic for atd::atomic primitives..
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -67,12 +67,18 @@ if(WIN32)
-   endif()
- endif()
- 
-+option(LINK_WITH_ATOMIC "Add 'atomic' if needed" OFF)
-+set(atomic_lib "")
-+if(LINK_WITH_ATOMIC)
-+    set(atomic_lib "atomic")
-+endif()
-+
- set(THREADS_PREFER_PTHREAD_FLAG ON)
- find_package(Threads REQUIRED)
- target_link_libraries(
-   ccache_lib
-   PRIVATE standard_settings standard_warnings ZSTD::ZSTD
--          Threads::Threads third_party_lib)
-+          Threads::Threads third_party_lib ${atomic_lib})
- 
- target_include_directories(ccache_lib PRIVATE ${CMAKE_BINARY_DIR} .)


             reply	other threads:[~2020-11-22 21:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-22 21:20 Sergei Trofimovich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-08-07 22:56 [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/ Sam James
2024-05-30  2:09 Sam James
2024-01-05  7:32 Sam James
2024-01-05  7:10 Sam James
2023-08-08  2:10 Sam James
2023-06-13 18:12 Sam James
2022-04-17 18:32 Sam James
2021-02-16 23:35 Sergei Trofimovich
2020-11-26  8:29 Sergei Trofimovich
2020-11-22 20:57 Sergei Trofimovich
2020-10-02 22:25 Sergei Trofimovich
2020-06-27  9:21 Sergei Trofimovich
2020-03-24 22:30 Sergei Trofimovich
2019-01-03 18:45 Sergei Trofimovich
2016-11-10  5:40 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1606080031.6dd356bb47e026d4f52dda46237491b0d7170357.slyfox@gentoo \
    --to=slyfox@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox