Control: tags -1 patch
--

On Sat, May 03, 2025 at 11:26:06PM +0100, Sudip Mukherjee wrote:
> Source: android-platform-art
> Version: 14.0.0+r15-4
> Severity: wishlist
> Tags: ftbfs
> X-Debbugs-Cc: sudipm.mukher...@gmail.com
> 
> Dear Maintainer,
> 
> android-platform-art is FTBFS with clang-20.

The attached debdiff fixes the FTBFS in Ubuntu.

-- 
Regards
Sudip
diff -Nru android-platform-art-14.0.0+r15/debian/changelog 
android-platform-art-14.0.0+r15/debian/changelog
--- android-platform-art-14.0.0+r15/debian/changelog    2024-12-01 
15:19:27.000000000 +0000
+++ android-platform-art-14.0.0+r15/debian/changelog    2025-05-03 
23:51:33.000000000 +0100
@@ -1,3 +1,11 @@
+android-platform-art (14.0.0+r15-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * d/p/fix-ambiguous.patch: Fix FTBFS due to ambiguous FillVRegs template
+    specializations due to clang-20.
+
+ -- Sudip Mukherjee <sudipm.mukher...@gmail.com>  Sat, 03 May 2025 23:51:33 
+0100
+
 android-platform-art (14.0.0+r15-4) unstable; urgency=medium
 
   [ Hans-Christoph Steiner ]
diff -Nru android-platform-art-14.0.0+r15/debian/patches/fix-ambiguous.patch 
android-platform-art-14.0.0+r15/debian/patches/fix-ambiguous.patch
--- android-platform-art-14.0.0+r15/debian/patches/fix-ambiguous.patch  
1970-01-01 01:00:00.000000000 +0100
+++ android-platform-art-14.0.0+r15/debian/patches/fix-ambiguous.patch  
2025-05-03 23:50:56.000000000 +0100
@@ -0,0 +1,40 @@
+Description: Fix ambiguous FillVRegs template specializations due to clang-20
+
+Origin: upstream, 
https://android.googlesource.com/platform/art/+/d5a09b3adf930729ccb17c1e466c9c5eb053082a
+Bug-Debian: https://bugs.debian.org/1104650
+Last-Update: 2025-05-03
+---
+
+--- android-platform-art-14.0.0+r15.orig/runtime/art_method-inl.h
++++ android-platform-art-14.0.0+r15/runtime/art_method-inl.h
+@@ -151,18 +151,14 @@ constexpr size_t NumberOfVRegs() {
+   return sum;
+ }
+ 
+-template <char... ArgType>
+-inline ALWAYS_INLINE void FillVRegs(uint32_t* vregs ATTRIBUTE_UNUSED,
+-                                    typename ShortyTraits<ArgType>::Type... 
args ATTRIBUTE_UNUSED)
+-    REQUIRES_SHARED(Locks::mutator_lock_) {}
+-
+ template <char FirstArgType, char... ArgType>
+ inline ALWAYS_INLINE void FillVRegs(uint32_t* vregs,
+                                     typename ShortyTraits<FirstArgType>::Type 
first_arg,
+                                     typename ShortyTraits<ArgType>::Type... 
args)
+     REQUIRES_SHARED(Locks::mutator_lock_) {
+   ShortyTraits<FirstArgType>::Set(vregs, first_arg);
+-  FillVRegs<ArgType...>(vregs + ShortyTraits<FirstArgType>::kVRegCount, 
args...);
++  if constexpr (sizeof...(args) > 0)
++    FillVRegs<ArgType...>(vregs + ShortyTraits<FirstArgType>::kVRegCount, 
args...);
+ }
+ 
+ template <char... ArgType>
+@@ -170,7 +166,8 @@ inline ALWAYS_INLINE auto MaterializeVRe
+     REQUIRES_SHARED(Locks::mutator_lock_) {
+   constexpr size_t kNumVRegs = NumberOfVRegs<ArgType...>();
+   std::array<uint32_t, kNumVRegs> vregs;
+-  FillVRegs<ArgType...>(vregs.data(), args...);
++  if constexpr (sizeof...(args) > 0)
++    FillVRegs<ArgType...>(vregs.data(), args...);
+   return vregs;
+ }
+ 
diff -Nru android-platform-art-14.0.0+r15/debian/patches/series 
android-platform-art-14.0.0+r15/debian/patches/series
--- android-platform-art-14.0.0+r15/debian/patches/series       2024-12-01 
15:02:11.000000000 +0000
+++ android-platform-art-14.0.0+r15/debian/patches/series       2025-05-03 
23:51:11.000000000 +0100
@@ -6,3 +6,4 @@
 fix-pthread-stack.patch
 remove-include-unused-base-strlcpy-h.patch
 Fix-Filter-function-shadowing-its-own-template-parameter.patch
+fix-ambiguous.patch

Reply via email to