diff options
Diffstat (limited to 'meta/recipes-devtools/apt')
-rw-r--r-- | meta/recipes-devtools/apt/apt/0001-Fix-compilation-error-with-clang-libc-18.patch | 29 | ||||
-rw-r--r-- | meta/recipes-devtools/apt/apt_2.6.1.bb | 4 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt/0001-Fix-compilation-error-with-clang-libc-18.patch b/meta/recipes-devtools/apt/apt/0001-Fix-compilation-error-with-clang-libc-18.patch new file mode 100644 index 0000000000..e55205ca3f --- /dev/null +++ b/meta/recipes-devtools/apt/apt/0001-Fix-compilation-error-with-clang-libc-18.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From b4488583424b33f51cb031562a9e8df820ffda23 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chongyun Lee <licy183@termux.dev> | ||
3 | Date: Thu, 15 Aug 2024 21:31:24 +0800 | ||
4 | Subject: [PATCH] Fix compilation error with clang/libc++ 18 | ||
5 | |||
6 | Upstream-Status: Backport [https://salsa.debian.org/apt-team/apt/-/commit/b4488583424b33f51cb031562a9e8df820ffda23] | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | apt-pkg/cacheset.h | 4 ++-- | ||
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h | ||
13 | index 5dbb9bf08..1c67a65d6 100644 | ||
14 | --- a/apt-pkg/cacheset.h | ||
15 | +++ b/apt-pkg/cacheset.h | ||
16 | @@ -218,11 +218,11 @@ public: | ||
17 | operator container_iterator(void) const { return _iter; } | ||
18 | inline iterator_type& operator++() { ++_iter; return static_cast<iterator_type&>(*this); } | ||
19 | inline iterator_type operator++(int) { iterator_type tmp(*this); operator++(); return tmp; } | ||
20 | - inline iterator_type operator+(typename container_iterator::difference_type const &n) { return iterator_type(_iter + n); } | ||
21 | + inline iterator_type operator+(typename container_iterator::difference_type const &n) const { return iterator_type(_iter + n); } | ||
22 | inline iterator_type operator+=(typename container_iterator::difference_type const &n) { _iter += n; return static_cast<iterator_type&>(*this); } | ||
23 | inline iterator_type& operator--() { --_iter;; return static_cast<iterator_type&>(*this); } | ||
24 | inline iterator_type operator--(int) { iterator_type tmp(*this); operator--(); return tmp; } | ||
25 | - inline iterator_type operator-(typename container_iterator::difference_type const &n) { return iterator_type(_iter - n); } | ||
26 | + inline iterator_type operator-(typename container_iterator::difference_type const &n) const { return iterator_type(_iter - n); } | ||
27 | inline typename container_iterator::difference_type operator-(iterator_type const &b) { return (_iter - b._iter); } | ||
28 | inline iterator_type operator-=(typename container_iterator::difference_type const &n) { _iter -= n; return static_cast<iterator_type&>(*this); } | ||
29 | inline bool operator!=(iterator_type const &i) const { return _iter != i._iter; } | ||
diff --git a/meta/recipes-devtools/apt/apt_2.6.1.bb b/meta/recipes-devtools/apt/apt_2.6.1.bb index 50ac2ea812..ccd70fc194 100644 --- a/meta/recipes-devtools/apt/apt_2.6.1.bb +++ b/meta/recipes-devtools/apt/apt_2.6.1.bb | |||
@@ -15,6 +15,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \ | |||
15 | file://0001-Remove-using-std-binary_function.patch \ | 15 | file://0001-Remove-using-std-binary_function.patch \ |
16 | file://0001-strutl-Add-missing-include-cstdint-gcc-15.patch \ | 16 | file://0001-strutl-Add-missing-include-cstdint-gcc-15.patch \ |
17 | file://0001-Raise-cmake_minimum_required-to-3.13-to-avoid-warnin.patch \ | 17 | file://0001-Raise-cmake_minimum_required-to-3.13-to-avoid-warnin.patch \ |
18 | file://0001-Fix-compilation-error-with-clang-libc-18.patch \ | ||
18 | " | 19 | " |
19 | 20 | ||
20 | SRC_URI:append:class-native = " \ | 21 | SRC_URI:append:class-native = " \ |
@@ -56,6 +57,9 @@ EXTRA_OECMAKE:append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \ | |||
56 | -DWITH_TESTS=False \ | 57 | -DWITH_TESTS=False \ |
57 | " | 58 | " |
58 | 59 | ||
60 | # See https://github.com/llvm/llvm-project/issues/63743 | ||
61 | CXXFLAGS:append:toolchain-clang = " -stdlib=libstdc++" | ||
62 | |||
59 | do_configure:prepend() { | 63 | do_configure:prepend() { |
60 | echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake | 64 | echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake |
61 | } | 65 | } |