Skip to content

Instantly share code, notes, and snippets.

@huyna
Forked from jduck/strace-static.diff
Created October 1, 2015 10:06
Show Gist options
  • Save huyna/3cc41d9876e303849411 to your computer and use it in GitHub Desktop.
Save huyna/3cc41d9876e303849411 to your computer and use it in GitHub Desktop.
Enable static for building strace for Android
# dev:~/android/source/external/strace$ git diff
#
# to apply & build:
#
# dev:~/android/source/external/strace$ patch -p1 < strace-static.diff
# dev:~/android/source/external/strace$ cd ../..
# dev:~/android/source$ mmm external/strace
#
diff --git a/Android.mk b/Android.mk
index 5274280..4f1707e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -130,8 +130,12 @@ LOCAL_C_INCLUDES := \
LOCAL_MODULE := strace
+LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
+LOCAL_STATIC_LIBRARIES := \
+ libc
+
LOCAL_MODULE_TAGS := debug
include $(BUILD_EXECUTABLE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment