lib: add weak clz/ctz functions
This is a copy of the Linux kernel implementation. This adds weak
functions for the clz and ctz gcc builtins. Normally GCC will map
those builtins to CPU instructions directly, but for CPUs where those
are unavailable, we need to provide a fallback implementation.

Fixes build of the zlib decompressor on ARMv4 CPUs.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 7ecd9eb commit 76e439f6c4ca2e17f34d6be888f839299f6df1da
@Lucas Stach Lucas Stach authored on 21 Feb 2018
Sascha Hauer committed on 21 Feb 2018
Showing 2 changed files
View
lib/Makefile
View
lib/clz_ctz.c 0 → 100644