diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-07-21 12:57:50 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-28 14:51:50 +0100 |
| commit | c0d815823f6921ac8a4d9019a1b56c7a10abba4a (patch) | |
| tree | 5066a90b396288761bf2d1f59acfaeb03d7ad7e7 | |
| parent | 78f97b876219114b5144e691d4558adb44da46f3 (diff) | |
| download | poky-c0d815823f6921ac8a4d9019a1b56c7a10abba4a.tar.gz | |
apt: Fix build with clang and libc++
Backport a fix to address random access iterator's expectation of
being const-qualified inside libc++ std::__insertion_sort_unguarded
implementation
(From OE-Core rev: cfd74da11a5290b2e555e2f9f06779f816324ee1)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -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 | 1 |
2 files changed, 30 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..b039599395 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 = " \ |
