File: 136_bfd_pic.patch

package info (click to toggle)
binutils 2.45-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408,956 kB
  • sloc: ansic: 1,465,081; asm: 816,463; cpp: 87,135; exp: 79,234; makefile: 67,950; sh: 20,839; yacc: 14,149; lisp: 13,640; perl: 13,404; lex: 1,714; ada: 1,681; pascal: 1,446; cs: 879; python: 630; java: 478; sed: 191; xml: 95; awk: 25
file content (25 lines) | stat: -rw-r--r-- 967 bytes parent folder | download | duplicates (3)
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
@@ -57,7 +57,7 @@ ZLIBINC = @zlibinc@
 
 WARN_CFLAGS = @WARN_CFLAGS@
 NO_WERROR = @NO_WERROR@
-AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) $(ZSTD_CFLAGS)
+AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) $(ZSTD_CFLAGS) -fPIC
 AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DLIBDIR='"$(libdir)"' @LARGEFILE_CPPFLAGS@
 if PLUGINS
 bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -524,7 +524,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
 # case both are empty.
 ZLIB = @zlibdir@ -lz
 ZLIBINC = @zlibinc@
-AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) $(ZSTD_CFLAGS)
+AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) $(ZSTD_CFLAGS) -fPIC
 AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DLIBDIR='"$(libdir)"' \
 	@LARGEFILE_CPPFLAGS@ @HDEFINES@ @COREFLAG@ @TDEFINES@ \
 	$(CSEARCH) $(CSWITCHES) $(HAVEVECS) @INCINTL@