#2330 assigned defect

nios2 missing atomics, fails to link C++

Reported by: Joel Sherrill Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: unspecified Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

nios2-rtems4.11-g++ -B../../../../../nios2_iss/lib/ -specs bsp_specs -qrtems -mno-hw-mul -mno-hw-div -O0 -g -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -mno-hw-mul -mno-hw-div -o cxx_iostream.exe init.o
/users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(ios-inst.o): In function `atomic_add':
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:53: undefined reference to `
sync_fetch_and_add_4'
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:53: undefined reference to `sync_fetch_and_add_4'
/users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(ios_init.o): In function `
exchange_and_add_dispatch':
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:49: undefined reference to `sync_fetch_and_add_4'
/users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(ios_init.o): In function `
atomic_add_dispatch':
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:53: undefined reference to `sync_fetch_and_add_4'
/users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(ios_init.o): In function `
exchange_and_add_dispatch':
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:49: undefined reference to `sync_fetch_and_add_4'
/users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(locale-inst.o):/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:49: more undefined references to `
sync_fetch_and_add_4' follow

Change History (5)

comment:1 Changed on Nov 14, 2016 at 5:46:06 PM by Joel Sherrill

Still happens on

nios2-rtems4.12-gcc (GCC) 6.2.1 20161110 (RTEMS 4.12, RSB 5469a486e1b67532e20c48e154c7263c59047be4, Newlib 2.4.0.20161025)

This is the only target left with this issue. Help would be appreciated in resolving this.

comment:2 Changed on Nov 15, 2016 at 6:36:42 AM by Sebastian Huber

From my point of view this is a GCC bug:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78357

comment:3 Changed on Nov 18, 2016 at 7:00:52 AM by Sebastian Huber

Problem fixed in GCC 7. I wait for a back port to GCC 6.

comment:4 Changed on Jan 26, 2017 at 7:16:00 AM by Sebastian Huber

Milestone: 4.11.14.11.2

comment:5 Changed on Feb 15, 2017 at 1:37:51 PM by Sebastian Huber

Milestone: 4.11.2Indefinite
Owner: set to Needs Funding
Status: newassigned
Note: See TracTickets for help on using tickets.