From e3f2b26ab2e1fd0efd93497676663e184471378e Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Fri, 30 Dec 2016 17:25:43 +0100 Subject: Avoid using .incbin when compiling for Android. The clang 3.8 used in Android NDK r13 supports .incbin, but doesn't take any -I arguments into account when looking for the file to be included. In Android we depend on -I to locate the font files to be included. For ARM-based targets this works becased Android NDK supplies -fno-integrated-as to cause the compiler to use an external assembler that searches the -I arguments to locate the file to include. For x86-based targets -fno-integrated-as is not supplied so the files cannot be located and thus the compilation fails. To avoid this problem and be as robust as possible let's disable the .incbin directive for Android for all architectures and compilers. --- scripts/fontdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/fontdump.c b/scripts/fontdump.c index 8bb7b8a2..4669b6ee 100644 --- a/scripts/fontdump.c +++ b/scripts/fontdump.c @@ -49,7 +49,7 @@ main(int argc, char **argv) fprintf(fo, "#ifndef __STRICT_ANSI__\n"); fprintf(fo, "#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)\n"); - fprintf(fo, "#if !defined(__ICC)\n"); + fprintf(fo, "#if !defined(__ICC) && !defined(__ANDROID__)\n"); fprintf(fo, "#define HAVE_INCBIN\n"); fprintf(fo, "#endif\n"); fprintf(fo, "#endif\n"); -- cgit v1.2.3