summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2017-11-11 07:45:01 +0000
committerDenys Dmytriyenko <denys@ti.com>2017-11-13 11:48:58 -0500
commit226b93581c8322df38ad794f443d497105a2d3de (patch)
tree01ab1d51470fb9638639a43292a3cb0467e66e97 /recipes-devtools
parent7bdd54b55b75cf0a495e5d07838e4e499892dd9a (diff)
downloadmeta-ti-226b93581c8322df38ad794f443d497105a2d3de.tar.gz
gdbc6x: fix gcc7 implicit fallthrough, format overflow and format truncation errors
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/0001-coffgen.c-adjust-fall-through-comment-to-work-with-g.patch35
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/0001-elf.c-correct-fallthrough-comment-to-recognize-by-gc.patch26
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/0001-elf32-tic6x.c-fix-implicit-fallthrough-error-in-gcc7.patch26
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/0001-elflink.c-fix-implicit-fallthrough-error-in-gcc7.patch25
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/0001-ihex.c-fix-format-overflow-error-in-gcc7.patch26
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/0001-reloc.c-add-comments-for-implicit-fallthrough-error-.patch38
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/0001-srec.c-fix-implicit-fallthrough-and-format-overflow-.patch40
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x/0001-tic6x-dis.c-fix-format-truncation-and-implicit-fallt.patch35
-rw-r--r--recipes-devtools/gdbc6x/gdbc6x_git.bb12
9 files changed, 261 insertions, 2 deletions
diff --git a/recipes-devtools/gdbc6x/gdbc6x/0001-coffgen.c-adjust-fall-through-comment-to-work-with-g.patch b/recipes-devtools/gdbc6x/gdbc6x/0001-coffgen.c-adjust-fall-through-comment-to-work-with-g.patch
new file mode 100644
index 00000000..eb72db9e
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/0001-coffgen.c-adjust-fall-through-comment-to-work-with-g.patch
@@ -0,0 +1,35 @@
1From 043a40fdc396118e099180b0ce0578ead24cf312 Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Fri, 10 Nov 2017 19:12:28 -0500
4Subject: [PATCH] coffgen.c: adjust fall through comment to work with gcc7
5
6Signed-off-by: Denys Dmytriyenko <denys@ti.com>
7---
8 gdbc6x/bfd/coffgen.c | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/gdbc6x/bfd/coffgen.c b/gdbc6x/bfd/coffgen.c
12index 07a527d..665df95 100644
13--- a/gdbc6x/bfd/coffgen.c
14+++ b/gdbc6x/bfd/coffgen.c
15@@ -2116,7 +2116,7 @@ coff_print_symbol (bfd *abfd,
16 auxp->u.auxent.x_scn.x_comdat);
17 break;
18 }
19- /* Otherwise fall through. */
20+ /* Else fall through. */
21 case C_EXT:
22 case C_AIX_WEAKEXT:
23 if (ISFCN (combined->u.syment.n_type))
24@@ -2136,7 +2136,7 @@ coff_print_symbol (bfd *abfd,
25 llnos, next);
26 break;
27 }
28- /* Otherwise fall through. */
29+ /* Else fall through. */
30 default:
31 fprintf (file, "AUX lnno %d size 0x%x tagndx %ld",
32 auxp->u.auxent.x_sym.x_misc.x_lnsz.x_lnno,
33--
342.7.4
35
diff --git a/recipes-devtools/gdbc6x/gdbc6x/0001-elf.c-correct-fallthrough-comment-to-recognize-by-gc.patch b/recipes-devtools/gdbc6x/gdbc6x/0001-elf.c-correct-fallthrough-comment-to-recognize-by-gc.patch
new file mode 100644
index 00000000..de5f1ca1
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/0001-elf.c-correct-fallthrough-comment-to-recognize-by-gc.patch
@@ -0,0 +1,26 @@
1From b77515953ba72728a10a46381d8b1dd73b89825d Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Fri, 10 Nov 2017 20:19:51 -0500
4Subject: [PATCH] elf.c: correct fallthrough comment to recognize by gcc7
5
6Signed-off-by: Denys Dmytriyenko <denys@ti.com>
7---
8 gdbc6x/bfd/elf.c | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/gdbc6x/bfd/elf.c b/gdbc6x/bfd/elf.c
12index ede51e9..80bac08 100644
13--- a/gdbc6x/bfd/elf.c
14+++ b/gdbc6x/bfd/elf.c
15@@ -1595,7 +1595,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
16 if (hdr->sh_link == (SHN_LORESERVE & 0xffff) /* SHN_BEFORE */
17 || hdr->sh_link == ((SHN_LORESERVE + 1) & 0xffff) /* SHN_AFTER */)
18 break;
19- /* Otherwise fall through. */
20+ /* Else fall through. */
21 default:
22 return FALSE;
23 }
24--
252.7.4
26
diff --git a/recipes-devtools/gdbc6x/gdbc6x/0001-elf32-tic6x.c-fix-implicit-fallthrough-error-in-gcc7.patch b/recipes-devtools/gdbc6x/gdbc6x/0001-elf32-tic6x.c-fix-implicit-fallthrough-error-in-gcc7.patch
new file mode 100644
index 00000000..5591f83a
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/0001-elf32-tic6x.c-fix-implicit-fallthrough-error-in-gcc7.patch
@@ -0,0 +1,26 @@
1From fed1d4701b8442c613e7ebc0bb94b251844d3b1c Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Fri, 10 Nov 2017 20:16:20 -0500
4Subject: [PATCH] elf32-tic6x.c: fix implicit fallthrough error in gcc7
5
6Signed-off-by: Denys Dmytriyenko <denys@ti.com>
7---
8 gdbc6x/bfd/elf32-tic6x.c | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/gdbc6x/bfd/elf32-tic6x.c b/gdbc6x/bfd/elf32-tic6x.c
12index fe82c8f..b046566 100644
13--- a/gdbc6x/bfd/elf32-tic6x.c
14+++ b/gdbc6x/bfd/elf32-tic6x.c
15@@ -2365,7 +2365,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
16 goto done_reloc;
17 }
18 }
19-
20+ /* FALLTHRU */
21 case R_C6000_PCR_S12:
22 case R_C6000_PCR_S10:
23 case R_C6000_PCR_S7:
24--
252.7.4
26
diff --git a/recipes-devtools/gdbc6x/gdbc6x/0001-elflink.c-fix-implicit-fallthrough-error-in-gcc7.patch b/recipes-devtools/gdbc6x/gdbc6x/0001-elflink.c-fix-implicit-fallthrough-error-in-gcc7.patch
new file mode 100644
index 00000000..875d7866
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/0001-elflink.c-fix-implicit-fallthrough-error-in-gcc7.patch
@@ -0,0 +1,25 @@
1From 1df6aeea82957cab8094043e458cd1ca0741eaef Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Fri, 10 Nov 2017 20:25:40 -0500
4Subject: [PATCH] elflink.c: fix implicit fallthrough error in gcc7
5
6Signed-off-by: Denys Dmytriyenko <denys@ti.com>
7---
8 gdbc6x/bfd/elflink.c | 1 +
9 1 file changed, 1 insertion(+)
10
11diff --git a/gdbc6x/bfd/elflink.c b/gdbc6x/bfd/elflink.c
12index 7dcafd6..e173399 100644
13--- a/gdbc6x/bfd/elflink.c
14+++ b/gdbc6x/bfd/elflink.c
15@@ -7698,6 +7698,7 @@ eval_symbol (bfd_vma *result,
16
17 case 'S':
18 symbol_is_section = TRUE;
19+ /* FALLTHRU */
20 case 's':
21 ++sym;
22 symlen = strtol (sym, (char **) symp, 10);
23--
242.7.4
25
diff --git a/recipes-devtools/gdbc6x/gdbc6x/0001-ihex.c-fix-format-overflow-error-in-gcc7.patch b/recipes-devtools/gdbc6x/gdbc6x/0001-ihex.c-fix-format-overflow-error-in-gcc7.patch
new file mode 100644
index 00000000..95b6e449
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/0001-ihex.c-fix-format-overflow-error-in-gcc7.patch
@@ -0,0 +1,26 @@
1From daca80121b92504c4a21e7420765a91d9625f2a4 Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Fri, 10 Nov 2017 20:11:45 -0500
4Subject: [PATCH] ihex.c: fix format overflow error in gcc7
5
6Signed-off-by: Denys Dmytriyenko <denys@ti.com>
7---
8 gdbc6x/bfd/ihex.c | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/gdbc6x/bfd/ihex.c b/gdbc6x/bfd/ihex.c
12index 09f756a..abe7398 100644
13--- a/gdbc6x/bfd/ihex.c
14+++ b/gdbc6x/bfd/ihex.c
15@@ -217,7 +217,7 @@ ihex_bad_byte (bfd *abfd, unsigned int lineno, int c, bfd_boolean error)
16 }
17 else
18 {
19- char buf[10];
20+ char buf[13];
21
22 if (! ISPRINT (c))
23 sprintf (buf, "\\%03o", (unsigned int) c);
24--
252.7.4
26
diff --git a/recipes-devtools/gdbc6x/gdbc6x/0001-reloc.c-add-comments-for-implicit-fallthrough-error-.patch b/recipes-devtools/gdbc6x/gdbc6x/0001-reloc.c-add-comments-for-implicit-fallthrough-error-.patch
new file mode 100644
index 00000000..a21d4212
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/0001-reloc.c-add-comments-for-implicit-fallthrough-error-.patch
@@ -0,0 +1,38 @@
1From e4708813cc0d08b75a8db49dcde0722f3d3add5c Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Fri, 10 Nov 2017 19:30:22 -0500
4Subject: [PATCH] reloc.c: add comments for implicit fallthrough error in gcc7
5
6Signed-off-by: Denys Dmytriyenko <denys@ti.com>
7---
8 gdbc6x/bfd/reloc.c | 5 +++++
9 1 file changed, 5 insertions(+)
10
11diff --git a/gdbc6x/bfd/reloc.c b/gdbc6x/bfd/reloc.c
12index 0d191f1..a6e0e12 100644
13--- a/gdbc6x/bfd/reloc.c
14+++ b/gdbc6x/bfd/reloc.c
15@@ -7254,15 +7254,20 @@ bfd_default_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
16 {
17 case 64:
18 BFD_FAIL ();
19+ /* FALLTHRU */
20 case 32:
21 return &bfd_howto_32;
22 case 16:
23 BFD_FAIL ();
24+ /* FALLTHRU */
25 default:
26 BFD_FAIL ();
27+ /* FALLTHRU */
28 }
29+ /* FALLTHRU */
30 default:
31 BFD_FAIL ();
32+ /* FALLTHRU */
33 }
34 return NULL;
35 }
36--
372.7.4
38
diff --git a/recipes-devtools/gdbc6x/gdbc6x/0001-srec.c-fix-implicit-fallthrough-and-format-overflow-.patch b/recipes-devtools/gdbc6x/gdbc6x/0001-srec.c-fix-implicit-fallthrough-and-format-overflow-.patch
new file mode 100644
index 00000000..9ecb5a4a
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/0001-srec.c-fix-implicit-fallthrough-and-format-overflow-.patch
@@ -0,0 +1,40 @@
1From 36293cf669de453207ce38cd8ac296df4a34e6b5 Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Fri, 10 Nov 2017 19:40:41 -0500
4Subject: [PATCH] srec.c: fix implicit fallthrough and format overflow errors
5 in gcc7
6
7Signed-off-by: Denys Dmytriyenko <denys@ti.com>
8---
9 gdbc6x/bfd/srec.c | 4 +++-
10 1 file changed, 3 insertions(+), 1 deletion(-)
11
12diff --git a/gdbc6x/bfd/srec.c b/gdbc6x/bfd/srec.c
13index ded9e76..076e152 100644
14--- a/gdbc6x/bfd/srec.c
15+++ b/gdbc6x/bfd/srec.c
16@@ -248,7 +248,7 @@ srec_bad_byte (bfd *abfd,
17 }
18 else
19 {
20- char buf[10];
21+ char buf[13];
22
23 if (! ISPRINT (c))
24 sprintf (buf, "\\%03o", (unsigned int) c);
25@@ -961,10 +961,12 @@ srec_write_record (bfd *abfd,
26 case 7:
27 TOHEX (dst, (address >> 24), check_sum);
28 dst += 2;
29+ /* FALLTHRU */
30 case 8:
31 case 2:
32 TOHEX (dst, (address >> 16), check_sum);
33 dst += 2;
34+ /* FALLTHRU */
35 case 9:
36 case 1:
37 case 0:
38--
392.7.4
40
diff --git a/recipes-devtools/gdbc6x/gdbc6x/0001-tic6x-dis.c-fix-format-truncation-and-implicit-fallt.patch b/recipes-devtools/gdbc6x/gdbc6x/0001-tic6x-dis.c-fix-format-truncation-and-implicit-fallt.patch
new file mode 100644
index 00000000..e7c7d655
--- /dev/null
+++ b/recipes-devtools/gdbc6x/gdbc6x/0001-tic6x-dis.c-fix-format-truncation-and-implicit-fallt.patch
@@ -0,0 +1,35 @@
1From b14e8814c467e8cea03725d2e7c937f352449ab6 Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Fri, 10 Nov 2017 20:33:26 -0500
4Subject: [PATCH] tic6x-dis.c: fix format truncation and implicit fallthrough
5 errors in gcc7
6
7Signed-off-by: Denys Dmytriyenko <denys@ti.com>
8---
9 gdbc6x/opcodes/tic6x-dis.c | 3 ++-
10 1 file changed, 2 insertions(+), 1 deletion(-)
11
12diff --git a/gdbc6x/opcodes/tic6x-dis.c b/gdbc6x/opcodes/tic6x-dis.c
13index d926d09..69ba999 100644
14--- a/gdbc6x/opcodes/tic6x-dis.c
15+++ b/gdbc6x/opcodes/tic6x-dis.c
16@@ -691,7 +691,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
17 if (opc->flags & TIC6X_FLAG_INSN16_BSIDE && func_unit_side == 1)
18 func_unit_cross = 1;
19
20- snprintf (func_unit_buf, 7, " .%c%u%s%s", func_unit_char,
21+ snprintf (func_unit_buf, 8, " .%c%u%s%s", func_unit_char,
22 func_unit_side, (func_unit_cross ? "X" : ""), data_str);
23 func_unit = func_unit_buf;
24 }
25@@ -1085,6 +1085,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
26 case tic6x_coding_mem_offset_minus_one_noscale:
27 case tic6x_coding_mem_offset_minus_one:
28 fld_val += 1;
29+ /* FALLTHRU */
30 case tic6x_coding_mem_offset_noscale:
31 case tic6x_coding_mem_offset:
32 mem_offset = fld_val;
33--
342.7.4
35
diff --git a/recipes-devtools/gdbc6x/gdbc6x_git.bb b/recipes-devtools/gdbc6x/gdbc6x_git.bb
index 0e6a907c..820e1d01 100644
--- a/recipes-devtools/gdbc6x/gdbc6x_git.bb
+++ b/recipes-devtools/gdbc6x/gdbc6x_git.bb
@@ -5,10 +5,18 @@ LIC_FILES_CHKSUM = "file://debian/copyright;md5=bf0fe2872eb3dfeebb2cbe38206fe81f
5 5
6DEPENDS = "ncurses bison texinfo flex gettext" 6DEPENDS = "ncurses bison texinfo flex gettext"
7 7
8PR = "${INC_PR}.0" 8PR = "${INC_PR}.1"
9 9
10SRC_URI_append = " \ 10SRC_URI_append = " \
11 file://init \ 11 file://init \
12 file://0001-coffgen.c-adjust-fall-through-comment-to-work-with-g.patch;striplevel=2 \
13 file://0001-reloc.c-add-comments-for-implicit-fallthrough-error-.patch;striplevel=2 \
14 file://0001-srec.c-fix-implicit-fallthrough-and-format-overflow-.patch;striplevel=2 \
15 file://0001-ihex.c-fix-format-overflow-error-in-gcc7.patch;striplevel=2 \
16 file://0001-elf32-tic6x.c-fix-implicit-fallthrough-error-in-gcc7.patch;striplevel=2 \
17 file://0001-elf.c-correct-fallthrough-comment-to-recognize-by-gc.patch;striplevel=2 \
18 file://0001-elflink.c-fix-implicit-fallthrough-error-in-gcc7.patch;striplevel=2 \
19 file://0001-tic6x-dis.c-fix-format-truncation-and-implicit-fallt.patch;striplevel=2 \
12" 20"
13 21
14S = "${WORKDIR}/git/gdbc6x" 22S = "${WORKDIR}/git/gdbc6x"
@@ -34,7 +42,7 @@ do_install () {
34 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/gdbserverproxy 42 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/gdbserverproxy
35} 43}
36 44
37RDEPENDS_${PN} = "gdbserverproxy-module-drv" 45RDEPENDS_${PN} = "gdbserverproxy-module-drv bash"
38 46
39include gdbc6x.inc 47include gdbc6x.inc
40 48