#2724 new defect

Compiling GCC 4.4.7 for rtems 4.10 branch fails when compiled with newer GCC

Reported by: Worth Burruss Owned by: Chris Johns
Priority: normal Milestone: 4.10.3
Component: tool/rsb Version: 4.10
Severity: normal Keywords: GCC, RSB, MSYS2, Windows
Cc: Chris Johns Blocked By:
Blocking:

Description

Newer versions of GCC have problems compiling older GCC. Specifically Version 5.3.0 from MSYS2 under windows 7 could not compile 4.4.7. Example errors are:
../../gcc-4.4.7/gcc/toplev.c:536:1: error: redefinition of 'floor_log2'
and:
../../gcc/cp/cfns.gperf:84:1: error: 'gnu_inline' attribute present on 'libc_name_p'

The patches are discussed here: https://gcc.gnu.org/ml/gcc-patches/2009-06/msg01249.html and here: https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00375.html

The second error is in gdb and is specific to compiling under windows. An example of the error is:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../lib/libncurses.a(lib_tputs.o):(.text+0x8b0): multiple definition of `tputs'

libgdb.a(windows-termcap.o):C:\opt\rtems\rsb\rtems\build\mrg7xwm1\build\gdb/../../gdb-7.3.1/gdb/windows-termcap.c:55: first defined here

The problem and solution is discussed here: http://bitthunder.org/misc/2014/07/01/build-arm-gcc-toolchain-for-windows.html

The Solution patches specifically adjusted to rtems 4.10 and creation under the rsb are attached to an email here: https://lists.rtems.org/pipermail/devel/2016-May/015127.html

Attachments (3)

gcc-g++-4.4.7-rtems4.10-20160413.diff (18.8 KB) - added by Worth Burruss on May 31, 2016 at 2:24:09 PM.
gdb-7.3.1-rtems4.10-20160414.diff (465 bytes) - added by Worth Burruss on May 31, 2016 at 2:24:27 PM.
rsb-15april2016.diff (2.5 KB) - added by Worth Burruss on May 31, 2016 at 2:24:44 PM.

Download all attachments as: .zip

Change History (4)

Changed on May 31, 2016 at 2:24:09 PM by Worth Burruss

Changed on May 31, 2016 at 2:24:27 PM by Worth Burruss

Changed on May 31, 2016 at 2:24:44 PM by Worth Burruss

Attachment: rsb-15april2016.diff added

comment:1 Changed on Jan 26, 2018 at 10:17:15 PM by David

I encountered this same issue on Linux (Ubuntu) and the patch posted here resolved it for me.

Note: See TracTickets for help on using tickets.