[Lldb-commits] [PATCH] Fix global makefiles for the tests to support android
Tamas Berghammer
tberghammer at google.com
Tue Feb 24 03:24:14 PST 2015
Hi vharron, ovyalov,
Fix global makefiles for the tests to support android
Two changes are required to compile the tests for android
* Disable the usage of -lpthread as it is included by default on android
* Add -pie to the linker flags because android only support position independent executables
http://reviews.llvm.org/D7856
Files:
test/make/Makefile.rules
Index: test/make/Makefile.rules
===================================================================
--- test/make/Makefile.rules
+++ test/make/Makefile.rules
@@ -123,10 +123,10 @@
LD = $(CC)
LDFLAGS ?= $(CFLAGS)
LDFLAGS += $(LD_EXTRAS)
-ifneq "$(OS)" "Windows_NT"
+ifneq (,$(filter $(OS), Windows_NT Android))
ifeq "$(ENABLE_THREADS)" "YES"
LDFLAGS += -lpthread
- else
+ else
ifeq "$(ENABLE_STD_THREADS)" "YES"
# with the specific combination of Linux, g++, std=c++11, adding the
# linker flag -lpthread, will cause a program to hang when a std::conditional_variable
@@ -193,6 +193,13 @@
endif
#----------------------------------------------------------------------
+# Android specific options
+#----------------------------------------------------------------------
+ifeq "$(OS)" "Android"
+ LDFLAGS += -pie
+endif
+
+#----------------------------------------------------------------------
# C++ standard library options
#----------------------------------------------------------------------
ifeq (1,$(USE_LIBSTDCPP))
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7856.20588.patch
Type: text/x-patch
Size: 1087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150224/8c742e12/attachment.bin>
More information about the lldb-commits
mailing list