> From: Hans-Peter Nilsson <h...@axis.com> > Date: Thu, 31 Aug 2023 19:05:19 +0200
> > Date: Thu, 31 Aug 2023 17:25:45 +0200 > > From: Christophe Lyon via Gcc-patches <gcc-patches@gcc.gnu.org> > > However, this would hide the fact that libstdc++ somehow forces the > > user to use -Wl,-gc-sections to avoid undefined references to chdir, > > mkdir, chmod, pathconf, ... so maybe it's better to keep the status > > quo and not apply this patch? I agree with the sentiment, but maybe --gc-sections should instead be passed by default for arm-eabi when linking, with way to opt-out; as for cris-elf per below. > Datapoint: no failures for cris-elf in the listed tests - > but it instead passes --gc-sections if -O2 or -O3 is seen > for linking; see cris/cris.h. It's been like that forever, > modulo a patch in 2002 not passing it if "-r" is seen. > > Incidentally, I've been sort-of investigating a recent-ish > commit to newlib (8/8) that added a stub for getpriority, > which was apparently added due to testsuite breakage for > libstdc++ and arm-eabi, but that instead broke testsuite > results for *other* targets, as warning at link-time. Film > at 11. > > > 2023-08-31 Christophe Lyon <christophe.l...@linaro.org> > > > > libstdc++-v3/ChangeLog: > > > > PR libstdc++/111238 > > * configure: Regenerate. > > * configure.ac: Call GLIBCXX_CHECK_LINKER_FEATURES in cross, > > non-Canadian builds. > > On this actual patch, I can't say yay or nay though (but > leaning towards yay), but I'll test for cris-elf. Would you > mind holding off committing for a day or two? No regressions for cris-elf with this patch. Still, on one thought I'm also not wild about libstdc++ this way overriding the target, and on the other hand, I'll likely to suggest something similar (adding options) to "improve" GCC_TRY_COMPILE_OR_LINK (more targets actually linking). brgds, H-P