Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tools/gcc Generate lists of functions built in libgcc librar...
details: https://anonhg.NetBSD.org/src/rev/d5ae1b349ddd
branches: trunk
changeset: 749443:d5ae1b349ddd
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Mon Nov 30 06:40:17 2009 +0000
description:
Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.
diffstat:
tools/gcc/mknative-gcc | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diffs (53 lines):
diff -r 144acd311716 -r d5ae1b349ddd tools/gcc/mknative-gcc
--- a/tools/gcc/mknative-gcc Mon Nov 30 06:29:58 2009 +0000
+++ b/tools/gcc/mknative-gcc Mon Nov 30 06:40:17 2009 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mknative-gcc,v 1.28 2009/11/30 06:29:58 uebayasi Exp $
+# $NetBSD: mknative-gcc,v 1.29 2009/11/30 06:40:17 uebayasi Exp $
#
# Shell script for generating all the constants needed for a native
# platform build of src/gnu/dist/gcc.
@@ -70,9 +70,25 @@
} | sort
}
+get_libgcc_list_funcs_lib () {
+ local _lib=$1
+ local _lib_prefix=${_lib%.*}
+ local _lib_suffix=${_lib#*.}
+
+ sed -ne '
+ /^\.\/'${_lib_prefix}'\.'${_lib_suffix}': .*\.o$/ {
+ s,^.*/,,
+ s,\.o$,,
+ p
+ }
+ ' build/gcc/libgcc.mk | sort
+}
+
get_libgcc_new () {
_subdir="$1"
+ # List of generated files.
+
_machine_arch_subdir=gnu/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH
libgcc_db_funcs=${_machine_arch_subdir}/funcs
@@ -88,10 +104,15 @@
libgcc_srcs_mk_cppflags=${_machine_arch_subdir}/srcs.cppflags.mk
libgcc_srcs_mk_copts=${_machine_arch_subdir}/srcs.copts.mk
- # Collect data from libgcc.mk...
+ # Collect data from gcc/Makefile and gcc/libgcc.mk.
get_libgcc_list_funcs_asm | \
writefile ${libgcc_db_funcs}.S
+
+ for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
+ get_libgcc_list_funcs_lib $_lib | \
+ writefile ${libgcc_db_funcs}.${_lib%.*}
+ done
}
get_libgcc () {
Home |
Main Index |
Thread Index |
Old Index