Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tools/gcc - Generate a list of *.o -> lib*.{a, so} mapping. ...
details: https://anonhg.NetBSD.org/src/rev/705e174b6ed4
branches: trunk
changeset: 749444:705e174b6ed4
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Mon Nov 30 06:56:15 2009 +0000
description:
- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.
- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.
diffstat:
tools/gcc/mknative-gcc | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diffs (58 lines):
diff -r d5ae1b349ddd -r 705e174b6ed4 tools/gcc/mknative-gcc
--- a/tools/gcc/mknative-gcc Mon Nov 30 06:40:17 2009 +0000
+++ b/tools/gcc/mknative-gcc Mon Nov 30 06:56:15 2009 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mknative-gcc,v 1.29 2009/11/30 06:40:17 uebayasi Exp $
+# $NetBSD: mknative-gcc,v 1.30 2009/11/30 06:56:15 uebayasi Exp $
#
# Shell script for generating all the constants needed for a native
# platform build of src/gnu/dist/gcc.
@@ -84,6 +84,28 @@
' build/gcc/libgcc.mk | sort
}
+get_libgcc_list_objs_libs () {
+ cat build/gcc/libgcc.mk | \
+ egrep '^\.\/(libgcc_s\.so|libgcc\.a|libgcc_eh\.a|libgcov\.a): (libgcc_s|libgcc|libgcc_eh|libgcov)\/.*\.o$' | \
+ sed -e '
+ s,^\.\/,,
+ s,: .*/, ,
+ s,^\(.*\) \(.*\)$,\2 \1,
+ ' | sort
+}
+
+get_libgcc_list_objs_srcs () {
+ {
+ cut -f1 $_TOP/${libgcc_db_objs_libs} | sed -e 's,\.o$,,' | \
+ comm -23 /dev/stdin $_TOP/${libgcc_db_funcs}.S | \
+ sed -e 's,\(.*\),\1.o \1.c,'
+
+ cut -f1 $_TOP/${libgcc_db_objs_libs} | sed -e 's,\.o$,,' | \
+ comm -12 /dev/stdin $_TOP/${libgcc_db_funcs}.S | \
+ sed -e 's,\(.*\),\1.o \1.S,'
+ } | sort
+}
+
get_libgcc_new () {
_subdir="$1"
@@ -106,6 +128,8 @@
# Collect data from gcc/Makefile and gcc/libgcc.mk.
+ mkdir -p $_TOP/${_machine_arch_subdir}
+
get_libgcc_list_funcs_asm | \
writefile ${libgcc_db_funcs}.S
@@ -113,6 +137,9 @@
get_libgcc_list_funcs_lib $_lib | \
writefile ${libgcc_db_funcs}.${_lib%.*}
done
+
+ get_libgcc_list_objs_libs | writefile ${libgcc_db_objs_libs}
+ get_libgcc_list_objs_srcs | writefile ${libgcc_db_objs_srcs}
}
get_libgcc () {
Home |
Main Index |
Thread Index |
Old Index