Makefile.in (SHLIB_NM_FLAGS): New.

* Makefile.in (SHLIB_NM_FLAGS): New.
        (libgcc.mk): Pass it.
        * mklibgcc.in (libgcc.map): Use it.

        * rs6000/t-aix43 (SHLIB_EXT, SHLIB_LINK, SHLIB_LIBS,
        SHLIB_MKMAP, SHLIB_MAPFILES, SHLIB_NM_FLAGS): New.

From-SVN: r36989
This commit is contained in:
David Edelsohn 2000-10-21 01:47:05 +00:00 committed by David Edelsohn
parent d73b0bcff3
commit 0ad7574f93
4 changed files with 32 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2000-10-20 David Edelsohn <edelsohn@gnu.org>
* Makefile.in (SHLIB_NM_FLAGS): New.
(libgcc.mk): Pass it.
* mklibgcc.in (libgcc.map): Use it.
* rs6000/t-aix43 (SHLIB_EXT, SHLIB_LINK, SHLIB_LIBS,
SHLIB_MKMAP, SHLIB_MAPFILES, SHLIB_NM_FLAGS): New.
2000-10-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mips.h (REG_CLASS_FROM_LETTER): Cast array arg to unsigned char.

View File

@ -381,12 +381,15 @@ LIBGCC2_INCLUDES =
# Additional target-dependent options for compiling libgcc2.a.
TARGET_LIBGCC2_CFLAGS =
# Addition sources to handle exceptions; overridden by some targets.
# Additional sources to handle exceptions; overridden by some targets.
LIB2ADDEH = $(srcdir)/frame-dwarf2.c
# libgcc1-test target (must also be overridable for a target)
LIBGCC1_TEST = libgcc1-test
# nm flags to list global symbols in libgcc object files.
SHLIB_NM_FLAGS = -pg
# List of extra executables that should be compiled for this target machine
# that are used for compiling from source code to object code.
# The rules for compiling them should be in the t-* file for the machine.
@ -985,6 +988,7 @@ libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) xgcc$(exeext)
SHLIB_MULTILIB='$(SHLIB_MULTILIB)' \
SHLIB_MKMAP='$(SHLIB_MKMAP)' \
SHLIB_MAPFILES='$(SHLIB_MAPFILES)' \
SHLIB_NM_FLAGS='$(SHLIB_NM_FLAGS)' \
$(SHELL) mklibgcc > tmp-libgcc.mk
mv tmp-libgcc.mk libgcc.mk

View File

@ -48,6 +48,22 @@ MULTILIB_MATCHES = mcpu?power=mpower \
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
# Build a shared libgcc library.
SHLIB_EXT = .a
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-bE:@shlib_map_file@ -o @multilib_dir@/shr.o \
@multilib_flags@ @shlib_objs@ -lc \
`case @shlib_base_name@ in \
*pthread*) echo -L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a ;; \
*) echo -lc ;; esac` ; \
rm -f tmp-@shlib_base_name@.a ; \
$(AR_CREATE_FOR_TARGET) tmp-@shlib_base_name@.a @multilib_dir@/shr.o ; \
mv tmp-@shlib_base_name@.a @shlib_base_name@.a ; \
rm -f @multilib_dir@/shr.o
SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac`
SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
SHLIB_NM_FLAGS = -Bpg
# Both 32-bit and 64-bit objects in archives
AR_FLAGS_FOR_TARGET=-X32_64

View File

@ -28,6 +28,7 @@
# SHLIB_MULTILIB
# SHLIB_MKMAP
# SHLIB_MAPFILES
# SHLIB_NM_FLAGS
# Make needs VPATH to be literal.
echo 'srcdir = @srcdir@'
@ -262,7 +263,7 @@ for ml in $MULTILIBS; do
mapfile="libgcc.map"
echo ""
echo "${mapfile}: $SHLIB_MKMAP $SHLIB_MAPFILES $libgcc_objs"
echo ' { $(NM_FOR_TARGET) -pg'" $libgcc_objs; echo %%; cat $SHLIB_MAPFILES; } | "'$(AWK)'" -f $SHLIB_MKMAP > "'tmp-$@'
echo ' { $(NM_FOR_TARGET)'" $SHLIB_NM_FLAGS $libgcc_objs; echo %%; cat $SHLIB_MAPFILES; } | "'$(AWK)'" -f $SHLIB_MKMAP > "'tmp-$@'
echo ' mv tmp-$@ $@'
fi
shlib_deps="$shlib_deps $mapfile"