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

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