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

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