]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libiberty: install PIC version of libiberty.a
authorMike Frysinger <vapier@gentoo.org>
Fri, 7 Jan 2005 05:15:53 +0000 (00:15 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 3 Mar 2017 18:03:23 +0000 (11:03 -0700)
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.

libiberty/Makefile.in

index 0ff9e45e45ef6fd6b96bef3de53c620f48e2b7f3..55a70330ffb8df959f46cb0c784d9af88f2a70cf 100644 (file)
@@ -256,6 +256,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 \