0005-fix-static-link-zlib.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. Fix static linking of adb/adbd
  2. Both adb and adbd use OpenSSL, which indirectly uses zlib. Since
  3. adb/adbd also use zlib directly -lz is included in the linker flags,
  4. but not at the right position to ensure that static linking works: to
  5. make it possible for OpenSSL symbols to see zlib symbols, -lz must
  6. appear after -lcrypto.
  7. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  8. Index: b/debian/makefiles/adb.mk
  9. ===================================================================
  10. --- a/debian/makefiles/adb.mk
  11. +++ b/debian/makefiles/adb.mk
  12. @@ -41,7 +41,7 @@
  13. CPPFLAGS+= -I$(SRCDIR)/core/adb
  14. CPPFLAGS+= -I$(SRCDIR)/core/include
  15. -LIBS+= -lc -lpthread -lz -lcrypto
  16. +LIBS+= -lc -lpthread -lcrypto -lz
  17. OBJS= $(SRCS:.c=.o)
  18. Index: b/debian/makefiles/adbd.mk
  19. ===================================================================
  20. --- a/debian/makefiles/adbd.mk
  21. +++ b/debian/makefiles/adbd.mk
  22. @@ -44,7 +44,7 @@
  23. CPPFLAGS+= -I$(SRCDIR)/core/adbd
  24. CPPFLAGS+= -I$(SRCDIR)/core/include
  25. -LIBS+= -lc -lpthread -lz -lcrypto -lcrypt
  26. +LIBS+= -lc -lpthread -lcrypto -lz -lcrypt
  27. OBJS= $(patsubst %, %.o, $(basename $(SRCS)))