#4018 closed defect (fixed)

libcpusupport: Architecture defines are present outside CPU port

Reported by: Kinsey Moore Owned by: Kinsey Moore <kinsey.moore@…>
Priority: normal Milestone: 6.1
Component: admin Version: 6
Severity: normal Keywords:
Cc: Blocked By:


The handler code for global constructors (threadhandler.c) and destructors (newlibc_exit.c) uses compiler-provided architecture defines which should be limited to the CPU port as they are in other locations.

Change History (4)

comment:1 Changed on Jun 30, 2020 at 7:46:41 AM by Kinsey Moore <kinsey.moore@…>

Owner: set to Kinsey Moore <kinsey.moore@…>
Resolution: fixed
Status: newclosed

In 48dd7b8c/rtems:


This introduces the CPU_USE_LIBC_INIT_FINI_ARRAY define for use by CPU
ports to determine which global constructor and destructor methods are
used instead of placing architecture defines where they shouldn't be.

Close #4018

comment:2 Changed on Jun 30, 2020 at 1:43:29 PM by Joel Sherrill

Should this go on 5.x as well as 6?

comment:3 Changed on Jun 30, 2020 at 2:32:47 PM by Kinsey Moore

It could, but it doesn't actually cause a bug. It's just a style deficiency making new ports harder.

comment:4 Changed on Jun 30, 2020 at 3:39:32 PM by Sebastian Huber <sebastian.huber@…>

In 3c78e93/rtems:

score: Clarify CPU_USE_LIBC_INIT_FINI_ARRAY option

Update #4018.

Note: See TracTickets for help on using tickets.