Skip to content

Commit

Permalink
binutils: fix a build issue that is triggered with the latest OE upda…
Browse files Browse the repository at this point in the history
…te and native gcc10

Some symbols are defined in the header files (not just declared). Older
gcc versions where forgiving for this error but not anymore.
  • Loading branch information
eriksl committed Jul 18, 2020
1 parent 5d7e2ef commit ac844a4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions meta-openpli/recipes-devtools/binutils/binutils_2.32.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:${THISDIR}/files:"

SRC_URI += "file://0001-binutils-program-name-multiply-defined.patch"
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff -ur a/binutils/coffdump.c b/binutils/coffdump.c
--- a/binutils/coffdump.c 2020-07-18 13:13:12.243376649 +0200
+++ b/binutils/coffdump.c 2020-07-18 16:25:32.150313514 +0200
@@ -456,7 +456,7 @@
dump_coff_section (ptr->sections + i);
}

-char * program_name;
+extern char * program_name;

static void
show_usage (FILE *file, int status)
diff -ur a/binutils/srconv.c b/binutils/srconv.c
--- a/binutils/srconv.c 2020-07-18 13:13:12.318377805 +0200
+++ b/binutils/srconv.c 2020-07-18 16:26:34.857280409 +0200
@@ -1687,7 +1687,7 @@
}
}

-char *program_name;
+extern char *program_name;

ATTRIBUTE_NORETURN static void
show_usage (FILE *ffile, int status)
diff -ur a/binutils/sysdump.c b/binutils/sysdump.c
--- a/binutils/sysdump.c 2020-07-18 13:13:12.319377820 +0200
+++ b/binutils/sysdump.c 2020-07-18 16:27:15.699910180 +0200
@@ -633,7 +633,7 @@
}
}

-char *program_name;
+extern char *program_name;

ATTRIBUTE_NORETURN static void
show_usage (FILE *ffile, int status)

0 comments on commit ac844a4

Please sign in to comment.