[Buildroot] [PATCH v2 1/3] toolchain: workaround musl/kernel headers conflict
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Wed May 17 13:33:53 UTC 2017
Hello Baruch,
I'm reviving this old thread, because my colleague Florent (in Cc) has
found an issue with this patch.
On Thu, 10 Nov 2016 15:27:11 +0200, Baruch Siach wrote:
> +# [1] http://www.openwall.com/lists/musl/2015/10/08/2
> +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> +define TOOLCHAIN_MUSL_KERNEL_HEADERS_COMPATIBILITY_HACK
> + $(SED) 's/^#if defined(__GLIBC__)$$/#if 1/' \
> + $(STAGING_DIR)/usr/include/linux/libc-compat.h
> +endef
The problem with this is that libc-compat.h was introduced only in
kernel 3.12 (it seems). Therefore, trying to build a musl toolchain
with kernel headers 3.10 currently fails, with this $(SED) command
failing because $(STAGING_DIR)/usr/include/linux/libc-compat.h does not
exist.
So, we could add a kernel headers >= 3.12 to the condition to make the
build work, but then we wouldn't have the fix that these modifications
provide to avoid conflicts between libc and kernel headers.
Do you know if kernel headers < 3.12 are unaffected by the libc/kernel
headers conflict issue? If they are, do you know what the solution is
for kernel headers < 3.12 ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
More information about the buildroot
mailing list