136_bfd_pic.patch 1.0 KB

123456789101112131415161718192021222324252627282930
  1. Author: Balint Reczey <balint@balintreczey.hu>
  2. Description: Build libbfd with -fPIC to allow linking with PIE binaries
  3. Index: b/bfd/Makefile.am
  4. ===================================================================
  5. --- a/bfd/Makefile.am
  6. +++ b/bfd/Makefile.am
  7. @@ -51,7 +51,7 @@ ZLIBINC = @zlibinc@
  8. WARN_CFLAGS = @WARN_CFLAGS@
  9. NO_WERROR = @NO_WERROR@
  10. -AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
  11. +AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -fPIC
  12. AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
  13. if PLUGINS
  14. bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
  15. Index: b/bfd/Makefile.in
  16. ===================================================================
  17. --- a/bfd/Makefile.in
  18. +++ b/bfd/Makefile.in
  19. @@ -475,7 +475,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
  20. # case both are empty.
  21. ZLIB = @zlibdir@ -lz
  22. ZLIBINC = @zlibinc@
  23. -AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
  24. +AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -fPIC
  25. AM_CPPFLAGS = -DBINDIR='"$(bindir)"' @HDEFINES@ @COREFLAG@ @TDEFINES@ \
  26. $(CSEARCH) $(CSWITCHES) $(HAVEVECS) @INCINTL@
  27. @PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@