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 functions provided as *.S.
details: https://anonhg.NetBSD.org/src/rev/144acd311716
branches: trunk
changeset: 749442:144acd311716
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Mon Nov 30 06:29:58 2009 +0000
description:
Generate a list of functions provided as *.S.
diffstat:
tools/gcc/mknative-gcc | 59 ++++++++++++++++++++++++++++++++++++-------------
1 files changed, 43 insertions(+), 16 deletions(-)
diffs (83 lines):
diff -r 3386aed5e2bc -r 144acd311716 tools/gcc/mknative-gcc
--- a/tools/gcc/mknative-gcc Mon Nov 30 06:13:37 2009 +0000
+++ b/tools/gcc/mknative-gcc Mon Nov 30 06:29:58 2009 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mknative-gcc,v 1.27 2009/11/30 06:13:37 uebayasi Exp $
+# $NetBSD: mknative-gcc,v 1.28 2009/11/30 06:29:58 uebayasi Exp $
#
# Shell script for generating all the constants needed for a native
# platform build of src/gnu/dist/gcc.
@@ -49,22 +49,49 @@
##### gnu/lib/libgcc #####
-_machine_arch_subdir=gnu/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH
-
-libgcc_db_funcs=${_machine_arch_subdir}/funcs
-libgcc_db_files=${_machine_arch_subdir}/files
-libgcc_db_objs_libs=${_machine_arch_subdir}/objs.libs
-libgcc_db_objs_srcs=${_machine_arch_subdir}/objs.srcs
-libgcc_db_objs_tmpsrcs=${_machine_arch_subdir}/objs.tmpsrcs
-libgcc_db_objs_cppflags=${_machine_arch_subdir}/objs.cppflags
-libgcc_db_objs_copts=${_machine_arch_subdir}/objs.copts
-
-libgcc_srcs_mk=${_machine_arch_subdir}/srcs.mk
-libgcc_srcs_mk_tmpsrc=${_machine_arch_subdir}/srcs.tmpsrc.mk
-libgcc_srcs_mk_cppflags=${_machine_arch_subdir}/srcs.cppflags.mk
-libgcc_srcs_mk_copts=${_machine_arch_subdir}/srcs.copts.mk
+get_libgcc_list_funcs_asm () {
+ getvars gcc/Makefile LIB1ASMFUNCS | {
+ # print newline separated list
+ sed -e '
+ s,^.*=,,
+ s, *$,,
+ s, *, ,g
+ s, ,\
+,g'
+ } | {
+ # print foo and foo_s
+ sed -ne '
+ /./ {
+ p
+ s,$,_s,
+ p
+ }
+ '
+ } | sort
+}
get_libgcc_new () {
+ _subdir="$1"
+
+ _machine_arch_subdir=gnu/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH
+
+ libgcc_db_funcs=${_machine_arch_subdir}/funcs
+ libgcc_db_files=${_machine_arch_subdir}/files
+ libgcc_db_objs_libs=${_machine_arch_subdir}/objs.libs
+ libgcc_db_objs_srcs=${_machine_arch_subdir}/objs.srcs
+ libgcc_db_objs_tmpsrcs=${_machine_arch_subdir}/objs.tmpsrcs
+ libgcc_db_objs_cppflags=${_machine_arch_subdir}/objs.cppflags
+ libgcc_db_objs_copts=${_machine_arch_subdir}/objs.copts
+
+ libgcc_srcs_mk=${_machine_arch_subdir}/srcs.mk
+ libgcc_srcs_mk_tmpsrc=${_machine_arch_subdir}/srcs.tmpsrc.mk
+ 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...
+
+ get_libgcc_list_funcs_asm | \
+ writefile ${libgcc_db_funcs}.S
}
get_libgcc () {
@@ -99,7 +126,7 @@
# Generate new style files.
if [ -n "${MKNATIVE_LIBGCC_NEW}" ]; then
- get_libgcc_new
+ get_libgcc_new $_subdir
fi
}
Home |
Main Index |
Thread Index |
Old Index