summaryrefslogtreecommitdiff
blob: 4d5ed11b5d255240132c3ff569e57f962840f8bc (plain)
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
26
27
28
29
30
31
32
33
34
From 6536761c1e2756ec39fdc33c400757be3744510c Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Fri, 7 Jan 2005 00:15:53 -0500
Subject: [PATCH 2/6] Gentoo: libiberty: install PIC version of libiberty.a

This will install a PIC version of libiberty.a by overwriting the non-PIC
version of libiberty.a while compiling.  We do this because there is no
shared version of libiberty for random apps to link against which means if
someone wants to use this in a shared library or PIE, they're out of luck.
It's arguable whether people should be able to use this in a shared lib,
but usage in PIE should be fine.  You could argue that this penalizes the
non-PIE users, but the counter point is that people using this library in
general are fairly low, and we'd rather have things work for all of them.

(cherry picked from commit 112aff9ad3e2675556370c4281117a6df0a879d9)
---
 libiberty/Makefile.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index d19e14a2aca..cd02be1c2fb 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -257,6 +257,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
 	  $(AR) $(AR_FLAGS) $(TARGETLIB) \
 	    $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
 	  $(RANLIB) $(TARGETLIB); \
+	  cp $(TARGETLIB) ../ ; \
 	  cd ..; \
 	else true; fi; \
 	if [ x"$(NOASANFLAG)" != x ]; then \
-- 
2.31.1