https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115158
Bug ID: 115158 Summary: pru: undefined reference to _getentropy after r15-518-g99b1daae18c095 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: dimitar at gcc dot gnu.org Target Milestone: --- Commit r15-518-g99b1daae18c095 appears to have uncovered a latent issue in the PRU backend. Many C++ test cases started failing due to a missing symbol: /home/dinux/projects/pru/testbot-workspace/pru-opt/pru/bin/ld: /home/dinux/projects/pru/testbot-workspace/pru-opt/lib/gcc/pru/15.0.0/../../../../pru/lib/libc.a(libc_a-getentropyr.o): in function `_getentropy_r': /home/dinux/projects/pru/testbot-workspace/newlib/newlib/libc/reent/getentropyr.c:47:(.text._getentropy_r+0x28): undefined reference to `_getentropy' collect2: error: ld returned 1 exit status compiler exited with status 1 FAIL: g++.dg/coroutines/torture/func-params-08.C (test for excess errors) Indeed, that syscall has not been defined by PRU's libgloss. Naive solutions would be to either enable -gc-sections by default for PRU, or define the getentropy syscall for PRU in newlib. I'm filing this bug report because I'd like to investigate a bit why it used to work before.