From 1d8c32f88238a13099e5bd2255356402fc5f6b01 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Fri, 5 Jun 2020 07:28:08 -0700 Subject: meta-xilinx-bsp: binutils: Fix microblaze compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In some situations the microblaze patches will be enabled for the binutils-native compilation. Fix a compilation issue related to a change in the way the md_pseudo_table structure definition has changed. | ../../gas/config/tc-i386.c:1155:20: error: conflicting types for ‘md_pseudo_table’ | const pseudo_typeS md_pseudo_table[] = | ^~~~~~~~~~~~~~~ | In file included from ../../gas/as.h:565:0, | from ../../gas/config/tc-i386.c:28: | ../../gas/tc.h:25:21: note: previous declaration of ‘md_pseudo_table’ was here| extern pseudo_typeS md_pseudo_table[]; | ^~~~~~~~~~~~~~~ To support binutils-native on other host types, such as aarch64 a similar patch is likely needed for those types as well. Signed-off-by: Mark Hatle --- .../binutils/binutils-microblaze.inc | 1 + .../binutils/0050-Fix-i386-md_pseudo_table.patch | 28 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 meta-xilinx-bsp/recipes-microblaze/binutils/binutils/0050-Fix-i386-md_pseudo_table.patch diff --git a/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-microblaze.inc b/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-microblaze.inc index a9fa18ce..ed6e75b2 100644 --- a/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-microblaze.inc +++ b/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-microblaze.inc @@ -50,4 +50,5 @@ SRC_URI_append = " \ file://0047-Patch-MicroBlaze-commit-for-triggering-build-to-remo.patch \ file://0048-Patch-MicroBlaze-Adding-more-description-to-the-imml.patch \ file://0049-Patch-MicroBlaze-improper-address-mapping-of-PROVIDE.patch \ + file://0050-Fix-i386-md_pseudo_table.patch \ " diff --git a/meta-xilinx-bsp/recipes-microblaze/binutils/binutils/0050-Fix-i386-md_pseudo_table.patch b/meta-xilinx-bsp/recipes-microblaze/binutils/binutils/0050-Fix-i386-md_pseudo_table.patch new file mode 100644 index 00000000..9469732e --- /dev/null +++ b/meta-xilinx-bsp/recipes-microblaze/binutils/binutils/0050-Fix-i386-md_pseudo_table.patch @@ -0,0 +1,28 @@ +Fix a possible compilation issue on i386 when using microblaze patches + +Due to patch 0019, a later item may need to refer to this table. + +| ../../gas/config/tc-i386.c:1155:20: error: conflicting types for ‘md_pseudo_table’ +| const pseudo_typeS md_pseudo_table[] = +| ^~~~~~~~~~~~~~~ +| In file included from ../../gas/as.h:565:0, +| from ../../gas/config/tc-i386.c:28: +| ../../gas/tc.h:25:21: note: previous declaration of ‘md_pseudo_table’ was here +| extern pseudo_typeS md_pseudo_table[]; +| ^~~~~~~~~~~~~~~ + +Signed-off-by: Mark Hatle + +Index: git/gas/config/tc-i386.c +=================================================================== +--- git.orig/gas/config/tc-i386.c ++++ git/gas/config/tc-i386.c +@@ -1152,7 +1152,7 @@ pe_lcomm (int needs_align) + } + #endif + +-const pseudo_typeS md_pseudo_table[] = ++pseudo_typeS md_pseudo_table[] = + { + #if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO) + {"align", s_align_bytes, 0}, -- cgit v1.2.3-54-g00ecf