diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-12-30 17:25:43 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-12-30 17:25:43 +0100 |
commit | e3f2b26ab2e1fd0efd93497676663e184471378e (patch) | |
tree | 284dbc15e5c560eef4a3d6873fd2d5a24a097251 /scripts | |
parent | 1a7ef61410884daff8ff8391ddcecc3102acd989 (diff) | |
download | mupdf-e3f2b26ab2e1fd0efd93497676663e184471378e.tar.xz |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/fontdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |