| Message ID | 20260408044737.696968-1-khem.raj@oss.qualcomm.com |
|---|---|
| State | Accepted, archived |
| Commit | 8615b3388b97a56096b959dea4d7499e03187100 |
| Headers | show |
| Series | db: Pin to use C99 std | expand |
On Tue, 2026-04-07 at 21:47 -0700, Khem Raj via lists.openembedded.org wrote: > GCC-15 has switched to using C23 by default, we have been selectively > disabling warnings as errors to get by, however with autoconf 2.72 adding > -std=gnu23 it now gets enabled for every compiler and clang-22 is more > obidient and has dropped support for K&R C completely. db5 code has a lot > of K&R C prototypes and it starts to fail vigorously. We can not keep > working around with out uplifting sources to be compliant with newer C > standard like C23. > > Therefore pin the cflags to use C99 standard as this package expects. > > Drop the code to disable warnings as errors selectively. > > Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> > --- > meta/recipes-support/db/db_5.3.28.bb | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) This seemed to trigger failures for me, e.g.: https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/3538#bb-step-15 Cheers, Richard
On Fri Apr 10, 2026 at 3:15 PM CEST, Richard Purdie via lists.openembedded.org wrote: > On Tue, 2026-04-07 at 21:47 -0700, Khem Raj via lists.openembedded.org wrote: >> GCC-15 has switched to using C23 by default, we have been selectively >> disabling warnings as errors to get by, however with autoconf 2.72 adding >> -std=gnu23 it now gets enabled for every compiler and clang-22 is more >> obidient and has dropped support for K&R C completely. db5 code has a lot >> of K&R C prototypes and it starts to fail vigorously. We can not keep >> working around with out uplifting sources to be compliant with newer C >> standard like C23. >> >> Therefore pin the cflags to use C99 standard as this package expects. >> >> Drop the code to disable warnings as errors selectively. >> >> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> >> --- >> meta/recipes-support/db/db_5.3.28.bb | 9 ++++----- >> 1 file changed, 4 insertions(+), 5 deletions(-) > > This seemed to trigger failures for me, e.g.: > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/3538#bb-step-15 > > Cheers, > > Richard This is because the patch is touching lines ending with spaces, and these spaces have not been kept in the mail. I tweaked the patch to make it work correctly, it landed in my -success branch. Thanks, Mathieu
I sent a v2 please use that https://lore.kernel.org/openembedded-core/20260408162759.842544-1-khem.raj@oss.qualcomm.com/ On Fri, Apr 10, 2026, 6:38 AM Mathieu Dubois-Briand < mathieu.dubois-briand@bootlin.com> wrote: > On Fri Apr 10, 2026 at 3:15 PM CEST, Richard Purdie via > lists.openembedded.org wrote: > > On Tue, 2026-04-07 at 21:47 -0700, Khem Raj via lists.openembedded.org > wrote: > >> GCC-15 has switched to using C23 by default, we have been selectively > >> disabling warnings as errors to get by, however with autoconf 2.72 > adding > >> -std=gnu23 it now gets enabled for every compiler and clang-22 is more > >> obidient and has dropped support for K&R C completely. db5 code has a > lot > >> of K&R C prototypes and it starts to fail vigorously. We can not keep > >> working around with out uplifting sources to be compliant with newer C > >> standard like C23. > >> > >> Therefore pin the cflags to use C99 standard as this package expects. > >> > >> Drop the code to disable warnings as errors selectively. > >> > >> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> > >> --- > >> meta/recipes-support/db/db_5.3.28.bb | 9 ++++----- > >> 1 file changed, 4 insertions(+), 5 deletions(-) > > > > This seemed to trigger failures for me, e.g.: > > > > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/3538#bb-step-15 > > > > Cheers, > > > > Richard > > This is because the patch is touching lines ending with spaces, and > these spaces have not been kept in the mail. > > I tweaked the patch to make it work correctly, it landed in my -success > branch. > > Thanks, > Mathieu > > > -- > Mathieu Dubois-Briand, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com > >
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb index 8d2af1f5dc..f6205ec125 100644 --- a/meta/recipes-support/db/db_5.3.28.bb +++ b/meta/recipes-support/db/db_5.3.28.bb @@ -71,7 +71,11 @@ AUTOTOOLS_SCRIPT_PATH = "${S}/dist" # configure. CONFIG_SITE = "" +CFLAGS += "-std=gnu99" + oe_runconf:prepend() { + export CFLAGS="${CFLAGS}" + . ${S}/dist/RELEASE # Edit version information we couldn't pre-compute. sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \ @@ -115,8 +119,3 @@ INSANE_SKIP:${PN} = "dev-so" INSANE_SKIP:${PN}-cxx = "dev-so" BBCLASSEXTEND = "native nativesdk" - -# many configure tests are failing with gcc-14 -# -Wno-error=incompatible-pointer-types needed for gcc-15 -CFLAGS += "-Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types" -BUILD_CFLAGS += "-Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"
GCC-15 has switched to using C23 by default, we have been selectively disabling warnings as errors to get by, however with autoconf 2.72 adding -std=gnu23 it now gets enabled for every compiler and clang-22 is more obidient and has dropped support for K&R C completely. db5 code has a lot of K&R C prototypes and it starts to fail vigorously. We can not keep working around with out uplifting sources to be compliant with newer C standard like C23. Therefore pin the cflags to use C99 standard as this package expects. Drop the code to disable warnings as errors selectively. Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- meta/recipes-support/db/db_5.3.28.bb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)