[Buildroot] [PATCH] package/zlib-ng: Conditionally enable Power8 option

Arnout Vandecappelle arnout at mind.be
Thu Apr 14 19:37:11 UTC 2022



On 07/04/2022 02:51, Joel Stanley wrote:
> zlib-ng's build system does not correctly detect if it supports the
> Power8 feature. Force it off to fix building for configurations that
> don't support the vector builtin functions.
> 
> For example, building for BR2_powerpc_601:
> 
>    warning: implicit declaration of function ‘vec_xl’; did you mean
>   ‘vec_rl’? [-Wimplicit-function-declaration]
>     93 |             vbuf = vec_xl(0, (unsigned char *) buf);
> 
> Signed-off-by: Joel Stanley <joel at jms.id.au>

  I've added a reference to the commit where this logic was removed and applied 
to master, thanks.

  Regards,
  Arnout

> 
> ---
>   [  3%] Building C object CMakeFiles/zlib.dir/arch/power/adler32_power8.c.o
>   build_ppc601_glibc/host/bin/powerpc-buildroot-linux-gnu-gcc
>   --sysroot=/home/joel/dev/buildroot/build_ppc601_glibc/host/powerpc-buildroot-linux-gnu/sysroot
>   -DHAVE_BUILTIN_CTZ -DHAVE_BUILTIN_CTZLL -DHAVE_POSIX_MEMALIGN
>   -DHAVE_VISIBILITY_HIDDEN -DHAVE_VISIBILITY_INTERNAL -DPOWER8
>   -DPOWER8_VSX_ADLER32 -DPOWER8_VSX_SLIDEHASH -DPOWER_FEATURES
>   -DWITH_GZFILEOP -DZLIB_COMPAT -DZLIB_DLL -D_LARGEFILE64_SOURCE=1
>   -D__USE_LARGEFILE64
>   -I/home/joel/dev/buildroot/build_ppc601_glibc/build/zlib-ng-2.0.6
>   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
>   -g0 -D_FORTIFY_SOURCE=1 -Wall -Wno-implicit-fallthrough  -DNDEBUG -fPIC
>   -fno-semantic-interposition -std=c99 -mcpu=power8 -fno-lto -o
>   CMakeFiles/zlib.dir/arch/power/adler32_power8.c.o -c
>   build_ppc601_glibc/build/zlib-ng-2.0.6/arch/power/adler32_power8.c
>   build_ppc601_glibc/build/zlib-ng-2.0.6/arch/power/adler32_power8.c: In function ‘adler32_power8’:
>   build_ppc601_glibc/build/zlib-ng-2.0.6/arch/power/adler32_power8.c:93:20:
>   warning: implicit declaration of function ‘vec_xl’; did you mean
>   ‘vec_rl’? [-Wimplicit-function-declaration]
>     93 |             vbuf = vec_xl(0, (unsigned char *) buf);
>        |                    ^~~~~~
>        |                    vec_rl
> 
> Signed-off-by: Joel Stanley <joel at jms.id.au>
> ---
>   package/zlib-ng/zlib-ng.mk | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/package/zlib-ng/zlib-ng.mk b/package/zlib-ng/zlib-ng.mk
> index fb497b8c11d0..dd1723ac8672 100644
> --- a/package/zlib-ng/zlib-ng.mk
> +++ b/package/zlib-ng/zlib-ng.mk
> @@ -23,4 +23,11 @@ ifeq ($(BR2_arm),y)
>   ZLIB_NG_CONF_OPTS += -DWITH_ACLE=1 -DWITH_NEON=1
>   endif
>   
> +ifeq ($(BR2_powerpc_power8),y)
> +ZLIB_NG_CONF_OPTS += -DWITH_POWER8=ON
> +else
> +ZLIB_NG_CONF_OPTS += -DWITH_POWER8=OFF
> +endif
> +
> +
>   $(eval $(cmake-package))



More information about the buildroot mailing list