]>
Commit | Line | Data |
---|---|---|
7adcbafe | 1 | # Copyright (C) 2004-2022 Free Software Foundation, Inc. |
ad41bd84 JM |
2 | # |
3 | # This file is part of GCC. | |
4 | # | |
5 | # GCC is free software; you can redistribute it and/or modify | |
6 | # it under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 3, or (at your option) | |
8 | # any later version. | |
9 | # | |
10 | # GCC is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with GCC; see the file COPYING3. If not see | |
17 | # <http://www.gnu.org/licenses/>. | |
18 | ||
443728bb L |
19 | # Build libunwind for ELF with the GNU linker. |
20 | ||
201cdb74 RO |
21 | SHLIB_SOLINK = @shlib_base_name@.so |
22 | SHLIB_OBJS = @shlib_objs@ | |
23 | SHLIB_DIR = @multilib_dir@ | |
24 | SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ | |
25 | ||
26 | # Use unwind-dw2-fde-dip | |
27 | LIBUNWIND = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-dip.c | |
443728bb L |
28 | |
29 | SHLIBUNWIND_SOVERSION = 7 | |
4e8d0554 | 30 | SHLIBUNWIND_SONAME = @shlib_base_name@.so.$(SHLIBUNWIND_SOVERSION) |
443728bb | 31 | |
201cdb74 | 32 | SHLIBUNWIND_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared \ |
443728bb | 33 | -nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \ |
4e8d0554 | 34 | -Wl,-z,text -Wl,-z,defs -o $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \ |
3b415018 | 35 | @multilib_flags@ $(SHLIB_OBJS) -lc && \ |
4e8d0554 RS |
36 | rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ |
37 | if [ -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) ]; then \ | |
38 | mv -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \ | |
39 | $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).backup; \ | |
3b415018 | 40 | else true; fi && \ |
4e8d0554 RS |
41 | mv $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \ |
42 | $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) && \ | |
43 | $(LN_S) $(SHLIBUNWIND_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) | |
443728bb | 44 | |
443728bb | 45 | SHLIBUNWIND_INSTALL = \ |
201cdb74 | 46 | $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ |
4e8d0554 | 47 | $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \ |
201cdb74 RO |
48 | $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIBUNWIND_SONAME); \ |
49 | rm -f $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ | |
443728bb | 50 | $(LN_S) $(SHLIBUNWIND_SONAME) \ |
201cdb74 | 51 | $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) |