summaryrefslogtreecommitdiff
path: root/package/android-tools
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-05-15 22:10:08 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-05-15 22:10:08 +0200
commit9194be9f3acfda7eb32a1ede9918f913bb59b2c9 (patch)
tree9155f0469750f4a7b0e358105b398667961620d0 /package/android-tools
parent247592ed00adadcdcb14948ada2bc7fdd5aa20a1 (diff)
android-tools: add patch to fix static linking
Fixes: http://autobuild.buildroot.net/results/c3b95741a5f6622dc9542f9eaefe295a328e2e40/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/android-tools')
-rw-r--r--package/android-tools/0005-fix-static-link-zlib.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/android-tools/0005-fix-static-link-zlib.patch b/package/android-tools/0005-fix-static-link-zlib.patch
new file mode 100644
index 000000000..dff4df6e7
--- /dev/null
+++ b/package/android-tools/0005-fix-static-link-zlib.patch
@@ -0,0 +1,36 @@
+Fix static linking of adb/adbd
+
+Both adb and adbd use OpenSSL, which indirectly uses zlib. Since
+adb/adbd also use zlib directly -lz is included in the linker flags,
+but not at the right position to ensure that static linking works: to
+make it possible for OpenSSL symbols to see zlib symbols, -lz must
+appear after -lcrypto.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/debian/makefiles/adb.mk
+===================================================================
+--- a/debian/makefiles/adb.mk
++++ b/debian/makefiles/adb.mk
+@@ -41,7 +41,7 @@
+ CPPFLAGS+= -I$(SRCDIR)/core/adb
+ CPPFLAGS+= -I$(SRCDIR)/core/include
+
+-LIBS+= -lc -lpthread -lz -lcrypto
++LIBS+= -lc -lpthread -lcrypto -lz
+
+ OBJS= $(SRCS:.c=.o)
+
+Index: b/debian/makefiles/adbd.mk
+===================================================================
+--- a/debian/makefiles/adbd.mk
++++ b/debian/makefiles/adbd.mk
+@@ -44,7 +44,7 @@
+ CPPFLAGS+= -I$(SRCDIR)/core/adbd
+ CPPFLAGS+= -I$(SRCDIR)/core/include
+
+-LIBS+= -lc -lpthread -lz -lcrypto -lcrypt
++LIBS+= -lc -lpthread -lcrypto -lz -lcrypt
+
+ OBJS= $(patsubst %, %.o, $(basename $(SRCS)))
+