summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-11-22 21:20:22 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-11-22 21:20:31 +0000
commit6dd356bb47e026d4f52dda46237491b0d7170357 (patch)
tree6ebba270adf7863d1eb6e4185a454d47ef1caec5 /dev-util
parentx11-libs/libxkbcommon: Version bump to 1.0.2 (diff)
downloadgentoo-6dd356bb47e026d4f52dda46237491b0d7170357.tar.gz
gentoo-6dd356bb47e026d4f52dda46237491b0d7170357.tar.bz2
gentoo-6dd356bb47e026d4f52dda46237491b0d7170357.zip
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@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/ccache/ccache-4.1.ebuild39
-rw-r--r--dev-util/ccache/files/ccache-4.1-atomic.patch23
2 files changed, 0 insertions, 62 deletions
diff --git a/dev-util/ccache/ccache-4.1.ebuild b/dev-util/ccache/ccache-4.1.ebuild
index a783943f868b..8f04356c74b3 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 dc48c4a5c896..000000000000
--- 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} .)