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

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