Package: binutils / 2.33.1-2

136_bfd_pic.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Author: Balint Reczey <balint@balintreczey.hu>
Description: Build libbfd with -fPIC to allow linking with PIE binaries

--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -52,7 +52,7 @@ ZLIBINC = @zlibinc@
 
 WARN_CFLAGS = @WARN_CFLAGS@
 NO_WERROR = @NO_WERROR@
-AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
+AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -fPIC
 AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DLIBDIR='"$(libdir)"'
 if PLUGINS
 bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -478,7 +478,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
 # case both are empty.
 ZLIB = @zlibdir@ -lz
 ZLIBINC = @zlibinc@
-AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
+AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -fPIC
 AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DLIBDIR='"$(libdir)"' @HDEFINES@ \
 	@COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) $(HAVEVECS) \
 	@INCINTL@ $(am__empty)