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

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