diff options
author | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2015-10-13 13:18:39 +0200 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2015-10-13 13:18:39 +0200 |
commit | 43a249df9f257ea2d50f68815e33e9c238740e6f (patch) | |
tree | 94a6399749457ff25fe027d830a3ef940a216ee5 | |
parent | d67cd53d9a23147e04998a499eda314faff7face (diff) | |
download | powertop-2.0-linaro-android.tar.gz |
Build fixes for Android Mlinaro-android
Don't assume that Android means STLport... M uses libc++
Change-Id: I2abe680f365f043b211ce5e024c65a01b0f5473a
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r-- | Android.mk | 10 | ||||
-rw-r--r-- | src/android_stubs.h | 5 |
2 files changed, 9 insertions, 6 deletions
@@ -5,8 +5,7 @@ include $(LOCAL_PATH)/android.config LOCAL_MODULE := powertop LOCAL_MODULE_TAGS := debug -LOCAL_SHARED_LIBRARIES := libstlport \ - libnl \ +LOCAL_SHARED_LIBRARIES := libnl LOCAL_STATIC_LIBRARIES := libncurses @@ -30,9 +29,7 @@ LOCAL_CPPFLAGS += -DHAVE_NO_PCI \ -DDEFAULT_TERM=\"xterm\" \ -DTERMINFO_PATH=\"/system/etc/terminfo\" -LOCAL_C_INCLUDES += external/stlport/stlport/ \ - external/stlport/stlport/stl \ - external/stlport/stlport/using/h/ \ +LOCAL_C_INCLUDES += external/libcxx/include/ \ bionic \ external/libnl/include/ \ external/ncurses/include \ @@ -109,4 +106,7 @@ LOCAL_SRC_FILES += \ traceevent/trace-seq.c systemimage: powertop + +LOCAL_CPPFLAGS += -std=gnu++11 + include $(BUILD_EXECUTABLE) diff --git a/src/android_stubs.h b/src/android_stubs.h index ceea1b1..2364b6f 100644 --- a/src/android_stubs.h +++ b/src/android_stubs.h @@ -1,5 +1,6 @@ #include <linux/ethtool.h> #include <sys/socket.h> +#include <string> // Or any other STL header, we're really after _LIBCPP_VERSION /* Android doesn't provide locale support int its C and C++ * runtime. Handled at higher level in application stack. @@ -12,8 +13,10 @@ #define textdomain(x) #define gettext(x) (x) -/* Android C++ new operator does not throw exception on failure */ +#ifndef _LIBCPP_VERSION +/* STLport C++ new operator does not throw exception on failure */ #define set_new_handler(x) +#endif /* define stubs for C++ exception handling */ #define try if (true) |