[Buildroot] [PATCH 1/1] package/gpsd: remove -std=gnu++98 from CFLAGS

Peter Korsgaard peter at korsgaard.com
Fri Oct 10 06:16:17 UTC 2025


>>>>> "yann" == yann morin <yann.morin at orange.com> writes:

 > Bernd, All,
 > On 2025-10-09 18:56 +0200, Bernd Kuhls spake thusly:
 >> In 2016 buildroot commit b4c050e9afed7a8dc302e6e1014cc4ffb508590d added
 >> -std=gnu++98 also to CFLAGS knowing that it will cause warnings:
 >> https://lists.nongnu.org/archive/html/gpsd-dev/2016-09/msg00082.html
 >> 'Although this leads to lots of warnings on every compilation with gcc:
 >> "cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C"'
 >> These warnings are still present but cause a misdetection in configure
 >> Checking if strerror_r() returns int... no
 >> because here warnings are treated as errors, quoting config.log:
 >> cc1: error: command-line option ‘-std=gnu++98’ is valid for C++/ObjC++ but not for C [-Werror]
 >> cc1: all warnings being treated as errors

 > I'm not sure why we only notice today, though: the toolchain is gcc-14,
 > which is not really new, and there is only this one single failure in
 > the autobuilders...

 >> In 2017 upstream committed
 >> https://gitlab.com/gpsd/gpsd/-/commit/d287c76f4f2e1ffd275da41b84f9e08ea7f74344
 >> which added "std::" namespace prefixes and fixed the original problem.
 >> -std=gnu++98 being removed from CFLAGS lets configure correctly detect
 >> strerror_r():
 >> Checking if strerror_r() returns int... yes

 > Awesome research, thanks! I've been scratching my head on this, but I
 > missed the upstream commit d287c76f4f2e you spotted. 👍

 > [--SNIP--]
 >> Fixes:
 >> https://autobuild.buildroot.org/results/52d747d33d714ea10b9e7ee10adeadd9e4512c2d/
 >> Signed-off-by: Bernd Kuhls <bernd at kuhls.net>

 > Tested-by: Yann E. MORIN <yann.morin at orange.com>
 > Reviewed-by: Yann E. MORIN <yann.morin at orange.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list