[Buildroot] [PATCH] package/zlib-ng: fix build failure for PowerPC soft-float
Romain Naour
romain.naour at smile.fr
Fri May 15 14:36:05 UTC 2026
Hello Giulio, All,
Le 21/02/2026 à 19:45, Giulio Benetti a écrit :
> As suggested in this review[1], when building for PowerPC with soft-float
> enabled, let's also disable both WITH_POWER8/9 that in order disables
> all the possible PowerPC acceleration instructions.
>
> Fixes:
> https://autobuild.buildroot.org/results/a0fa5a175c546993d818371a0de93b2e9845a183/
>
> [1]: https://github.com/zlib-ng/zlib-ng/pull/2151/changes#r2803264882
>
> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
> ---
> package/zlib-ng/zlib-ng.mk | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/package/zlib-ng/zlib-ng.mk b/package/zlib-ng/zlib-ng.mk
> index 59e4e15282..92e3659b59 100644
> --- a/package/zlib-ng/zlib-ng.mk
> +++ b/package/zlib-ng/zlib-ng.mk
> @@ -30,6 +30,10 @@ else
> ZLIB_NG_CONF_OPTS += -DWITH_NEON=OFF
> endif
>
> +ifeq ($(BR2_POWERPC_SOFT_FLOAT),y)
> +# Explicitly disable PowerPC accelerations
> +ZLIB_NG_CONF_OPTS += -DWITH_POWER8=OFF -DWITH_POWER9=OFF
> +else
> ifeq ($(BR2_powerpc_power8),y)
> ZLIB_NG_CONF_OPTS += -DWITH_POWER8=ON
> else
> @@ -41,5 +45,6 @@ ZLIB_NG_CONF_OPTS += -DWITH_POWER9=ON
> else
> ZLIB_NG_CONF_OPTS += -DWITH_POWER9=OFF
> endif
> +endif
I would suggest adding BR2_POWERPC_SOFT_FLOAT in each if clause:
# zlib-ng PowerPC acceleration instructions are not supported for PowerPC with
soft-float.
ifeq ($(BR2_powerpc_power8):$(BR2_POWERPC_SOFT_FLOAT),y:)
ZLIB_NG_CONF_OPTS += -DWITH_POWER8=ON
else
ZLIB_NG_CONF_OPTS += -DWITH_POWER8=OFF
endif
ifeq ($(BR2_powerpc_power9):$(BR2_POWERPC_SOFT_FLOAT),y:)
ZLIB_NG_CONF_OPTS += -DWITH_POWER9=ON
else
ZLIB_NG_CONF_OPTS += -DWITH_POWER9=OFF
endif
Best regards,
Romain
>
> $(eval $(cmake-package))
More information about the buildroot
mailing list