Package: google-glog
Tags: ftbfs-x32, patch

google-glog fails to build form source on x32, see
https://buildd.debian.org/status/package.php?p=google-glog&suite=sid

The error is:
src/symbolize_unittest.cc: Assembler messages:
src/symbolize_unittest.cc:301: Error: operand type mismatch for `pop'
make[1]: *** [src/symbolize_unittest-symbolize_unittest.o] Error 1

This patch fixes the build failure:

--- a/src/symbolize_unittest.cc
+++ b/src/symbolize_unittest.cc
@@ -290,16 +290,24 @@
 inline void* always_inline inline_func() {
   register void *pc = NULL;
 #ifdef TEST_X86_32_AND_64
+#if __x86_64__ || (__x86_64__ && __ILP32__)
+  __asm__ __volatile__("call 1f; 1: popq %q0" : "=r"(pc));
+#else
   __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc));
 #endif
+#endif
   return pc;
 }
 
 void* ATTRIBUTE_NOINLINE non_inline_func() {
   register void *pc = NULL;
 #ifdef TEST_X86_32_AND_64
+#if __x86_64__ || (__x86_64__ && __ILP32__)
+  __asm__ __volatile__("call 1f; 1: popq %q0" : "=r"(pc));
+#else
   __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc));
 #endif
+#endif
   return pc;
 }
 
Thanks

-- 
Guillaume Morin <guilla...@morinfr.org>

Reply via email to