[RTEMS Project] #4947: Testsuite libtest tests not built with optimise or debug flags
RTEMS trac
trac at rtems.org
Fri Aug 25 23:28:06 UTC 2023
#4947: Testsuite libtest tests not built with optimise or debug flags
-------------------------+---------------------
Reporter: Chris Johns | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone: 6.1
Component: build | Version: 6
Severity: blocker | Resolution:
Keywords: | Blocked By:
Blocking: |
-------------------------+---------------------
Comment (by Chris Johns):
The issue is the tests are not being linked with the right or complete set
of flags.
The optimization flags contain `-g` and given `-g` does not change the
generated code it is questionable if this option should be here or a debug
flags settings or even forced on as an invariant default.
The simplest solution at this point in time is to add
`${TEST_OPTIMIZATION_FLAGS}` to the `ldflags` in the `grp.yml` for the
testsuite.
Adding `TEST_OPTIMIZATION_FLAGS` to the linker flags has the benefit of
linking with `-fdata-sections` and `-ffunction-sections` and given we are
building all the code with those options the tests are not truly testing
the build a user sees.
There is a fragility around having the separate sections flags in
optimization flag set. If someone adjusts the `-O` level they need to
carry the other flags over. Is the separate sections important enough now
that it needs its own setting to avoid simple mistakes?
--
Ticket URL: <http://devel.rtems.org/ticket/4947#comment:3>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list