Re: [OE-core] [PATCH] Add -fcommon to BUILD_CFLAGS to a number of recipes

Adrian Bunk
2020-05-03T20:00:11Z

On Sun, May 03, 2020 at 10:26:40AM +0200, Daniel Mack wrote:
> When building on a gcc 10 enabled host distribution (such as Fedora 32),
> a number of recipies need explicit treatment to enable '-fcommon' in
> BUILD_CFLAGS. There might be more of those fixes needed.
>...

These are not fixes, just workarounds.
Adding upstream fixes would be preferable to adding workarounds.

> --- a/meta/recipes-devtools/pseudo/pseudo.inc
> +++ b/meta/recipes-devtools/pseudo/pseudo.inc
> @@ -15,6 +15,8 @@ INSANE_SKIP_${PN}-dbg += "libdir"
>
> PROVIDES += "virtual/fakeroot"
>
> +BUILD_CFLAGS += "-fcommon"
> +
>...

Yocto is upstream for pseudo, is there anything non-trivial required
for a proper fix?

> --- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
> +++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
> @@ -12,6 +12,7 @@ SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
>
> S = "${WORKDIR}/git/squashfs-tools"
>
> +BUILD_CFLAGS += "-fcommon"
>...

The upstream fix is a trivial one-liner that should be backported instead:
https://github.com/plougher/squashfs-tools/commit/fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5

cu
Adrian