[RTEMS Project] #2698: GCC 6.1 is broken for microblaze

RTEMS trac trac at rtems.org
Thu Apr 21 14:54:47 UTC 2016


#2698: GCC 6.1 is broken for microblaze
-----------------------------+-------------------
 Reporter:  sebastian.huber  |       Owner:
     Type:  defect           |      Status:  new
 Priority:  normal           |   Milestone:  4.12
Component:  GCC              |     Version:  4.12
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+-------------------

Comment (by joel.sherrill):

 This is in gcc/config/microblaze/microblaze.h:

 =============================================================
 /* Extra switches sometimes passed to the linker.  */
 /* -xl-mode-xmdstub translated to -Zxl-mode-xmdstub -- deprecated.  */

 #define LINK_SPEC "%{shared:-shared} -N -relax \
   %{mbig-endian:-EB --oformat=elf32-microblaze} \
   %{mlittle-endian:-EL --oformat=elf32-microblazeel} \
   %{Zxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
   %{mxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
   %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0} \
   %{!T*: -dT xilinx.ld%s}"
 =============================================================

 We can add an undef of LINK_SPEC to gcc/config/microblaze/rtems.h as a
 minimum. Or we can redefine it to a subset of what it is by default.

 Based on the set of libc.a's installed, I think we need at least the
 endian flags. I would tend to keep the mxl-gp-opt since it looks harmless
 enough. But I would redefine and drop the xmdstub and xilinx.ld ones (drop
 3, keep rest). That results in:

 #undef LINK_SPEC
 #define LINK_SPEC "%{shared:-shared} -N -relax \
   %{mbig-endian:-EB --oformat=elf32-microblaze} \
   %{mlittle-endian:-EL --oformat=elf32-microblazeel} \
   %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0}

 How does that look?

--
Ticket URL: <http://devel.rtems.org/ticket/2698#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list