File: x32_build_fix.patch

package info (click to toggle)
google-glog 0.6.0-3
  • links: PTS
  • area: main
  • in suites: sid
  • size: 1,336 kB
  • sloc: cpp: 9,590; sh: 141; ansic: 115; makefile: 47
file content (35 lines) | stat: -rw-r--r-- 913 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Description: fix FTBFS on x32
Author: Guillaume Morin <guillaume@morinfr.org>
Forwarded: no
Last-Update: 2022-03-06

---

--- google-glog-0.3.4.orig/src/symbolize_unittest.cc
+++ google-glog-0.3.4/src/symbolize_unittest.cc
@@ -321,8 +321,12 @@ extern "C" {
 inline void* always_inline inline_func() {
   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;
 }
 
@@ -330,8 +334,12 @@ void* ATTRIBUTE_NOINLINE non_inline_func
 void* ATTRIBUTE_NOINLINE non_inline_func() {
   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;
 }