Home | History | Annotate | Line # | Download | only in gcc
mknative-gcc revision 1.70
      1   1.1       mrg #!/bin/sh
      2  1.70     skrll #	$NetBSD: mknative-gcc,v 1.70 2013/05/05 07:11:34 skrll Exp $
      3   1.1       mrg #
      4   1.1       mrg # Shell script for generating all the constants needed for a native
      5  1.68     skrll # platform build of gcc.
      6   1.1       mrg #
      7   1.1       mrg 
      8   1.9       mrg # initialise
      9   1.9       mrg 
     10   1.9       mrg _TMPDIR=$2
     11   1.9       mrg _TOP=$3
     12   1.9       mrg _PLATFORM=$4
     13  1.61       mrg _DESTDIR=$5
     14  1.61       mrg _ABI=$6
     15  1.15       mrg _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ 	]*,,'`
     16   1.9       mrg _GNU_DIST=`cd ${_VPATH}; pwd`
     17   1.9       mrg 
     18  1.61       mrg if [ -z "$_DESTDIR" ]; then
     19  1.61       mrg 	echo "\$_DESTDIR is empty" 2>&1
     20  1.61       mrg 	exit 1
     21  1.61       mrg fi
     22  1.61       mrg 
     23   1.9       mrg . $_TOP/tools/gcc/mknative.common
     24   1.1       mrg 
     25  1.46       mrg # default to GCC 4.1 for now
     26  1.46       mrg _OUTDIR="$_TOP/gnu"
     27  1.46       mrg _OUTDIRBASE="gnu"
     28  1.46       mrg 
     29  1.70     skrll sanitise_includes () {
     30  1.70     skrll 	sed \
     31  1.70     skrll 		-e "s,-I$_DESTDIR/usr/include,,g" \
     32  1.70     skrll 		-e "s,-I$_TOP/external/lgpl3/mpfr/dist,,g" \
     33  1.70     skrll 		-e "s,-I$_TOP/external/lgpl2/mpc/dist/src,,g" \
     34  1.70     skrll 		-e "s,-I$_TOP/external/lgpl3/gmp/lib/libgmp/arch/$MACHINE_ARCH,,g"
     35  1.70     skrll }
     36  1.70     skrll 
     37  1.14   thorpej ##### gnu/lib/crtstuff #####
     38  1.14   thorpej 
     39  1.14   thorpej get_crtstuff () {
     40  1.16       mrg 	_subdir="$1"
     41  1.46       mrg 	mkdir -p $_OUTDIR/lib/$_subdir/arch
     42  1.14   thorpej 
     43  1.14   thorpej 	getvars gcc/Makefile \
     44  1.67     skrll 		INCLUDES CRTSTUFF_CFLAGS CRTSTUFF_T_CFLAGS CRTSTUFF_T_CFLAGS_S \
     45  1.14   thorpej 		tm_defines xm_file xm_defines \
     46  1.70     skrll 		| sanitise_includes \
     47  1.46       mrg 		| write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH.mk
     48  1.14   thorpej }
     49  1.14   thorpej 
     50   1.1       mrg ##### gnu/lib/libg2c #####
     51   1.1       mrg 
     52   1.1       mrg get_libg2c () {
     53  1.46       mrg 	mkdir -p $_OUTDIR/lib/libg2c3/arch/$MACHINE_ARCH
     54   1.1       mrg 
     55  1.46       mrg 	write_c $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/config.h <$_TMPDIR/$_PLATFORM/libf2c/libU77/config.h
     56  1.46       mrg 	write_c $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/g2c.h <$_TMPDIR/$_PLATFORM/libf2c/g2c.h
     57   1.1       mrg 
     58   1.1       mrg 	{
     59   1.1       mrg 		getvars $_PLATFORM/libf2c/Makefile \
     60   1.1       mrg 			F2CEXT
     61   1.1       mrg 		getvars $_PLATFORM/libf2c/libF77/Makefile \
     62   1.1       mrg 			ALL_CFLAGS OBJS
     63   1.1       mrg 		getvars $_PLATFORM/libf2c/libI77/Makefile \
     64   1.1       mrg 			ALL_CFLAGS OBJS | sed 's,=,+=,'
     65   1.1       mrg 		getvars $_PLATFORM/libf2c/libU77/Makefile \
     66   1.1       mrg 			ALL_CFLAGS OBJS | sed 's,=,+=,'
     67  1.46       mrg 	} | write_mk $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/defs.mk
     68   1.1       mrg }
     69   1.1       mrg 
     70   1.1       mrg ##### gnu/lib/libgcc #####
     71   1.1       mrg 
     72  1.28  uebayasi get_libgcc_list_funcs_asm () {
     73  1.42  uebayasi 	{
     74  1.42  uebayasi 		getvars gcc/Makefile LIB1ASMFUNCS | {
     75  1.42  uebayasi 			# print newline separated list
     76  1.42  uebayasi 			sed -e '
     77  1.42  uebayasi 				s,^.*=,,
     78  1.42  uebayasi 				s, *$,,
     79  1.42  uebayasi 				s,  *, ,g
     80  1.42  uebayasi 				s, ,\
     81  1.28  uebayasi ,g'
     82  1.42  uebayasi 		}
     83  1.42  uebayasi 		getvars gcc/Makefile LIB2FUNCS_EXTRA | {
     84  1.42  uebayasi 			# print newline separated list
     85  1.42  uebayasi 			sed -e '
     86  1.42  uebayasi 				s,^.*=,,
     87  1.42  uebayasi 				s, *$,,
     88  1.42  uebayasi 				s,  *, ,g
     89  1.42  uebayasi 				s, ,\
     90  1.42  uebayasi ,g' | \
     91  1.42  uebayasi 			sed -ne '
     92  1.42  uebayasi 				/\.S$/ { s,^.*/,,; s,\.S$,,; p; }
     93  1.42  uebayasi 				/\.asm$/ { s,^.*/,,; s,\.asm$,,; p; }
     94  1.42  uebayasi 			'
     95  1.42  uebayasi 		}
     96  1.28  uebayasi 	} | {
     97  1.28  uebayasi 		# print foo and foo_s
     98  1.28  uebayasi 		sed -ne '
     99  1.28  uebayasi 			/./ {
    100  1.28  uebayasi 				p
    101  1.28  uebayasi 				s,$,_s,
    102  1.28  uebayasi 				p
    103  1.28  uebayasi 			}
    104  1.28  uebayasi 		'
    105  1.28  uebayasi 	} | sort
    106  1.28  uebayasi }
    107  1.28  uebayasi 
    108  1.29  uebayasi get_libgcc_list_funcs_lib () {
    109  1.29  uebayasi 	local _lib=$1
    110  1.29  uebayasi 	local _lib_prefix=${_lib%.*}
    111  1.29  uebayasi 	local _lib_suffix=${_lib#*.}
    112  1.44  uebayasi 	local _abi=${2:-'\.'}
    113  1.29  uebayasi 
    114  1.43  uebayasi 	cat build/gcc/libgcc.mk | \
    115  1.44  uebayasi 	grep '/'${_abi}'/' | \
    116  1.29  uebayasi 	sed -ne '
    117  1.45  uebayasi 		/^'${_abi}'\/'${_lib_prefix}'\.'${_lib_suffix}': .*\.o$/ {
    118  1.29  uebayasi 			s,^.*/,,
    119  1.29  uebayasi 			s,\.o$,,
    120  1.29  uebayasi 			p
    121  1.29  uebayasi 		}
    122  1.43  uebayasi 	' | sort
    123  1.29  uebayasi }
    124  1.29  uebayasi 
    125  1.30  uebayasi get_libgcc_list_objs_libs () {
    126  1.44  uebayasi 	local _abi=${1:-'\.'}
    127  1.44  uebayasi 
    128  1.30  uebayasi 	cat build/gcc/libgcc.mk | \
    129  1.44  uebayasi 	grep '/'${_abi}'/' | \
    130  1.45  uebayasi 	egrep '^'${_abi}'\/(libgcc_s\.so|libgcc\.a|libgcc_eh\.a|libgcov\.a): (libgcc_s|libgcc|libgcc_eh|libgcov)\/.*\.o$' | \
    131  1.30  uebayasi 	sed -e '
    132  1.44  uebayasi 		s,^'${_abi}'\/,,
    133  1.30  uebayasi 		s,: .*/,	,
    134  1.30  uebayasi 		s,^\(.*\)	\(.*\)$,\2	\1,
    135  1.30  uebayasi 	' | sort
    136  1.30  uebayasi }
    137  1.30  uebayasi 
    138  1.30  uebayasi get_libgcc_list_objs_srcs () {
    139  1.44  uebayasi 	local _abi=${1:-'\.'}	# XXX not used
    140  1.44  uebayasi 
    141  1.41  uebayasi 	if [ -e $_TOP/${libgcc_db_funcs}.S ]; then
    142  1.30  uebayasi 		cut -f1 $_TOP/${libgcc_db_objs_libs} | sed -e 's,\.o$,,' | \
    143  1.30  uebayasi 		comm -23 /dev/stdin $_TOP/${libgcc_db_funcs}.S | \
    144  1.30  uebayasi 		sed -e 's,\(.*\),\1.o	\1.c,'
    145  1.30  uebayasi 
    146  1.30  uebayasi 		cut -f1 $_TOP/${libgcc_db_objs_libs} | sed -e 's,\.o$,,' | \
    147  1.30  uebayasi 		comm -12 /dev/stdin $_TOP/${libgcc_db_funcs}.S | \
    148  1.30  uebayasi 		sed -e 's,\(.*\),\1.o	\1.S,'
    149  1.41  uebayasi 	else
    150  1.41  uebayasi 		cut -f1 $_TOP/${libgcc_db_objs_libs} | sed -e 's,\.o$,,' | \
    151  1.41  uebayasi 		sed -e 's,\(.*\),\1.o	\1.c,'
    152  1.41  uebayasi 	fi | sort
    153  1.30  uebayasi }
    154  1.30  uebayasi 
    155  1.40  uebayasi get_libgcc_list_objs_tmplsrcs () {
    156  1.44  uebayasi 	local _abi=${1:-'\.'}
    157  1.44  uebayasi 
    158  1.32  uebayasi 	grep 'GCC_FOR_TARGET.*\.o$' build/gcc/libgcc.mk | \
    159  1.44  uebayasi 	grep '/'${_abi}'/' | \
    160  1.32  uebayasi 	sed -ne '
    161  1.32  uebayasi 		s,^.* -c \([^ ]*\).* -o .*/\([^ ]*\.o\)$,\2	\1,
    162  1.32  uebayasi 		# basename
    163  1.32  uebayasi 		/\$/ { s,\$.*/,,; }
    164  1.32  uebayasi 		/\// { s,\/.*/,,; }
    165  1.32  uebayasi 		p
    166  1.43  uebayasi 	' | sort -u
    167  1.32  uebayasi }
    168  1.32  uebayasi 
    169  1.31  uebayasi get_libgcc_list_objs_xflags () {
    170  1.31  uebayasi 	local _flags=$1
    171  1.44  uebayasi 	local _abi=${2:-'\.'}
    172  1.31  uebayasi 
    173  1.31  uebayasi 	grep 'GCC_FOR_TARGET.*\.o$' build/gcc/libgcc.mk | \
    174  1.44  uebayasi 	grep '/'${_abi}'/' | \
    175  1.31  uebayasi 	sed -n '
    176  1.31  uebayasi 		x
    177  1.31  uebayasi 	:loop
    178  1.31  uebayasi 		g
    179  1.31  uebayasi 		s/^\(.*\) \(-['${_flags}'][^ ][^ ]*\) \(.*\) \(-o .*\)\/\(.*\.o\)$/\5	\2/p
    180  1.31  uebayasi 		g
    181  1.31  uebayasi 		s/^\(.*\) \(-['${_flags}'][^ ][^ ]*\) \(.*\) \(-o .*\)\/\(.*\.o\)$/\1 \3 \4\/\5/
    182  1.31  uebayasi 		h
    183  1.31  uebayasi 		t loop
    184  1.31  uebayasi 	' | sort
    185  1.31  uebayasi }
    186  1.31  uebayasi 
    187  1.31  uebayasi get_libgcc_list_objs_cppflags () {
    188  1.44  uebayasi 	get_libgcc_list_objs_xflags D $1
    189  1.31  uebayasi }
    190  1.31  uebayasi 
    191  1.31  uebayasi get_libgcc_list_objs_copts () {
    192  1.44  uebayasi 	get_libgcc_list_objs_xflags fmx $1
    193  1.31  uebayasi }
    194  1.31  uebayasi 
    195  1.40  uebayasi get_libgcc_list_tmplsrcs () {
    196  1.33  uebayasi 	local _lib=$1
    197  1.44  uebayasi 	local _abi=$2	# XXX not used
    198  1.40  uebayasi 	local _tmplallsrcs=$( mktemp /tmp/mknative-gcc._tmplallsrcs.XXXXXX )
    199  1.33  uebayasi 
    200  1.40  uebayasi 	touch $_TOP/${libgcc_db_tmplsrcs}.tmplsrcs.${_lib%.*}
    201  1.40  uebayasi 	touch $_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.${_lib%.*}
    202  1.40  uebayasi 	touch $_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.${_lib%.*}
    203  1.33  uebayasi 
    204  1.33  uebayasi 	# all files
    205  1.33  uebayasi 	local _lib_prefix=${_lib%.*}
    206  1.33  uebayasi 	local _lib_suffix=${_lib#*.}
    207  1.40  uebayasi 	join $_TOP/$libgcc_db_objs_libs $_TOP/$libgcc_db_objs_tmplsrcs | \
    208  1.33  uebayasi 	grep ${_lib_prefix}'\.'${_lib_suffix} | cut -d' ' -f 3 | sort -u > \
    209  1.40  uebayasi 	$_tmplallsrcs
    210  1.33  uebayasi 
    211  1.40  uebayasi 	# TMPLFPSRCS = [fdp]p-bit.c
    212  1.40  uebayasi 	grep '[fdt]p-bit\.c' <$_tmplallsrcs | sort -u | \
    213  1.40  uebayasi 	writefile ${libgcc_db_tmplsrcs}.tmplfpsrcs.${_lib%.*}
    214  1.40  uebayasi 
    215  1.40  uebayasi 	# TMPLASMSRCS = $(LIB1ASMSRC)
    216  1.40  uebayasi 	grep '\$(LIB1ASMSRC)' <$_tmplallsrcs | sort -u | \
    217  1.40  uebayasi 	writefile ${libgcc_db_tmplsrcs}.tmplasmsrcs.${_lib%.*}
    218  1.40  uebayasi 
    219  1.40  uebayasi 	# TMPLSRCS is anything else; exclude TMPLFPSRCS and TMPLASMSRCS
    220  1.40  uebayasi 	cat $_tmplallsrcs | \
    221  1.40  uebayasi 	comm -23 /dev/stdin $_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.${_lib%.*} | \
    222  1.40  uebayasi 	comm -23 /dev/stdin $_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.${_lib%.*} | \
    223  1.40  uebayasi 	writefile ${libgcc_db_tmplsrcs}.tmplsrcs.${_lib%.*}
    224  1.33  uebayasi 
    225  1.40  uebayasi 	rm -f $_tmplallsrcs
    226  1.33  uebayasi }
    227  1.33  uebayasi 
    228  1.35  uebayasi get_libgcc_new_analyze () {
    229  1.44  uebayasi 	local _abi=$1
    230  1.44  uebayasi 
    231  1.35  uebayasi 	mkdir -p $_TOP/${_machine_arch_subdir}
    232  1.35  uebayasi 
    233  1.41  uebayasi 	touch $_TOP/${libgcc_db_funcs}.S
    234  1.35  uebayasi 	get_libgcc_list_funcs_asm | \
    235  1.35  uebayasi 	writefile ${libgcc_db_funcs}.S
    236  1.35  uebayasi 
    237  1.35  uebayasi 	for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
    238  1.41  uebayasi 		touch $_TOP/${libgcc_db_funcs}.${_lib%.*}
    239  1.44  uebayasi 		get_libgcc_list_funcs_lib $_lib $_abi | \
    240  1.35  uebayasi 		writefile ${libgcc_db_funcs}.${_lib%.*}
    241  1.35  uebayasi 	done
    242  1.35  uebayasi 
    243  1.44  uebayasi 	get_libgcc_list_objs_libs $_abi | writefile ${libgcc_db_objs_libs}
    244  1.44  uebayasi 	get_libgcc_list_objs_srcs $_abi | writefile ${libgcc_db_objs_srcs}
    245  1.44  uebayasi 	get_libgcc_list_objs_tmplsrcs $_abi | writefile ${libgcc_db_objs_tmplsrcs}
    246  1.44  uebayasi 	get_libgcc_list_objs_cppflags $_abi | writefile ${libgcc_db_objs_cppflags}
    247  1.44  uebayasi 	get_libgcc_list_objs_copts $_abi | writefile ${libgcc_db_objs_copts}
    248  1.35  uebayasi 
    249  1.35  uebayasi 	for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
    250  1.44  uebayasi 		get_libgcc_list_tmplsrcs $_lib $_abi
    251  1.35  uebayasi 	done
    252  1.35  uebayasi }
    253  1.35  uebayasi 
    254  1.35  uebayasi #####
    255  1.35  uebayasi 
    256  1.40  uebayasi get_libgcc_gen_tmplsrcs_tmplsrcs () {
    257  1.37  uebayasi 	local _lib=$1
    258  1.37  uebayasi 
    259  1.37  uebayasi 	printf '\n'
    260  1.40  uebayasi 	printf 'TMPLSRCS.%s = \\\n' $_lib
    261  1.40  uebayasi 	sed -e 's,^,	,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplsrcs.${_lib%.*}
    262  1.37  uebayasi }
    263  1.37  uebayasi 
    264  1.40  uebayasi get_libgcc_gen_tmplsrcs_tmplfpsrcs () {
    265  1.37  uebayasi 	local _lib=$1
    266  1.37  uebayasi 
    267  1.37  uebayasi 	printf '\n'
    268  1.40  uebayasi 	printf 'TMPLFPSRCS.%s = \\\n' $_lib
    269  1.40  uebayasi 	sed -e 's,^,	,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.${_lib%.*}
    270  1.37  uebayasi }
    271  1.37  uebayasi 
    272  1.40  uebayasi get_libgcc_gen_tmplsrcs_tmplasmsrcs () {
    273  1.37  uebayasi 	local _lib=$1
    274  1.37  uebayasi 
    275  1.37  uebayasi 	printf '\n'
    276  1.40  uebayasi 	printf 'TMPLASMSRCS.%s = \\\n' $_lib
    277  1.40  uebayasi 	sed -e 's,^,	,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.${_lib%.*} | \
    278  1.37  uebayasi 	sed -e 's,LIB1ASMSRC,G_&,'
    279  1.37  uebayasi }
    280  1.37  uebayasi 
    281  1.36  uebayasi get_libgcc_gen_srcs () {
    282  1.36  uebayasi 	local _lib=$1
    283  1.36  uebayasi 
    284  1.36  uebayasi 	printf '\n'
    285  1.36  uebayasi 	printf 'SRCS.%s = \\\n' $_lib
    286  1.41  uebayasi 	if [ -e $_TOP/${libgcc_db_funcs}.S ]; then
    287  1.36  uebayasi 		comm -23 $_TOP/${libgcc_db_funcs}.${_lib%.*} $_TOP/${libgcc_db_funcs}.S | \
    288  1.36  uebayasi 		sed -e 's,$,.c,; s,^,tmp_,'
    289  1.36  uebayasi 		comm -12 $_TOP/${libgcc_db_funcs}.${_lib%.*} $_TOP/${libgcc_db_funcs}.S | \
    290  1.36  uebayasi 		sed -e 's,$,.S,; s,^,tmp_,'
    291  1.41  uebayasi 	else
    292  1.41  uebayasi 		cat $_TOP/${libgcc_db_funcs}.${_lib%.*} | \
    293  1.41  uebayasi 		sed -e 's,$,.c,; s,^,tmp_,'
    294  1.41  uebayasi 	fi | sort | \
    295  1.36  uebayasi 	sed -e 's,^,	,; s,$, \\,'
    296  1.36  uebayasi }
    297  1.36  uebayasi 
    298  1.38  uebayasi _lookup_objs () {
    299  1.38  uebayasi 	local _obj=$1; local _key=$2
    300  1.38  uebayasi 
    301  1.38  uebayasi 	eval grep \^$_obj\\\	 \$_TOP/\${libgcc_db_objs_${_key}} | cut -f2
    302  1.38  uebayasi }
    303  1.38  uebayasi 
    304  1.40  uebayasi get_libgcc_gen_srcs_tmplsrcs () {
    305  1.38  uebayasi 	cut -f1 $_TOP/${libgcc_db_objs_libs} | \
    306  1.38  uebayasi 	while read _obj; do
    307  1.38  uebayasi 		printf 'SRCS.tmp_%s=%s\n' \
    308  1.38  uebayasi 			"$( _lookup_objs $_obj srcs )" \
    309  1.40  uebayasi 			"$( _lookup_objs $_obj tmplsrcs )"
    310  1.38  uebayasi 	done | \
    311  1.38  uebayasi 	sed -e 's,\$(\(.*\)),${G_\1},'
    312  1.38  uebayasi }
    313  1.38  uebayasi 
    314  1.38  uebayasi get_libgcc_gen_srcs_cppflags () {
    315  1.38  uebayasi 	cut -f1 $_TOP/${libgcc_db_objs_libs} | \
    316  1.38  uebayasi 	while read _obj; do
    317  1.38  uebayasi 		printf '_CPPFLAGS.tmp_%s=%s\n' \
    318  1.38  uebayasi 			"$( _lookup_objs $_obj srcs )" \
    319  1.38  uebayasi 			"$( _lookup_objs $_obj cppflags | xargs )"
    320  1.38  uebayasi 	done
    321  1.38  uebayasi }
    322  1.38  uebayasi 
    323  1.38  uebayasi get_libgcc_gen_srcs_copts () {
    324  1.38  uebayasi 	cut -f1 $_TOP/${libgcc_db_objs_libs} | \
    325  1.38  uebayasi 	while read _obj; do
    326  1.38  uebayasi 		printf 'COPTS.tmp_%s=%s\n' \
    327  1.38  uebayasi 			"$( _lookup_objs $_obj srcs )" \
    328  1.38  uebayasi 			"$( _lookup_objs $_obj copts | xargs )"
    329  1.38  uebayasi 	done
    330  1.38  uebayasi }
    331  1.38  uebayasi 
    332  1.35  uebayasi get_libgcc_new_generate () {
    333  1.44  uebayasi 	local _abi=$1
    334  1.44  uebayasi 
    335  1.36  uebayasi 	for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
    336  1.40  uebayasi 		for _tmpl in tmplsrcs tmplfpsrcs tmplasmsrcs; do
    337  1.40  uebayasi 			eval get_libgcc_gen_tmplsrcs_${_tmpl} $_lib | \
    338  1.40  uebayasi 			write_mk ${libgcc_libs_mk}.${_lib%.*}.tmplsrcs.${_tmpl}.mk
    339  1.37  uebayasi 		done
    340  1.37  uebayasi 
    341  1.36  uebayasi 		get_libgcc_gen_srcs $_lib | \
    342  1.39  uebayasi 		write_mk ${libgcc_libs_mk}.${_lib%.*}.srcs.mk
    343  1.36  uebayasi 	done
    344  1.38  uebayasi 
    345  1.40  uebayasi 	for _arg in tmplsrcs cppflags copts; do
    346  1.38  uebayasi 		eval get_libgcc_gen_srcs_${_arg} | \
    347  1.38  uebayasi 		eval writefile \$libgcc_srcs_mk_${_arg}
    348  1.38  uebayasi 	done
    349  1.35  uebayasi }
    350  1.35  uebayasi 
    351  1.33  uebayasi #####
    352  1.33  uebayasi 
    353  1.28  uebayasi get_libgcc_new () {
    354  1.28  uebayasi 	_subdir="$1"
    355  1.44  uebayasi 	_abi="$2"
    356  1.27  uebayasi 
    357  1.29  uebayasi 	# List of generated files.
    358  1.29  uebayasi 
    359  1.46       mrg 	_machine_arch_subdir=$_OUTDIRBASE/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH/$_abi
    360  1.27  uebayasi 
    361  1.28  uebayasi 	libgcc_db_funcs=${_machine_arch_subdir}/funcs
    362  1.40  uebayasi 	libgcc_db_tmplsrcs=${_machine_arch_subdir}/tmplsrcs
    363  1.28  uebayasi 	libgcc_db_objs_libs=${_machine_arch_subdir}/objs.libs
    364  1.28  uebayasi 	libgcc_db_objs_srcs=${_machine_arch_subdir}/objs.srcs
    365  1.40  uebayasi 	libgcc_db_objs_tmplsrcs=${_machine_arch_subdir}/objs.tmplsrcs
    366  1.28  uebayasi 	libgcc_db_objs_cppflags=${_machine_arch_subdir}/objs.cppflags
    367  1.28  uebayasi 	libgcc_db_objs_copts=${_machine_arch_subdir}/objs.copts
    368  1.28  uebayasi 
    369  1.44  uebayasi 	get_libgcc_new_analyze $_abi
    370  1.36  uebayasi 
    371  1.39  uebayasi 	libgcc_libs_mk=${_machine_arch_subdir}/libs
    372  1.28  uebayasi 	libgcc_srcs_mk=${_machine_arch_subdir}/srcs.mk
    373  1.40  uebayasi 	libgcc_srcs_mk_tmplsrcs=${_machine_arch_subdir}/srcs.tmplsrcs.mk
    374  1.28  uebayasi 	libgcc_srcs_mk_cppflags=${_machine_arch_subdir}/srcs.cppflags.mk
    375  1.28  uebayasi 	libgcc_srcs_mk_copts=${_machine_arch_subdir}/srcs.copts.mk
    376  1.28  uebayasi 
    377  1.44  uebayasi 	get_libgcc_new_generate $_abi
    378  1.26  uebayasi }
    379  1.26  uebayasi 
    380   1.1       mrg get_libgcc () {
    381  1.16       mrg 	_subdir="$1"
    382  1.46       mrg 	mkdir -p $_OUTDIR/lib/lib$_subdir/arch
    383  1.16       mrg 
    384  1.16       mrg 	case "$_subdir" in
    385  1.46       mrg 	gcc4|gcc)
    386  1.16       mrg 		_extravars="COLLECT2 UNWIND_H xm_include_list"
    387  1.16       mrg 		_archsubdir=""
    388  1.16       mrg 		;;
    389  1.16       mrg 	esac
    390   1.1       mrg 
    391   1.1       mrg 	# DPBIT, FPBIT only used on mn10[23]00, we don't need them.
    392   1.4       mrg 	# XXX we should probably grab everything Just In Case for
    393   1.4       mrg 	# the future.
    394  1.16       mrg 	{
    395  1.16       mrg 		getvars gcc/Makefile \
    396  1.58       mrg 			INCLUDES LIB2ADD LIB2ADDEH LIB2ADD_ST \
    397  1.16       mrg 			LIB1ASMFUNCS LIB1ASMSRC \
    398  1.16       mrg 			LIB2_DIVMOD_FUNCS LIB2FUNCS_ST \
    399  1.42  uebayasi 			LIB2FUNCS_EXTRA \
    400  1.16       mrg 			LIBGCC2_CFLAGS \
    401  1.16       mrg 			SHLIB_MKMAP SHLIB_MKMAP_OPTS \
    402  1.16       mrg 			SHLIB_MAPFILES SHLIB_NM_FLAGS \
    403  1.16       mrg 			EXTRA_HEADERS xm_defines \
    404  1.16       mrg 			tm_defines ${_extravars}
    405  1.70     skrll 	}	| sanitise_includes \
    406  1.69     skrll 		| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH.mk
    407  1.26  uebayasi 
    408  1.26  uebayasi 	# Generate new style files.
    409  1.27  uebayasi 	if [ -n "${MKNATIVE_LIBGCC_NEW}" ]; then
    410  1.44  uebayasi 		get_libgcc_new $_subdir $_ABI
    411  1.26  uebayasi 	fi
    412   1.1       mrg }
    413   1.1       mrg 
    414  1.24     skrll ##### gnu/lib/libgcov #####
    415  1.24     skrll 
    416  1.24     skrll get_libgcov () {
    417  1.24     skrll 	_subdir="$1"
    418  1.24     skrll 
    419  1.46       mrg 	mkdir -p $_OUTDIR/lib/lib$_subdir/libgcov/arch/$MACHINE_ARCH
    420  1.24     skrll 
    421  1.24     skrll 	{
    422  1.24     skrll 		getvars gcc/Makefile \
    423  1.24     skrll 			LIBGCOV
    424  1.46       mrg 	} | write_mk $_OUTDIRBASE/lib/lib$_subdir/libgcov/arch/$MACHINE_ARCH/defs.mk
    425  1.24     skrll 
    426  1.46       mrg 	write_c $_OUTDIRBASE/lib/lib$_subdir/libgcov/arch/$MACHINE_ARCH/gcov-iov.h \
    427  1.24     skrll 	   <$_TMPDIR/gcc/gcov-iov.h
    428  1.24     skrll 
    429  1.24     skrll }
    430  1.24     skrll 
    431  1.16       mrg ##### gnu/usr.bin/gcc[34]/libiberty #####
    432   1.1       mrg 
    433  1.16       mrg get_gcc_libiberty () {
    434  1.16       mrg 	_subdir="$1"
    435  1.46       mrg 	case "$_subdir" in
    436  1.46       mrg 	gcc4)
    437  1.46       mrg 		_libibertydir="usr.bin/$_subdir/libiberty"
    438  1.46       mrg 		;;
    439  1.46       mrg 	gcc)
    440  1.48       mrg 		_libibertydir="lib/libiberty"
    441  1.46       mrg 		;;
    442  1.46       mrg 	esac
    443  1.46       mrg 	mkdir -p $_OUTDIR/$_libibertydir/arch/$MACHINE_ARCH
    444   1.1       mrg 
    445   1.1       mrg 	getvars libiberty/Makefile \
    446   1.1       mrg 		ALLOCA EXTRA_OFILES LIBOBJS REQUIRED_OFILES \
    447  1.46       mrg 		| write_mk $_OUTDIRBASE/$_libibertydir/defs.mk
    448   1.1       mrg 
    449  1.46       mrg 	write_c $_OUTDIRBASE/$_libibertydir/arch/$MACHINE_ARCH/config.h \
    450   1.1       mrg 		<$_TMPDIR/libiberty/config.h
    451   1.1       mrg }
    452   1.1       mrg 
    453  1.51       mrg ##### lib/libdecnumber #####
    454  1.51       mrg 
    455  1.51       mrg get_libdecnumber () {
    456  1.51       mrg 	_subdir="$1"
    457  1.51       mrg 
    458  1.52       mrg 	mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
    459  1.52       mrg 	write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/config.h \
    460  1.51       mrg 		<$_TMPDIR/libdecnumber/config.h
    461  1.51       mrg }
    462  1.51       mrg 
    463  1.63       mrg ##### lib/libgomp #####
    464  1.63       mrg 
    465  1.63       mrg get_libgomp () {
    466  1.63       mrg 	_subdir="$1"
    467  1.63       mrg 
    468  1.63       mrg 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
    469  1.63       mrg 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
    470  1.63       mrg 		<$_TMPDIR/$_PLATFORM/libgomp/config.h
    471  1.63       mrg 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/libgomp_f.h \
    472  1.63       mrg 		<$_TMPDIR/$_PLATFORM/libgomp/libgomp_f.h
    473  1.63       mrg 	write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/libgomp.spec \
    474  1.63       mrg 		<$_TMPDIR/$_PLATFORM/libgomp/libgomp.spec
    475  1.64       mrg 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/omp.h \
    476  1.64       mrg 		<$_TMPDIR/$_PLATFORM/libgomp/omp.h
    477  1.63       mrg }
    478  1.63       mrg 
    479   1.1       mrg ##### gnu/lib/libobjc #####
    480   1.1       mrg 
    481   1.1       mrg get_libobjc () {
    482  1.46       mrg 	_subdir="$1/arch/$MACHINE_ARCH"
    483  1.46       mrg 	_options="ALL_OPT_FILES"
    484  1.46       mrg 	_unwind="UNWIND_H"
    485  1.18       mrg 
    486  1.46       mrg 	mkdir -p $_OUTDIR/lib/$_subdir
    487   1.1       mrg 
    488  1.16       mrg 	{
    489  1.18       mrg 		if [ -n "$_options" ]; then
    490  1.18       mrg 			getvars gcc/Makefile $_options
    491  1.18       mrg 		fi
    492  1.16       mrg 		getvars $_PLATFORM/libobjc/Makefile \
    493  1.16       mrg 			ALL_CFLAGS INCLUDES OBJS OBJC_H \
    494  1.16       mrg 			| sed "s,$_GNU_DIST,\${GNUHOSTDIST},g"
    495  1.20     skrll 		if [ -n "$_unwind" ]; then
    496  1.20     skrll 			getvars gcc/Makefile $_unwind
    497  1.20     skrll 		fi
    498  1.46       mrg 	} | write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
    499  1.23     skrll 
    500  1.46       mrg 	write_c $_OUTDIRBASE/lib/$_subdir/config.h \
    501  1.23     skrll 		<$_TMPDIR/$_PLATFORM/libobjc/config.h
    502   1.1       mrg }
    503   1.1       mrg 
    504   1.1       mrg ##### gnu/lib/libstdc++-v3 #####
    505   1.1       mrg 
    506   1.1       mrg get_libstdcxx_v3 () {
    507  1.16       mrg 	_subdir="$1"
    508  1.46       mrg 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
    509   1.1       mrg 
    510  1.16       mrg 	case ${_subdir} in
    511  1.46       mrg 	*)
    512  1.16       mrg 		_src_CC_files="atomicity_file CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_CC CLOCALE_CC BASIC_FILE_CC"
    513  1.55       mrg 		_headers1="host_headers debug_headers tr1_headers c_compatibility_headers_extra tr1_impl_headers parallel_headers decimal_headers"
    514  1.55       mrg 		_headers2="thread_host_headers host_headers_extra"
    515  1.19       mrg 		_build_headers="c++allocator.h c++config.h cxxabi_tweaks.h gthr-default.h gthr-posix.h gthr-single.h gthr-tpf.h gthr.h"
    516  1.20     skrll 		_unwind="UNWIND_H"
    517  1.16       mrg 		;;
    518  1.16       mrg 	esac
    519  1.16       mrg 
    520  1.19       mrg 	# build files
    521  1.19       mrg 	for h in $_build_headers; do
    522  1.46       mrg 		write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/$h \
    523  1.19       mrg 			<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/$_PLATFORM/bits/$h
    524  1.19       mrg 	done
    525  1.19       mrg 
    526  1.46       mrg 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
    527   1.6       mrg 		<$_TMPDIR/$_PLATFORM/libstdc++-v3/config.h
    528  1.49       mrg 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/gstdint.h \
    529  1.49       mrg 		<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/gstdint.h
    530   1.6       mrg 
    531   1.1       mrg 	{
    532   1.1       mrg 		# libsupc++
    533   1.1       mrg 		getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \
    534   1.1       mrg 			sources | sed 's/^G_sources=/G_LIBSUPCXX_SOURCES=/'
    535   1.1       mrg 		getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \
    536   1.1       mrg 			c_sources | sed 's/^G_c_sources=/G_LIBSUPCXX_C_SOURCES=/'
    537   1.1       mrg 
    538   1.1       mrg 		# src
    539   1.1       mrg 		getvars $_PLATFORM/libstdc++-v3/src/Makefile \
    540  1.16       mrg 			sources $_src_CC_files SECTION_FLAGS | sed 's/^G_sources=/G_SRC_SOURCES=/'
    541   1.1       mrg 
    542   1.1       mrg 		# include
    543   1.1       mrg 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
    544  1.49       mrg 			c_base_headers std_headers | sed -e 's#/[^ 	][^ 	]*/##g' -e 's/\${GNUHOSTDIST}//g'
    545   1.1       mrg 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
    546   1.1       mrg 			bits_headers backward_headers ext_headers c_base_headers_extra \
    547  1.17       mrg 			$_headers1 | sed -e 's#/[^ 	][^ 	]*/##g' -e 's/\${GNUHOSTDIST}//g'
    548   1.1       mrg 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
    549  1.17       mrg 			$_headers2 | sed -e 's#\./[^ 	][^ 	]*/##g' -e 's/\${GNUHOSTDIST}//g'
    550  1.16       mrg 
    551  1.20     skrll 		if [ -n "$_unwind" ]; then
    552  1.20     skrll 			getvars gcc/Makefile $_unwind
    553  1.20     skrll 		fi
    554  1.46       mrg 	} | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/defs.mk
    555   1.1       mrg }
    556   1.1       mrg 
    557   1.1       mrg ##### gnu/usr.bin/gcc3 #####
    558   1.1       mrg 
    559  1.68     skrll get_gcc_bootstrap () {
    560  1.68     skrll 	_subdir="$1"
    561  1.68     skrll 	mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
    562  1.68     skrll 	for f in auto-host tm config gthr-default; do
    563  1.68     skrll 		write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
    564  1.68     skrll 	done
    565  1.68     skrll }
    566  1.68     skrll 
    567   1.1       mrg get_gcc () {
    568  1.16       mrg 	_subdir="$1"
    569  1.46       mrg 	mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
    570  1.57       mrg 	mkdir -p $_OUTDIR/usr.bin/libcpp/arch/$MACHINE_ARCH
    571  1.19       mrg 	case ${_subdir} in
    572  1.19       mrg 	gcc4)
    573  1.19       mrg 		_buildname="BUILD_"
    574  1.19       mrg 		_libcppsubdir=""
    575  1.20     skrll 		_extravars="TM_H ALL_OPT_FILES"
    576  1.20     skrll 		_hconfig_h=""
    577  1.20     skrll 		_extravars2="tm_file_list build_xm_include_list"
    578  1.20     skrll 		_extravars3="tm_p_include_list"
    579  1.47       mrg 		;;
    580  1.70     skrll 
    581  1.47       mrg 	gcc)
    582  1.47       mrg 		_buildname="BUILD_"
    583  1.47       mrg 		_libcppsubdir=""
    584  1.47       mrg 		_extravars="TM_H ALL_OPT_FILES"
    585  1.47       mrg 		_hconfig_h=""
    586  1.47       mrg 		_extravars2="tm_file_list build_xm_include_list"
    587  1.47       mrg 		_extravars3="tm_p_include_list"
    588  1.19       mrg 		;;
    589  1.19       mrg 	esac
    590   1.1       mrg 
    591   1.1       mrg 	{
    592   1.1       mrg 		getvars gcc/Makefile \
    593  1.19       mrg 			${_buildname}EARLY_SUPPORT ${_buildname}ERRORS ${_buildname}PRINT \
    594  1.19       mrg 			${_buildname}RTL ${_buildname}SUPPORT ${_buildname}VARRAY | \
    595  1.16       mrg 		    sed -e 's#build/errors.o#build-errors.o#g' \
    596  1.16       mrg 			-e 's#build/print-rtl.o#build-print-rtl.o#g' \
    597  1.16       mrg 			-e 's#build/rtl.o#build-rtl.o#g' \
    598  1.16       mrg 			-e 's#build/varray.o#build-varray.o#g' \
    599  1.22       mrg 			-e 's#build/ggc-none.o#build-ggc-none.o#g' \
    600  1.16       mrg 			-e 's#build/##g'
    601  1.16       mrg 		getvars gcc/Makefile \
    602   1.1       mrg 			ALL_CFLAGS ALL_CPPFLAGS C_AND_OBJC_OBJS C_OBJS CCCP_OBJS \
    603  1.20     skrll 			GCOV_OBJS PROTO_OBJS ${_extravars1} \
    604   1.1       mrg 			INCLUDES md_file OBJC_OBJS OBJS out_file version \
    605  1.20     skrll 			BUILD_PREFIX RTL_H TREE_H ${_hconfig_h} BASIC_BLOCK_H GCC_H \
    606   1.1       mrg 			GTFILES_SRCDIR GTFILES_FILES_FILES GTFILES_FILES_LANGS \
    607   1.1       mrg 			GTFILES GTFILES_LANG_DIR_NAMES \
    608   1.1       mrg 			tm_defines host_xm_file host_xm_defines tm_p_file \
    609  1.21       mrg 			target_cpu_default ${_extravars} ${_extravars2} \
    610  1.60       mrg 			lang_specs_files ${_extravars3} \
    611  1.70     skrll 				| sanitise_includes
    612   1.1       mrg 		getvars gcc/Makefile \
    613   1.1       mrg 			LIB2ADDEHDEP | sed 's/unwind.inc//'
    614   1.1       mrg 		getvars gcc/Makefile \
    615   1.1       mrg 			CXX_OBJS CXX_C_OBJS | sed 's/cp\///g'
    616   1.1       mrg 		getvars gcc/Makefile \
    617   1.1       mrg 			F77_OBJS | sed 's/f\///g'
    618  1.19       mrg 		case ${_subdir} in
    619  1.51       mrg 		gcc4 | gcc)
    620  1.19       mrg 			getvars libcpp/Makefile \
    621  1.19       mrg 				libcpp_a_OBJS
    622  1.19       mrg 			;;
    623  1.19       mrg 		gcc3)
    624  1.19       mrg 			getvars gcc/Makefile \
    625  1.19       mrg 				LIBCPP_OBJS LIBCPP_H
    626  1.19       mrg 			;;
    627  1.19       mrg 		esac
    628  1.12     skrll 		getvars gcc/Makefile \
    629  1.16       mrg 			ENABLE_SHARED
    630  1.20     skrll 		case ${_subdir} in
    631  1.46       mrg 		gcc4 | gcc)
    632  1.20     skrll 			echo G_SHLIB_LINK="$CC -shared"
    633  1.20     skrll 			echo G_SHLIB_MULTILIB=.
    634  1.20     skrll 			;;
    635  1.20     skrll 		esac
    636  1.46       mrg 	} | write_mk $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/defs.mk
    637  1.16       mrg 
    638  1.16       mrg 	case "$_subdir" in
    639  1.46       mrg 	gcc4)
    640  1.46       mrg 		write_c $_OUTDIRBASE/usr.bin/$_subdir/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
    641  1.46       mrg 		hfiles='auto-host gencheck configargs gthr-default tm bconfig config multilib'
    642  1.16       mrg 		;;
    643  1.46       mrg 	gcc)
    644  1.51       mrg 		write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
    645  1.51       mrg 		hfiles='auto-host configargs gthr-default tm bconfig config multilib bversion plugin-version'
    646  1.16       mrg 		;;
    647  1.16       mrg 	esac
    648  1.16       mrg 	for f in $hfiles; do
    649  1.46       mrg 		write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
    650  1.62      matt 		if [ "${MACHINE_ARCH}" = "powerpc" -a "${f}" = "configargs" ]
    651  1.62      matt 		then
    652  1.62      matt 			ex <<__EOF__ $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
    653  1.62      matt /configuration_arguments/ s/$//
    654  1.62      matt ya
    655  1.62      matt i
    656  1.65      matt #ifdef _SOFT_FLOAT
    657  1.62      matt .
    658  1.62      matt pu
    659  1.62      matt s/";$/ -with-float=soft";/
    660  1.62      matt a
    661  1.62      matt #else
    662  1.62      matt #endif
    663  1.62      matt .
    664  1.62      matt . m +1
    665  1.62      matt /configure_default_options/ s/{ NULL.*$//
    666  1.62      matt a
    667  1.65      matt #ifdef _SOFT_FLOAT
    668  1.62      matt   { "float", "soft" },
    669  1.62      matt #endif
    670  1.62      matt   { NULL, NULL }
    671  1.62      matt };
    672  1.62      matt .
    673  1.62      matt wq
    674  1.62      matt __EOF__
    675  1.62      matt 		fi
    676   1.1       mrg 	done
    677  1.50       mrg 
    678  1.56       mrg 	# keep identical
    679  1.56       mrg 	for f in all-tree.def; do
    680  1.53       mrg 		cp $_TMPDIR/gcc/$f $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f
    681  1.51       mrg 	done
    682  1.56       mrg 
    683  1.56       mrg 	# special transforms
    684  1.56       mrg 	for f in gtyp-input.list; do
    685  1.56       mrg 		sed -e 's/^.*external\/gpl3\/gcc\/dist/SRCDIR/' < $_TMPDIR/gcc/$f > $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f
    686  1.56       mrg 	done
    687  1.59       mrg 
    688  1.59       mrg 	# special platforms
    689  1.59       mrg 	if [ "${MACHINE_ARCH}" = "sh3el" -o "${MACHINE_ARCH}" = "sh3eb" ]; then
    690  1.59       mrg 		write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/sysroot-suffix.h <$_TMPDIR/gcc/sysroot-suffix.h
    691  1.59       mrg 	fi
    692   1.1       mrg }
    693   1.1       mrg 
    694   1.1       mrg ##### main #####
    695   1.1       mrg 
    696  1.16       mrg case "$1" in
    697  1.16       mrg # .mk and .h files for libgcc bootstrap (from host build)
    698  1.16       mrg libgcc)
    699  1.16       mrg 	get_libgcc gcc3
    700  1.16       mrg 	get_crtstuff crtstuff3
    701  1.16       mrg 	exit 0
    702  1.16       mrg 	;;
    703  1.16       mrg 
    704  1.16       mrg libgcc4)
    705  1.16       mrg 	get_libgcc gcc4
    706  1.16       mrg 	get_crtstuff crtstuff4
    707  1.16       mrg 	exit 0
    708  1.16       mrg 	;;
    709  1.16       mrg 
    710  1.66     skrll libgcc45)
    711  1.66     skrll 	_OUTDIR="$_TOP/external/gpl3/gcc"
    712  1.66     skrll 	_OUTDIRBASE="external/gpl3/gcc"
    713  1.66     skrll 	get_libgcc gcc
    714  1.66     skrll 	get_crtstuff crtstuff
    715  1.66     skrll 	get_libgcov gcc
    716  1.68     skrll 	get_gcc_bootstrap gcc
    717  1.66     skrll 	exit 0
    718  1.66     skrll 	;;
    719  1.66     skrll 
    720  1.16       mrg # gcc files
    721  1.16       mrg gcc4)
    722  1.16       mrg 	get_gcc gcc4
    723  1.16       mrg 	get_libgcc gcc4
    724  1.24     skrll 	get_libgcov gcc4
    725  1.16       mrg 	get_crtstuff crtstuff4
    726  1.16       mrg 	get_gcc_libiberty gcc4
    727  1.16       mrg 	get_libobjc libobjc4
    728  1.16       mrg 	get_libstdcxx_v3 libstdc++-v3_4
    729   1.1       mrg 	exit 0
    730   1.1       mrg 	;;
    731   1.1       mrg 
    732  1.46       mrg gcc45)
    733  1.46       mrg 	_OUTDIR="$_TOP/external/gpl3/gcc"
    734  1.46       mrg 	_OUTDIRBASE="external/gpl3/gcc"
    735  1.46       mrg 	get_gcc gcc
    736  1.46       mrg 	get_libgcc gcc
    737  1.46       mrg 	get_libgcov gcc
    738  1.46       mrg 	get_crtstuff crtstuff
    739  1.46       mrg 	get_gcc_libiberty gcc
    740  1.46       mrg 	get_libobjc libobjc
    741  1.16       mrg 	get_libstdcxx_v3 libstdc++-v3
    742  1.51       mrg 	get_libdecnumber libdecnumber
    743  1.63       mrg 	get_libgomp libgomp
    744   1.1       mrg 	exit 0
    745   1.1       mrg 	;;
    746   1.1       mrg 
    747  1.46       mrg 
    748   1.1       mrg *)	echo invalid arguments; exit 1;;
    749   1.1       mrg esac
    750