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