0005-makefiles-use-pkgconf-to-get-libs-deps.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 10f3f6fb75da72f155e72794d6647e4fa21a87d0 Mon Sep 17 00:00:00 2001
  2. From: Giulio Benetti <giulio.benetti@micronovasrl.com>
  3. Date: Sun, 1 Dec 2024 15:45:01 +0100
  4. Subject: [PATCH] makefiles: use pkgconf to get libs deps
  5. LIBS lists library dependencies without taking into account static linking
  6. that need ordered listing and more libraries listed since differently from
  7. shared linking dependency is not transparent(i.e. -lcrypto could need
  8. -latomic etc.).
  9. Replace -lcrypto with `pkg-config --libs libcrypto` command to be sure all
  10. needed libraries are listed during linking.
  11. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
  12. ---
  13. debian/makefiles/adb.mk | 2 +-
  14. debian/makefiles/adbd.mk | 2 +-
  15. 2 files changed, 2 insertions(+), 2 deletions(-)
  16. diff --git a/debian/makefiles/adb.mk b/debian/makefiles/adb.mk
  17. index 654b9f1..a03c93a 100644
  18. --- a/debian/makefiles/adb.mk
  19. +++ b/debian/makefiles/adb.mk
  20. @@ -41,7 +41,7 @@ CPPFLAGS+= -DHAVE_TERMIO_H
  21. CPPFLAGS+= -I$(SRCDIR)/core/adb
  22. CPPFLAGS+= -I$(SRCDIR)/core/include
  23. -LIBS+= -lc -lpthread -lz -lcrypto
  24. +LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto`
  25. OBJS= $(SRCS:.c=.o)
  26. diff --git a/debian/makefiles/adbd.mk b/debian/makefiles/adbd.mk
  27. index 22c1816..a8eee3a 100644
  28. --- a/debian/makefiles/adbd.mk
  29. +++ b/debian/makefiles/adbd.mk
  30. @@ -44,7 +44,7 @@ CPPFLAGS+= -DADBD_NON_ANDROID
  31. CPPFLAGS+= -I$(SRCDIR)/core/adbd
  32. CPPFLAGS+= -I$(SRCDIR)/core/include
  33. -LIBS+= -lc -lpthread -lz -lcrypto -lcrypt
  34. +LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto` -lcrypt
  35. OBJS= $(patsubst %, %.o, $(basename $(SRCS)))
  36. --
  37. 2.47.0