Disable TestArmThumbOverlap on raspbian
authorBenjamin Barenblat <bbaren@debian.org>
Fri, 25 Feb 2022 01:39:43 +0000 (01:39 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Fri, 25 Feb 2022 01:39:43 +0000 (01:39 +0000)
TestArmThumbOverlap includes a pair of test functions, one built in arm mode
and the other built in thumb mode.
 unfortunately when configured for armv6 hardfloat, gcc refuses to build any
 functions in thumb mode (even if they don't actually use floating point)
Author: Peter Michael Green <plugwash@raspbian.org>

Gbp-Pq: Name disable-testarmthumboverlap.patch

absl/debugging/symbolize_test.cc

index 35de02e24b473c342e2d3f821d62667cfed8d786..1ee78220203ce147cf2a3b1d4790cbd47ca0c529 100644 (file)
@@ -477,7 +477,7 @@ void ABSL_ATTRIBUTE_NOINLINE TestWithReturnAddress() {
 #endif
 }
 
-#if defined(__arm__) && ABSL_HAVE_ATTRIBUTE(target)
+#if defined(__arm__) && ABSL_HAVE_ATTRIBUTE(target) && ((__ARM_ARCH >= 7) || !defined(__ARM_PCS_VFP))
 // Test that we correctly identify bounds of Thumb functions on ARM.
 //
 // Thumb functions have the lowest-order bit set in their addresses in the ELF
@@ -496,6 +496,11 @@ void ABSL_ATTRIBUTE_NOINLINE TestWithReturnAddress() {
 // bit in the Thumb function's entry point. It will correctly compute the end of
 // the Thumb function, it will find no overlap between the Thumb and ARM
 // functions, and it will return the name of the ARM function.
+//
+// Unfortunately we cannot perform this test on armv6 or lower systems that use
+// the hard float ABI because gcc refuses to compile thumb  functions on such
+// systems with a "sorry, unimplemented: Thumb-1 hard-float VFP ABI" error.
+
 
 __attribute__((target("thumb"))) int ArmThumbOverlapThumb(int x) {
   return x * x * x;
@@ -591,7 +596,7 @@ int main(int argc, char **argv) {
   TestWithPCInsideInlineFunction();
   TestWithPCInsideNonInlineFunction();
   TestWithReturnAddress();
-#if defined(__arm__) && ABSL_HAVE_ATTRIBUTE(target)
+#if defined(__arm__) && ABSL_HAVE_ATTRIBUTE(target) && ((__ARM_ARCH >= 7) || !defined(__ARM_PCS_VFP))
   TestArmThumbOverlap();
 #endif
 #endif