diff options
Diffstat (limited to 'recipes-kernel')
-rw-r--r-- | recipes-kernel/linux/files/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch | 60 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-ti-staging_5.4.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/recipes-kernel/linux/files/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch b/recipes-kernel/linux/files/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch new file mode 100644 index 00000000..f5220a86 --- /dev/null +++ b/recipes-kernel/linux/files/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changbin Du <changbin.du@gmail.com> | ||
3 | Date: Tue, 28 Jan 2020 23:29:38 +0800 | ||
4 | Subject: [PATCH] perf: Make perf able to build with latest libbfd | ||
5 | |||
6 | libbfd has changed the bfd_section_* macros to inline functions | ||
7 | bfd_section_<field> since 2019-09-18. See below two commits: | ||
8 | o http://www.sourceware.org/ml/gdb-cvs/2019-09/msg00064.html | ||
9 | o https://www.sourceware.org/ml/gdb-cvs/2019-09/msg00072.html | ||
10 | |||
11 | This fix make perf able to build with both old and new libbfd. | ||
12 | |||
13 | Signed-off-by: Changbin Du <changbin.du@gmail.com> | ||
14 | Acked-by: Jiri Olsa <jolsa@redhat.com> | ||
15 | Cc: Peter Zijlstra <peterz@infradead.org> | ||
16 | Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com | ||
17 | Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ||
18 | --- | ||
19 | tools/perf/util/srcline.c | 16 +++++++++++++++- | ||
20 | 1 file changed, 15 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c | ||
23 | index 6ccf6f6..5b7d6c1 100644 | ||
24 | --- a/tools/perf/util/srcline.c | ||
25 | +++ b/tools/perf/util/srcline.c | ||
26 | @@ -193,16 +193,30 @@ static void find_address_in_section(bfd *abfd, asection *section, void *data) | ||
27 | bfd_vma pc, vma; | ||
28 | bfd_size_type size; | ||
29 | struct a2l_data *a2l = data; | ||
30 | + flagword flags; | ||
31 | |||
32 | if (a2l->found) | ||
33 | return; | ||
34 | |||
35 | - if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0) | ||
36 | +#ifdef bfd_get_section_flags | ||
37 | + flags = bfd_get_section_flags(abfd, section); | ||
38 | +#else | ||
39 | + flags = bfd_section_flags(section); | ||
40 | +#endif | ||
41 | + if ((flags & SEC_ALLOC) == 0) | ||
42 | return; | ||
43 | |||
44 | pc = a2l->addr; | ||
45 | +#ifdef bfd_get_section_vma | ||
46 | vma = bfd_get_section_vma(abfd, section); | ||
47 | +#else | ||
48 | + vma = bfd_section_vma(section); | ||
49 | +#endif | ||
50 | +#ifdef bfd_get_section_size | ||
51 | size = bfd_get_section_size(section); | ||
52 | +#else | ||
53 | + size = bfd_section_size(section); | ||
54 | +#endif | ||
55 | |||
56 | if (pc < vma || pc >= vma + size) | ||
57 | return; | ||
58 | -- | ||
59 | 2.7.4 | ||
60 | |||
diff --git a/recipes-kernel/linux/linux-ti-staging_5.4.bb b/recipes-kernel/linux/linux-ti-staging_5.4.bb index ecf72af9..abf990e9 100644 --- a/recipes-kernel/linux/linux-ti-staging_5.4.bb +++ b/recipes-kernel/linux/linux-ti-staging_5.4.bb | |||
@@ -70,6 +70,7 @@ PR = "${MACHINE_KERNEL_PR}" | |||
70 | KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" | 70 | KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" |
71 | KERNEL_GIT_PROTOCOL = "git" | 71 | KERNEL_GIT_PROTOCOL = "git" |
72 | SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \ | 72 | SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \ |
73 | file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch \ | ||
73 | file://defconfig" | 74 | file://defconfig" |
74 | 75 | ||
75 | FILES_${KERNEL_PACKAGE_NAME}-devicetree += "/${KERNEL_IMAGEDEST}/*.itb" | 76 | FILES_${KERNEL_PACKAGE_NAME}-devicetree += "/${KERNEL_IMAGEDEST}/*.itb" |