0001-parser-binutils-fix-compilation-with-libintl.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From c9fe40d9386a5e4cf99f44df9b98382d83f1c4f4 Mon Sep 17 00:00:00 2001
  2. From: Angelo Compagnucci <angelo@amarulasolutions.com>
  3. Date: Fri, 24 Apr 2020 17:34:24 +0200
  4. Subject: [PATCH] parser: binutils: fix compilation with libintl
  5. When libintl is available on the system, we need to link against the
  6. libintl library too.
  7. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
  8. ---
  9. binutils/Makefile | 4 ++++
  10. parser/Makefile | 5 +++++
  11. 2 files changed, 9 insertions(+)
  12. diff --git a/binutils/Makefile b/binutils/Makefile
  13. index 11459bec..d8c1b634 100644
  14. --- a/binutils/Makefile
  15. +++ b/binutils/Makefile
  16. @@ -56,6 +56,10 @@ SBINTOOLS = aa-status
  17. AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread
  18. +ifdef WITH_LIBINTL
  19. + AALIB += -lintl
  20. +endif
  21. +
  22. ifdef USE_SYSTEM
  23. # Using the system libapparmor so Makefile dependencies can't be used
  24. LIBAPPARMOR_A =
  25. diff --git a/parser/Makefile b/parser/Makefile
  26. index eab64be9..998230ee 100644
  27. --- a/parser/Makefile
  28. +++ b/parser/Makefile
  29. @@ -91,6 +91,11 @@ AAREOBJECTS = $(AAREOBJECT)
  30. AARE_LDFLAGS = -static-libgcc -static-libstdc++ -L. $(LDFLAGS)
  31. AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread
  32. +ifdef WITH_LIBINTL
  33. + AALIB += -lintl
  34. +endif
  35. +
  36. +
  37. ifdef USE_SYSTEM
  38. # Using the system libapparmor so Makefile dependencies can't be used
  39. LIBAPPARMOR_A =
  40. --
  41. 2.25.1