1# Copyright (C) 2002-2013 Free Software Foundation, Inc. 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 19# Build a shared libgcc library. 20SHLIB_EXT = .a 21SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ 22 -Wl,-bE:@shlib_map_file@ -o @multilib_dir@/shr.o \ 23 @multilib_flags@ @shlib_objs@ -lc \ 24 `case @multilib_dir@ in \ 25 *pthread*) echo -L$(TARGET_SYSTEM_ROOT)/usr/lib/threads -lpthreads -lc_r $(TARGET_SYSTEM_ROOT)/usr/lib/libc.a ;; \ 26 *) echo -lc ;; esac` ; \ 27 rm -f @multilib_dir@/tmp-@shlib_base_name@.a ; \ 28 $(AR_CREATE_FOR_TARGET) @multilib_dir@/tmp-@shlib_base_name@.a \ 29 @multilib_dir@/shr.o ; \ 30 mv @multilib_dir@/tmp-@shlib_base_name@.a \ 31 @multilib_dir@/@shlib_base_name@.a ; \ 32 rm -f @multilib_dir@/shr.o 33SHLIB_INSTALL = \ 34 $(mkinstalldirs) $(DESTDIR)$(slibdir)@shlib_slibdir_qual@; \ 35 $(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.a \ 36 $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/ 37SHLIB_LIBS = -lc `case @multilib_dir@ in *pthread*) echo -lpthread ;; esac` 38SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk 39SHLIB_MAPFILES = libgcc-std.ver 40SHLIB_NM_FLAGS = -Bpg -X32_64 41 42# Either 32-bit and 64-bit objects in archives. 43AR_FLAGS_FOR_TARGET = -X32_64 44