Blame SOURCES/gdb-jit-reader-multilib.patch

4c2ad1
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
4c2ad1
From: Fedora GDB patches <invalid@email.com>
4c2ad1
Date: Fri, 27 Oct 2017 21:07:50 +0200
4c2ad1
Subject: gdb-jit-reader-multilib.patch
4c2ad1
4c2ad1
;; Fix jit-reader.h for multi-lib.
4c2ad1
;;=push+jan
4c2ad1
4c2ad1
diff --git a/gdb/configure b/gdb/configure
4c2ad1
--- a/gdb/configure
4c2ad1
+++ b/gdb/configure
4c2ad1
@@ -9680,10 +9680,12 @@ _ACEOF
4c2ad1
 
4c2ad1
 
4c2ad1
 
4c2ad1
-if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
4c2ad1
-  TARGET_PTR="unsigned long"
4c2ad1
-elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
4c2ad1
+# Try to keep TARGET_PTR the same across archs so that jit-reader.h file
4c2ad1
+# content is the same for multilib distributions.
4c2ad1
+if test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
4c2ad1
   TARGET_PTR="unsigned long long"
4c2ad1
+elif test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
4c2ad1
+  TARGET_PTR="unsigned long"
4c2ad1
 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
4c2ad1
   TARGET_PTR="unsigned __int128"
4c2ad1
 else
4c2ad1
diff --git a/gdb/configure.ac b/gdb/configure.ac
4c2ad1
--- a/gdb/configure.ac
4c2ad1
+++ b/gdb/configure.ac
4c2ad1
@@ -843,10 +843,12 @@ AC_CHECK_SIZEOF(unsigned long long)
4c2ad1
 AC_CHECK_SIZEOF(unsigned long)
4c2ad1
 AC_CHECK_SIZEOF(unsigned __int128)
4c2ad1
 
4c2ad1
-if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
4c2ad1
-  TARGET_PTR="unsigned long"
4c2ad1
-elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
4c2ad1
+# Try to keep TARGET_PTR the same across archs so that jit-reader.h file
4c2ad1
+# content is the same for multilib distributions.
4c2ad1
+if test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
4c2ad1
   TARGET_PTR="unsigned long long"
4c2ad1
+elif test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
4c2ad1
+  TARGET_PTR="unsigned long"
4c2ad1
 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
4c2ad1
   TARGET_PTR="unsigned __int128"
4c2ad1
 else