toolchain/gcc: add GCC 8.1.0
[openwrt/openwrt.git] / toolchain / gcc / patches / 8.1.0 / 820-libgcc_pic.patch
1 commit c96312958c0621e72c9b32da5bc224ffe2161384
2 Author: Felix Fietkau <nbd@openwrt.org>
3 Date: Mon Oct 19 23:26:09 2009 +0000
4
5 gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow)
6
7 SVN-Revision: 18086
8
9 --- a/libgcc/Makefile.in
10 +++ b/libgcc/Makefile.in
11 @@ -923,11 +923,12 @@ $(libgcov-driver-objects): %$(objext): $
12
13 # Static libraries.
14 libgcc.a: $(libgcc-objects)
15 +libgcc_pic.a: $(libgcc-s-objects)
16 libgcov.a: $(libgcov-objects)
17 libunwind.a: $(libunwind-objects)
18 libgcc_eh.a: $(libgcc-eh-objects)
19
20 -libgcc.a libgcov.a libunwind.a libgcc_eh.a:
21 +libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a:
22 -rm -f $@
23
24 objects="$(objects)"; \
25 @@ -948,7 +949,7 @@ all: libunwind.a
26 endif
27
28 ifeq ($(enable_shared),yes)
29 -all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
30 +all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT)
31 ifneq ($(LIBUNWIND),)
32 all: libunwind$(SHLIB_EXT)
33 libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
34 @@ -1154,6 +1155,10 @@ install-shared:
35 chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
36 $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
37
38 + $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
39 + chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
40 + $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
41 +
42 $(subst @multilib_dir@,$(MULTIDIR),$(subst \
43 @shlib_base_name@,libgcc_s,$(subst \
44 @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))