build failure with VDSO on non-glibc based systems

Nathan Lynch Nathan_Lynch at mentor.com
Tue Jun 23 08:16:15 PDT 2015


On 06/23/2015 05:35 AM, Szabolcs Nagy wrote:
> if the host toolchain is not glibc based then the arm kernel build fails with
> 
>  arch/arm/vdso/vdsomunge.c:53:19: fatal error: error.h: No such file or directory
> 
> error.h is a glibc only header (ie not available in musl, newlib and bsd libcs).

Thanks for the report and the patch.  I agree it is inappropriate to
unnecessarily depend on glibc features in host programs.


> i attached a patch that fixes the build failure for me.

A few issues with the patch prevent me from accepting it as-is.

The patch lacks the required Signed-off-by: line; see part 11 in
Documentation/SubmittingPatches.

The body of your email would suffice as the commit log; please include
it in the patch itself.


>  
> +#define fail(...) ( \
> +	failed = 1, \
> +	fprintf(stderr, "%s: ", argv0), \
> +	fprintf(stderr, __VA_ARGS__), \
> +	exit(EXIT_FAILURE))
> +

It would be more in keeping with Linux coding style to write this as a
do { ... } while (0) block (Chapter 12 of Documentation/CodingStyle).

Writing it as a function, if possible, would be best.

Please attend to these issues and resubmit.  Alternatively, I have a
musl installation I can test with and develop an equivalent fix
(crediting you with the initial report, of course).




More information about the linux-arm-kernel mailing list