summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-01-04 10:33:47 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-05 11:55:35 +0000
commit2cad9ff9d181b3be5e89b6e9e23385181840d159 (patch)
tree9ea89d8faaeeb1d20ee3d6d634bcd9d6eead4795 /meta/recipes-devtools/gdb
parent82e7cd6f7512420748c1e3470c0229e6d32ff9a7 (diff)
downloadpoky-2cad9ff9d181b3be5e89b6e9e23385181840d159.tar.gz
gdb: fix build with x32
When compiling gdb for x32, it fails with errors: |../../../gdb-8.0/gdb/gdbserver/linux-amd64-ipa.c: In function 'const target_desc* get_ipa_tdesc(int)': |../../../gdb-8.0/gdb/gdbserver/linux-amd64-ipa.c:184:10: error: 'X86_TDESC_AVX512' was not declared in this scope | case X86_TDESC_AVX512: | ^~~~~~~~~~~~~~~~ |../../../gdb-8.0/gdb/gdbserver/linux-amd64-ipa.c:184:10: note: suggested alternative: 'X86_TDESC_AVX' | case X86_TDESC_AVX512: | ^~~~~~~~~~~~~~~~ | X86_TDESC_AVX |../../../gdb-8.0/gdb/gdbserver/linux-amd64-ipa.c:185:14: error: 'tdesc_x32_avx512_linux' was not declared in this scope | return tdesc_x32_avx512_linux; | ^~~~~~~~~~~~~~~~~~~~~~ |../../../gdb-8.0/gdb/gdbserver/linux-amd64-ipa.c:185:14: note: suggested alternative: 'tdesc_x32_avx_linux' | return tdesc_x32_avx512_linux; | ^~~~~~~~~~~~~~~~~~~~~~ | tdesc_x32_avx_linux |../../../gdb-8.0/gdb/gdbserver/linux-amd64-ipa.c: In function 'void initialize_low_tracepoint()': |../../../gdb-8.0/gdb/gdbserver/linux-amd64-ipa.c:282:3: error: 'init_registers_x32_avx512_linux' was not declared in this scope | init_registers_x32_avx512_linux (); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |../../../gdb-8.0/gdb/gdbserver/linux-amd64-ipa.c:282:3: note: suggested alternative: 'init_registers_x32_avx_linux' | init_registers_x32_avx512_linux (); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | init_registers_x32_avx_linux Backport: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=f02fd7745d003d65fd3b981618e07b874b721d79 Fixes [YOCTO #12120] (From OE-Core rev: 2557af944db081c1043f6052bc0f11e58022aeb7) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gdb')
-rw-r--r--meta/recipes-devtools/gdb/gdb-8.0.1.inc1
-rw-r--r--meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch101
2 files changed, 102 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-8.0.1.inc b/meta/recipes-devtools/gdb/gdb-8.0.1.inc
index 04a1c809db..83c08e55a3 100644
--- a/meta/recipes-devtools/gdb/gdb-8.0.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-8.0.1.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
16 file://0009-Change-order-of-CFLAGS.patch \ 16 file://0009-Change-order-of-CFLAGS.patch \
17 file://0010-resolve-restrict-keyword-conflict.patch \ 17 file://0010-resolve-restrict-keyword-conflict.patch \
18 file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ 18 file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
19 file://0012-Unbreak-GDBserver-build-for-x32.patch \
19" 20"
20SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac" 21SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac"
21SRC_URI[sha256sum] = "3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3" 22SRC_URI[sha256sum] = "3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3"
diff --git a/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch b/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch
new file mode 100644
index 0000000000..18a3ce3d63
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch
@@ -0,0 +1,101 @@
1From 3e1e401053ea5f02a9e9c65abddd31a03baa1bd1 Mon Sep 17 00:00:00 2001
2From: Yao Qi <yao.qi@linaro.org>
3Date: Fri, 29 Dec 2017 12:57:25 +0800
4Subject: [PATCH] Unbreak GDBserver build for x32
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9When I verify my target description changes, I build GDB and GDBserver for
10x32, but it failed.
11
12/../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c
13../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘const target_desc* get_ipa_tdesc(int)’:
14../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:184:10: error: ‘X86_TDESC_AVX512’ was not declared in this scope
15 case X86_TDESC_AVX512:
16 ^
17../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:185:14: error: ‘tdesc_x32_avx512_linux’ was not declared in this scope
18 return tdesc_x32_avx512_linux;
19 ^
20../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘void initialize_low_tracepoint()’:
21../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:282:36: error: ‘init_registers_x32_avx512_linux’ was not declared in this scope
22 init_registers_x32_avx512_linux ();
23 ^
24
25ipa_x32_linux_regobj use to be there, but removed by
2622049425ce40324139be82d9a6ec518c46b65815 by mistake.
27
28gdb/gdbserver:
29
302017-08-04 Yao Qi <yao.qi@linaro.org>
31
32 * configure.srv (ipa_x32_linux_regobj): New.
33 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
34 instead of X86_TDESC_AVX512.
35 (initialize_low_tracepoint): Call
36 init_registers_x32_avx_avx512_linux.
37
38Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=f02fd7745d003d65fd3b981618e07b874b721d79]
39
40Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
41---
42 ChangeLog | 8 ++++++++
43 gdb/gdbserver/configure.srv | 1 +
44 gdb/gdbserver/linux-amd64-ipa.c | 6 +++---
45 3 files changed, 12 insertions(+), 3 deletions(-)
46
47diff --git a/ChangeLog b/ChangeLog
48index 4ac2d63..b5b8228 100644
49--- a/ChangeLog
50+++ b/ChangeLog
51@@ -1,3 +1,11 @@
52+ 2017-08-04 Yao Qi <yao.qi@linaro.org>
53+
54+ * configure.srv (ipa_x32_linux_regobj): New.
55+ * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
56+ instead of X86_TDESC_AVX512.
57+ (initialize_low_tracepoint): Call
58+ init_registers_x32_avx_avx512_linux.
59+
60 2017-04-13 Andrew Jenner <andrew@codesourcery.com>
61
62 * config.sub: Sync with master version in config project.
63diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
64index d00d9e2..56951c8 100644
65--- a/gdb/gdbserver/configure.srv
66+++ b/gdb/gdbserver/configure.srv
67@@ -31,6 +31,7 @@ srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx-avx512-linux.o
68
69 ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o i386-avx-mpx-linux-ipa.o i386-avx-avx512-linux-ipa.o i386-avx-mpx-avx512-pku-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o"
70 ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx-avx512-linux-ipa.o amd64-avx-mpx-avx512-pku-linux-ipa.o amd64-mpx-linux-ipa.o"
71+ipa_x32_linux_regobj="x32-linux-ipa.o x32-avx-linux-ipa.o x32-avx-avx512-linux-ipa.o"
72 ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-cell32l-ipa.o powerpc-vsx32l-ipa.o powerpc-isa205-32l-ipa.o powerpc-isa205-altivec32l-ipa.o powerpc-isa205-vsx32l-ipa.o powerpc-e500l-ipa.o powerpc-64l-ipa.o powerpc-altivec64l-ipa.o powerpc-cell64l-ipa.o powerpc-vsx64l-ipa.o powerpc-isa205-64l-ipa.o powerpc-isa205-altivec64l-ipa.o powerpc-isa205-vsx64l-ipa.o"
73
74 srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml i386/32bit-pkeys.xml"
75diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c
76index 67f36c2..683339b 100644
77--- a/gdb/gdbserver/linux-amd64-ipa.c
78+++ b/gdb/gdbserver/linux-amd64-ipa.c
79@@ -181,8 +181,8 @@ get_ipa_tdesc (int idx)
80 return tdesc_x32_linux;
81 case X86_TDESC_AVX:
82 return tdesc_x32_avx_linux;
83- case X86_TDESC_AVX512:
84- return tdesc_x32_avx512_linux;
85+ case X86_TDESC_AVX_AVX512:
86+ return tdesc_x32_avx_avx512_linux;
87 default:
88 break;
89 }
90@@ -279,7 +279,7 @@ initialize_low_tracepoint (void)
91 #if defined __ILP32__
92 init_registers_x32_linux ();
93 init_registers_x32_avx_linux ();
94- init_registers_x32_avx512_linux ();
95+ init_registers_x32_avx_avx512_linux ();
96 #else
97 init_registers_amd64_linux ();
98 init_registers_amd64_avx_linux ();
99--
1002.7.4
101