FDO and LTO on ARM
Fu, Chao-Ying
fu@mips.com
Tue Aug 9 23:35:00 GMT 2011
>
> I identified the libstdc++ failure as a problem when building gcc:
>
> configure:16321: /tmp/build-ndk/gcc-4.7.0/./gcc/xgcc
> -shared-libgcc -B/tmp/build-ndk/gcc-4.7.0/./gcc -nostdinc++
> -L/tmp/build-ndk/gcc-4.7.0/arm-linux-androideabi/libstdc++-v3/
> src
> -L/tmp/build-ndk/gcc-4.7.0/arm-linux-androideabi/libstdc++-v3/
> src/.libs
> -B/tmp/android-ndk-r6/toolchains/arm-linux-androideabi-4.7.0/p
> rebuilt/linux-x86/arm-linux-androideabi/bin/
> -B/tmp/android-ndk-r6/toolchains/arm-linux-androideabi-4.7.0/p
> rebuilt/linux-x86/arm-linux-androideabi/lib/ -isystem
> /tmp/android-ndk-r6/toolchains/arm-linux-androideabi-4.7.0/pre
> built/linux-x86/arm-linux-androideabi/include -isystem
> /tmp/android-ndk-r6/toolchains/arm-linux-androideabi-4.7.0/pre
> built/linux-x86/arm-linux-androideabi/sys-include -c
> -frtti -fexceptions -O2 -Os -g -DTARGET_POSIX_IO
> -fno-short-enums conftest.cpp >&5
> conftest.cpp:35:18: error: 'INT_MIN' was not declared in this scope
> conftest.cpp:36:18: error: 'INT_MAX' was not declared in this scope
> (snip)
> configure:16345: checking for enabled wchar_t specializations
> configure:16347: result: no
>
I hit the same issue sometime ago. This is a bug in NDK platform android-9 "wchar.h".
To fix it, just add <limits.h> into wchar.h.
Ex:
# git diff wchar.h
diff --git a/ndk/platforms/android-9/include/wchar.h b/ndk/platforms/android-9/i
index 9b744a5..fb8714c 100644
--- a/ndk/platforms/android-9/include/wchar.h
+++ b/ndk/platforms/android-9/include/wchar.h
@@ -38,6 +38,7 @@
#include <stdarg.h>
#include <time.h>
#include <malloc.h>
+#include <limits.h>
#include <stddef.h>
Regards,
Chao-ying
More information about the Gcc
mailing list