Opened on 05/31/16 at 14:17:05
Last modified on 01/26/18 at 22:17:15
#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)
Change History (4)
Changed on 05/31/16 at 14:24:09 by Worth Burruss
Attachment: | gcc-g++-4.4.7-rtems4.10-20160413.diff added |
---|
Changed on 05/31/16 at 14:24:27 by Worth Burruss
Attachment: | gdb-7.3.1-rtems4.10-20160414.diff added |
---|
Changed on 05/31/16 at 14:24:44 by Worth Burruss
Attachment: | rsb-15april2016.diff added |
---|
I encountered this same issue on Linux (Ubuntu) and the patch posted here resolved it for me.