2003-07-25 20:26:51 +04:00
|
|
|
#!/bin/sh
|
2011-06-29 06:02:38 +04:00
|
|
|
# $NetBSD: mknative-gcc,v 1.51 2011/06/29 02:02:38 mrg Exp $
|
2003-07-25 20:26:51 +04:00
|
|
|
#
|
|
|
|
# Shell script for generating all the constants needed for a native
|
2003-11-27 13:21:24 +03:00
|
|
|
# platform build of src/gnu/dist/gcc.
|
2003-07-25 20:26:51 +04:00
|
|
|
#
|
|
|
|
|
2003-11-27 04:05:45 +03:00
|
|
|
# initialise
|
2003-07-25 20:26:51 +04:00
|
|
|
|
2003-11-27 04:05:45 +03:00
|
|
|
_TMPDIR=$2
|
|
|
|
_TOP=$3
|
|
|
|
_PLATFORM=$4
|
2009-12-17 18:01:33 +03:00
|
|
|
_ABI=$5
|
2004-12-10 16:58:11 +03:00
|
|
|
_VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ ]*,,'`
|
2003-11-27 04:05:45 +03:00
|
|
|
_GNU_DIST=`cd ${_VPATH}; pwd`
|
2003-07-25 20:26:51 +04:00
|
|
|
|
2003-11-27 04:05:45 +03:00
|
|
|
. $_TOP/tools/gcc/mknative.common
|
2003-07-25 20:26:51 +04:00
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
# default to GCC 4.1 for now
|
|
|
|
_OUTDIR="$_TOP/gnu"
|
|
|
|
_OUTDIRBASE="gnu"
|
|
|
|
|
2004-08-25 00:24:43 +04:00
|
|
|
##### gnu/lib/crtstuff #####
|
|
|
|
|
|
|
|
get_crtstuff () {
|
2006-05-12 06:12:37 +04:00
|
|
|
_subdir="$1"
|
2011-06-21 08:11:12 +04:00
|
|
|
mkdir -p $_OUTDIR/lib/$_subdir/arch
|
2004-08-25 00:24:43 +04:00
|
|
|
|
|
|
|
getvars gcc/Makefile \
|
|
|
|
INCLUDES CRTSTUFF_CFLAGS CRTSTUFF_T_CFLAGS \
|
|
|
|
tm_defines xm_file xm_defines \
|
2011-06-21 08:11:12 +04:00
|
|
|
| write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH.mk
|
2004-08-25 00:24:43 +04:00
|
|
|
}
|
|
|
|
|
2003-07-25 20:26:51 +04:00
|
|
|
##### gnu/lib/libg2c #####
|
|
|
|
|
|
|
|
get_libg2c () {
|
2011-06-21 08:11:12 +04:00
|
|
|
mkdir -p $_OUTDIR/lib/libg2c3/arch/$MACHINE_ARCH
|
2003-07-25 20:26:51 +04:00
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
write_c $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/config.h <$_TMPDIR/$_PLATFORM/libf2c/libU77/config.h
|
|
|
|
write_c $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/g2c.h <$_TMPDIR/$_PLATFORM/libf2c/g2c.h
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
{
|
|
|
|
getvars $_PLATFORM/libf2c/Makefile \
|
|
|
|
F2CEXT
|
|
|
|
getvars $_PLATFORM/libf2c/libF77/Makefile \
|
|
|
|
ALL_CFLAGS OBJS
|
|
|
|
getvars $_PLATFORM/libf2c/libI77/Makefile \
|
|
|
|
ALL_CFLAGS OBJS | sed 's,=,+=,'
|
|
|
|
getvars $_PLATFORM/libf2c/libU77/Makefile \
|
|
|
|
ALL_CFLAGS OBJS | sed 's,=,+=,'
|
2011-06-21 08:11:12 +04:00
|
|
|
} | write_mk $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/defs.mk
|
2003-07-25 20:26:51 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
##### gnu/lib/libgcc #####
|
|
|
|
|
2009-11-30 09:29:58 +03:00
|
|
|
get_libgcc_list_funcs_asm () {
|
2009-12-01 06:13:26 +03:00
|
|
|
{
|
|
|
|
getvars gcc/Makefile LIB1ASMFUNCS | {
|
|
|
|
# print newline separated list
|
|
|
|
sed -e '
|
|
|
|
s,^.*=,,
|
|
|
|
s, *$,,
|
|
|
|
s, *, ,g
|
|
|
|
s, ,\
|
2009-11-30 09:29:58 +03:00
|
|
|
,g'
|
2009-12-01 06:13:26 +03:00
|
|
|
}
|
|
|
|
getvars gcc/Makefile LIB2FUNCS_EXTRA | {
|
|
|
|
# print newline separated list
|
|
|
|
sed -e '
|
|
|
|
s,^.*=,,
|
|
|
|
s, *$,,
|
|
|
|
s, *, ,g
|
|
|
|
s, ,\
|
|
|
|
,g' | \
|
|
|
|
sed -ne '
|
|
|
|
/\.S$/ { s,^.*/,,; s,\.S$,,; p; }
|
|
|
|
/\.asm$/ { s,^.*/,,; s,\.asm$,,; p; }
|
|
|
|
'
|
|
|
|
}
|
2009-11-30 09:29:58 +03:00
|
|
|
} | {
|
|
|
|
# print foo and foo_s
|
|
|
|
sed -ne '
|
|
|
|
/./ {
|
|
|
|
p
|
|
|
|
s,$,_s,
|
|
|
|
p
|
|
|
|
}
|
|
|
|
'
|
|
|
|
} | sort
|
|
|
|
}
|
2009-11-30 09:13:37 +03:00
|
|
|
|
2009-11-30 09:40:17 +03:00
|
|
|
get_libgcc_list_funcs_lib () {
|
|
|
|
local _lib=$1
|
|
|
|
local _lib_prefix=${_lib%.*}
|
|
|
|
local _lib_suffix=${_lib#*.}
|
2009-12-17 18:01:33 +03:00
|
|
|
local _abi=${2:-'\.'}
|
2009-11-30 09:40:17 +03:00
|
|
|
|
2009-12-01 07:59:24 +03:00
|
|
|
cat build/gcc/libgcc.mk | \
|
2009-12-17 18:01:33 +03:00
|
|
|
grep '/'${_abi}'/' | \
|
2009-11-30 09:40:17 +03:00
|
|
|
sed -ne '
|
2009-12-17 18:48:13 +03:00
|
|
|
/^'${_abi}'\/'${_lib_prefix}'\.'${_lib_suffix}': .*\.o$/ {
|
2009-11-30 09:40:17 +03:00
|
|
|
s,^.*/,,
|
|
|
|
s,\.o$,,
|
|
|
|
p
|
|
|
|
}
|
2009-12-01 07:59:24 +03:00
|
|
|
' | sort
|
2009-11-30 09:40:17 +03:00
|
|
|
}
|
|
|
|
|
2009-11-30 09:56:15 +03:00
|
|
|
get_libgcc_list_objs_libs () {
|
2009-12-17 18:01:33 +03:00
|
|
|
local _abi=${1:-'\.'}
|
|
|
|
|
2009-11-30 09:56:15 +03:00
|
|
|
cat build/gcc/libgcc.mk | \
|
2009-12-17 18:01:33 +03:00
|
|
|
grep '/'${_abi}'/' | \
|
2009-12-17 18:48:13 +03:00
|
|
|
egrep '^'${_abi}'\/(libgcc_s\.so|libgcc\.a|libgcc_eh\.a|libgcov\.a): (libgcc_s|libgcc|libgcc_eh|libgcov)\/.*\.o$' | \
|
2009-11-30 09:56:15 +03:00
|
|
|
sed -e '
|
2009-12-17 18:01:33 +03:00
|
|
|
s,^'${_abi}'\/,,
|
2009-11-30 09:56:15 +03:00
|
|
|
s,: .*/, ,
|
|
|
|
s,^\(.*\) \(.*\)$,\2 \1,
|
|
|
|
' | sort
|
|
|
|
}
|
|
|
|
|
|
|
|
get_libgcc_list_objs_srcs () {
|
2009-12-17 18:01:33 +03:00
|
|
|
local _abi=${1:-'\.'} # XXX not used
|
|
|
|
|
2009-11-30 17:34:17 +03:00
|
|
|
if [ -e $_TOP/${libgcc_db_funcs}.S ]; then
|
2009-11-30 09:56:15 +03:00
|
|
|
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,'
|
2009-11-30 17:34:17 +03:00
|
|
|
else
|
|
|
|
cut -f1 $_TOP/${libgcc_db_objs_libs} | sed -e 's,\.o$,,' | \
|
|
|
|
sed -e 's,\(.*\),\1.o \1.c,'
|
|
|
|
fi | sort
|
2009-11-30 09:56:15 +03:00
|
|
|
}
|
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
get_libgcc_list_objs_tmplsrcs () {
|
2009-12-17 18:01:33 +03:00
|
|
|
local _abi=${1:-'\.'}
|
|
|
|
|
2009-11-30 10:19:58 +03:00
|
|
|
grep 'GCC_FOR_TARGET.*\.o$' build/gcc/libgcc.mk | \
|
2009-12-17 18:01:33 +03:00
|
|
|
grep '/'${_abi}'/' | \
|
2009-11-30 10:19:58 +03:00
|
|
|
sed -ne '
|
|
|
|
s,^.* -c \([^ ]*\).* -o .*/\([^ ]*\.o\)$,\2 \1,
|
|
|
|
# basename
|
|
|
|
/\$/ { s,\$.*/,,; }
|
|
|
|
/\// { s,\/.*/,,; }
|
|
|
|
p
|
2009-12-01 07:59:24 +03:00
|
|
|
' | sort -u
|
2009-11-30 10:19:58 +03:00
|
|
|
}
|
|
|
|
|
2009-11-30 10:08:03 +03:00
|
|
|
get_libgcc_list_objs_xflags () {
|
|
|
|
local _flags=$1
|
2009-12-17 18:01:33 +03:00
|
|
|
local _abi=${2:-'\.'}
|
2009-11-30 10:08:03 +03:00
|
|
|
|
|
|
|
grep 'GCC_FOR_TARGET.*\.o$' build/gcc/libgcc.mk | \
|
2009-12-17 18:01:33 +03:00
|
|
|
grep '/'${_abi}'/' | \
|
2009-11-30 10:08:03 +03:00
|
|
|
sed -n '
|
|
|
|
x
|
|
|
|
:loop
|
|
|
|
g
|
|
|
|
s/^\(.*\) \(-['${_flags}'][^ ][^ ]*\) \(.*\) \(-o .*\)\/\(.*\.o\)$/\5 \2/p
|
|
|
|
g
|
|
|
|
s/^\(.*\) \(-['${_flags}'][^ ][^ ]*\) \(.*\) \(-o .*\)\/\(.*\.o\)$/\1 \3 \4\/\5/
|
|
|
|
h
|
|
|
|
t loop
|
|
|
|
' | sort
|
|
|
|
}
|
|
|
|
|
|
|
|
get_libgcc_list_objs_cppflags () {
|
2009-12-17 18:01:33 +03:00
|
|
|
get_libgcc_list_objs_xflags D $1
|
2009-11-30 10:08:03 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get_libgcc_list_objs_copts () {
|
2009-12-17 18:01:33 +03:00
|
|
|
get_libgcc_list_objs_xflags fmx $1
|
2009-11-30 10:08:03 +03:00
|
|
|
}
|
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
get_libgcc_list_tmplsrcs () {
|
2009-11-30 11:00:20 +03:00
|
|
|
local _lib=$1
|
2009-12-17 18:01:33 +03:00
|
|
|
local _abi=$2 # XXX not used
|
2009-11-30 13:03:57 +03:00
|
|
|
local _tmplallsrcs=$( mktemp /tmp/mknative-gcc._tmplallsrcs.XXXXXX )
|
2009-11-30 11:00:20 +03:00
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
touch $_TOP/${libgcc_db_tmplsrcs}.tmplsrcs.${_lib%.*}
|
|
|
|
touch $_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.${_lib%.*}
|
|
|
|
touch $_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.${_lib%.*}
|
2009-11-30 11:00:20 +03:00
|
|
|
|
|
|
|
# all files
|
|
|
|
local _lib_prefix=${_lib%.*}
|
|
|
|
local _lib_suffix=${_lib#*.}
|
2009-11-30 13:03:57 +03:00
|
|
|
join $_TOP/$libgcc_db_objs_libs $_TOP/$libgcc_db_objs_tmplsrcs | \
|
2009-11-30 11:00:20 +03:00
|
|
|
grep ${_lib_prefix}'\.'${_lib_suffix} | cut -d' ' -f 3 | sort -u > \
|
2009-11-30 13:03:57 +03:00
|
|
|
$_tmplallsrcs
|
2009-11-30 11:00:20 +03:00
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
# TMPLFPSRCS = [fdp]p-bit.c
|
|
|
|
grep '[fdt]p-bit\.c' <$_tmplallsrcs | sort -u | \
|
|
|
|
writefile ${libgcc_db_tmplsrcs}.tmplfpsrcs.${_lib%.*}
|
2009-11-30 11:00:20 +03:00
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
# TMPLASMSRCS = $(LIB1ASMSRC)
|
|
|
|
grep '\$(LIB1ASMSRC)' <$_tmplallsrcs | sort -u | \
|
|
|
|
writefile ${libgcc_db_tmplsrcs}.tmplasmsrcs.${_lib%.*}
|
2009-11-30 11:00:20 +03:00
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
# TMPLSRCS is anything else; exclude TMPLFPSRCS and TMPLASMSRCS
|
|
|
|
cat $_tmplallsrcs | \
|
|
|
|
comm -23 /dev/stdin $_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.${_lib%.*} | \
|
|
|
|
comm -23 /dev/stdin $_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.${_lib%.*} | \
|
|
|
|
writefile ${libgcc_db_tmplsrcs}.tmplsrcs.${_lib%.*}
|
2009-11-30 11:00:20 +03:00
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
rm -f $_tmplallsrcs
|
2009-11-30 11:00:20 +03:00
|
|
|
}
|
|
|
|
|
2009-11-30 11:20:23 +03:00
|
|
|
get_libgcc_new_analyze () {
|
2009-12-17 18:01:33 +03:00
|
|
|
local _abi=$1
|
|
|
|
|
2009-11-30 11:20:23 +03:00
|
|
|
mkdir -p $_TOP/${_machine_arch_subdir}
|
|
|
|
|
2009-11-30 17:34:17 +03:00
|
|
|
touch $_TOP/${libgcc_db_funcs}.S
|
2009-11-30 11:20:23 +03:00
|
|
|
get_libgcc_list_funcs_asm | \
|
|
|
|
writefile ${libgcc_db_funcs}.S
|
|
|
|
|
|
|
|
for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
|
2009-11-30 17:34:17 +03:00
|
|
|
touch $_TOP/${libgcc_db_funcs}.${_lib%.*}
|
2009-12-17 18:01:33 +03:00
|
|
|
get_libgcc_list_funcs_lib $_lib $_abi | \
|
2009-11-30 11:20:23 +03:00
|
|
|
writefile ${libgcc_db_funcs}.${_lib%.*}
|
|
|
|
done
|
|
|
|
|
2009-12-17 18:01:33 +03:00
|
|
|
get_libgcc_list_objs_libs $_abi | writefile ${libgcc_db_objs_libs}
|
|
|
|
get_libgcc_list_objs_srcs $_abi | writefile ${libgcc_db_objs_srcs}
|
|
|
|
get_libgcc_list_objs_tmplsrcs $_abi | writefile ${libgcc_db_objs_tmplsrcs}
|
|
|
|
get_libgcc_list_objs_cppflags $_abi | writefile ${libgcc_db_objs_cppflags}
|
|
|
|
get_libgcc_list_objs_copts $_abi | writefile ${libgcc_db_objs_copts}
|
2009-11-30 11:20:23 +03:00
|
|
|
|
|
|
|
for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
|
2009-12-17 18:01:33 +03:00
|
|
|
get_libgcc_list_tmplsrcs $_lib $_abi
|
2009-11-30 11:20:23 +03:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
#####
|
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
get_libgcc_gen_tmplsrcs_tmplsrcs () {
|
2009-11-30 12:33:36 +03:00
|
|
|
local _lib=$1
|
|
|
|
|
|
|
|
printf '\n'
|
2009-11-30 13:03:57 +03:00
|
|
|
printf 'TMPLSRCS.%s = \\\n' $_lib
|
|
|
|
sed -e 's,^, ,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplsrcs.${_lib%.*}
|
2009-11-30 12:33:36 +03:00
|
|
|
}
|
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
get_libgcc_gen_tmplsrcs_tmplfpsrcs () {
|
2009-11-30 12:33:36 +03:00
|
|
|
local _lib=$1
|
|
|
|
|
|
|
|
printf '\n'
|
2009-11-30 13:03:57 +03:00
|
|
|
printf 'TMPLFPSRCS.%s = \\\n' $_lib
|
|
|
|
sed -e 's,^, ,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.${_lib%.*}
|
2009-11-30 12:33:36 +03:00
|
|
|
}
|
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
get_libgcc_gen_tmplsrcs_tmplasmsrcs () {
|
2009-11-30 12:33:36 +03:00
|
|
|
local _lib=$1
|
|
|
|
|
|
|
|
printf '\n'
|
2009-11-30 13:03:57 +03:00
|
|
|
printf 'TMPLASMSRCS.%s = \\\n' $_lib
|
|
|
|
sed -e 's,^, ,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.${_lib%.*} | \
|
2009-11-30 12:33:36 +03:00
|
|
|
sed -e 's,LIB1ASMSRC,G_&,'
|
|
|
|
}
|
|
|
|
|
2009-11-30 12:32:13 +03:00
|
|
|
get_libgcc_gen_srcs () {
|
|
|
|
local _lib=$1
|
|
|
|
|
|
|
|
printf '\n'
|
|
|
|
printf 'SRCS.%s = \\\n' $_lib
|
2009-11-30 17:34:17 +03:00
|
|
|
if [ -e $_TOP/${libgcc_db_funcs}.S ]; then
|
2009-11-30 12:32:13 +03:00
|
|
|
comm -23 $_TOP/${libgcc_db_funcs}.${_lib%.*} $_TOP/${libgcc_db_funcs}.S | \
|
|
|
|
sed -e 's,$,.c,; s,^,tmp_,'
|
|
|
|
comm -12 $_TOP/${libgcc_db_funcs}.${_lib%.*} $_TOP/${libgcc_db_funcs}.S | \
|
|
|
|
sed -e 's,$,.S,; s,^,tmp_,'
|
2009-11-30 17:34:17 +03:00
|
|
|
else
|
|
|
|
cat $_TOP/${libgcc_db_funcs}.${_lib%.*} | \
|
|
|
|
sed -e 's,$,.c,; s,^,tmp_,'
|
|
|
|
fi | sort | \
|
2009-11-30 12:32:13 +03:00
|
|
|
sed -e 's,^, ,; s,$, \\,'
|
|
|
|
}
|
|
|
|
|
2009-11-30 12:50:59 +03:00
|
|
|
_lookup_objs () {
|
|
|
|
local _obj=$1; local _key=$2
|
|
|
|
|
|
|
|
eval grep \^$_obj\\\ \$_TOP/\${libgcc_db_objs_${_key}} | cut -f2
|
|
|
|
}
|
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
get_libgcc_gen_srcs_tmplsrcs () {
|
2009-11-30 12:50:59 +03:00
|
|
|
cut -f1 $_TOP/${libgcc_db_objs_libs} | \
|
|
|
|
while read _obj; do
|
|
|
|
printf 'SRCS.tmp_%s=%s\n' \
|
|
|
|
"$( _lookup_objs $_obj srcs )" \
|
2009-11-30 13:03:57 +03:00
|
|
|
"$( _lookup_objs $_obj tmplsrcs )"
|
2009-11-30 12:50:59 +03:00
|
|
|
done | \
|
|
|
|
sed -e 's,\$(\(.*\)),${G_\1},'
|
|
|
|
}
|
|
|
|
|
|
|
|
get_libgcc_gen_srcs_cppflags () {
|
|
|
|
cut -f1 $_TOP/${libgcc_db_objs_libs} | \
|
|
|
|
while read _obj; do
|
|
|
|
printf '_CPPFLAGS.tmp_%s=%s\n' \
|
|
|
|
"$( _lookup_objs $_obj srcs )" \
|
|
|
|
"$( _lookup_objs $_obj cppflags | xargs )"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
get_libgcc_gen_srcs_copts () {
|
|
|
|
cut -f1 $_TOP/${libgcc_db_objs_libs} | \
|
|
|
|
while read _obj; do
|
|
|
|
printf 'COPTS.tmp_%s=%s\n' \
|
|
|
|
"$( _lookup_objs $_obj srcs )" \
|
|
|
|
"$( _lookup_objs $_obj copts | xargs )"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2009-11-30 11:20:23 +03:00
|
|
|
get_libgcc_new_generate () {
|
2009-12-17 18:01:33 +03:00
|
|
|
local _abi=$1
|
|
|
|
|
2009-11-30 12:32:13 +03:00
|
|
|
for _lib in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a; do
|
2009-11-30 13:03:57 +03:00
|
|
|
for _tmpl in tmplsrcs tmplfpsrcs tmplasmsrcs; do
|
|
|
|
eval get_libgcc_gen_tmplsrcs_${_tmpl} $_lib | \
|
|
|
|
write_mk ${libgcc_libs_mk}.${_lib%.*}.tmplsrcs.${_tmpl}.mk
|
2009-11-30 12:33:36 +03:00
|
|
|
done
|
|
|
|
|
2009-11-30 12:32:13 +03:00
|
|
|
get_libgcc_gen_srcs $_lib | \
|
2009-11-30 12:57:59 +03:00
|
|
|
write_mk ${libgcc_libs_mk}.${_lib%.*}.srcs.mk
|
2009-11-30 12:32:13 +03:00
|
|
|
done
|
2009-11-30 12:50:59 +03:00
|
|
|
|
2009-11-30 13:03:57 +03:00
|
|
|
for _arg in tmplsrcs cppflags copts; do
|
2009-11-30 12:50:59 +03:00
|
|
|
eval get_libgcc_gen_srcs_${_arg} | \
|
|
|
|
eval writefile \$libgcc_srcs_mk_${_arg}
|
|
|
|
done
|
2009-11-30 11:20:23 +03:00
|
|
|
}
|
|
|
|
|
2009-11-30 11:00:20 +03:00
|
|
|
#####
|
|
|
|
|
2009-11-30 09:29:58 +03:00
|
|
|
get_libgcc_new () {
|
|
|
|
_subdir="$1"
|
2009-12-17 18:01:33 +03:00
|
|
|
_abi="$2"
|
2009-11-30 09:13:37 +03:00
|
|
|
|
2009-11-30 09:40:17 +03:00
|
|
|
# List of generated files.
|
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
_machine_arch_subdir=$_OUTDIRBASE/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH/$_abi
|
2009-11-30 09:13:37 +03:00
|
|
|
|
2009-11-30 09:29:58 +03:00
|
|
|
libgcc_db_funcs=${_machine_arch_subdir}/funcs
|
2009-11-30 13:03:57 +03:00
|
|
|
libgcc_db_tmplsrcs=${_machine_arch_subdir}/tmplsrcs
|
2009-11-30 09:29:58 +03:00
|
|
|
libgcc_db_objs_libs=${_machine_arch_subdir}/objs.libs
|
|
|
|
libgcc_db_objs_srcs=${_machine_arch_subdir}/objs.srcs
|
2009-11-30 13:03:57 +03:00
|
|
|
libgcc_db_objs_tmplsrcs=${_machine_arch_subdir}/objs.tmplsrcs
|
2009-11-30 09:29:58 +03:00
|
|
|
libgcc_db_objs_cppflags=${_machine_arch_subdir}/objs.cppflags
|
|
|
|
libgcc_db_objs_copts=${_machine_arch_subdir}/objs.copts
|
|
|
|
|
2009-12-17 18:01:33 +03:00
|
|
|
get_libgcc_new_analyze $_abi
|
2009-11-30 12:32:13 +03:00
|
|
|
|
2009-11-30 12:57:59 +03:00
|
|
|
libgcc_libs_mk=${_machine_arch_subdir}/libs
|
2009-11-30 09:29:58 +03:00
|
|
|
libgcc_srcs_mk=${_machine_arch_subdir}/srcs.mk
|
2009-11-30 13:03:57 +03:00
|
|
|
libgcc_srcs_mk_tmplsrcs=${_machine_arch_subdir}/srcs.tmplsrcs.mk
|
2009-11-30 09:29:58 +03:00
|
|
|
libgcc_srcs_mk_cppflags=${_machine_arch_subdir}/srcs.cppflags.mk
|
|
|
|
libgcc_srcs_mk_copts=${_machine_arch_subdir}/srcs.copts.mk
|
|
|
|
|
2009-12-17 18:01:33 +03:00
|
|
|
get_libgcc_new_generate $_abi
|
2009-11-30 08:50:07 +03:00
|
|
|
}
|
|
|
|
|
2003-07-25 20:26:51 +04:00
|
|
|
get_libgcc () {
|
2006-05-12 06:12:37 +04:00
|
|
|
_subdir="$1"
|
2011-06-21 08:11:12 +04:00
|
|
|
mkdir -p $_OUTDIR/lib/lib$_subdir/arch
|
2006-05-12 06:12:37 +04:00
|
|
|
|
|
|
|
case "$_subdir" in
|
2011-06-21 08:11:12 +04:00
|
|
|
gcc4|gcc)
|
2006-05-12 06:12:37 +04:00
|
|
|
_extravars="COLLECT2 UNWIND_H xm_include_list"
|
|
|
|
_archsubdir=""
|
|
|
|
;;
|
|
|
|
esac
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
# DPBIT, FPBIT only used on mn10[23]00, we don't need them.
|
2003-07-30 09:06:28 +04:00
|
|
|
# XXX we should probably grab everything Just In Case for
|
|
|
|
# the future.
|
2006-05-12 06:12:37 +04:00
|
|
|
{
|
|
|
|
getvars gcc/Makefile \
|
|
|
|
INCLUDES LIB2ADD LIB2ADDEH \
|
|
|
|
LIB1ASMFUNCS LIB1ASMSRC \
|
|
|
|
LIB2_DIVMOD_FUNCS LIB2FUNCS_ST \
|
2009-12-01 06:13:26 +03:00
|
|
|
LIB2FUNCS_EXTRA \
|
2006-05-12 06:12:37 +04:00
|
|
|
LIBGCC2_CFLAGS \
|
|
|
|
SHLIB_MKMAP SHLIB_MKMAP_OPTS \
|
|
|
|
SHLIB_MAPFILES SHLIB_NM_FLAGS \
|
|
|
|
EXTRA_HEADERS xm_defines \
|
|
|
|
tm_defines ${_extravars}
|
2011-06-21 08:11:12 +04:00
|
|
|
} | write_mk $_OUTDIRBASE/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH.mk
|
2009-11-30 08:50:07 +03:00
|
|
|
|
|
|
|
# Generate new style files.
|
2009-11-30 09:13:37 +03:00
|
|
|
if [ -n "${MKNATIVE_LIBGCC_NEW}" ]; then
|
2009-12-17 18:01:33 +03:00
|
|
|
get_libgcc_new $_subdir $_ABI
|
2009-11-30 08:50:07 +03:00
|
|
|
fi
|
2003-07-25 20:26:51 +04:00
|
|
|
}
|
|
|
|
|
2008-09-19 17:18:28 +04:00
|
|
|
##### gnu/lib/libgcov #####
|
|
|
|
|
|
|
|
get_libgcov () {
|
|
|
|
_subdir="$1"
|
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
mkdir -p $_OUTDIR/lib/lib$_subdir/libgcov/arch/$MACHINE_ARCH
|
2008-09-19 17:18:28 +04:00
|
|
|
|
|
|
|
{
|
|
|
|
getvars gcc/Makefile \
|
|
|
|
LIBGCOV
|
2011-06-21 08:11:12 +04:00
|
|
|
} | write_mk $_OUTDIRBASE/lib/lib$_subdir/libgcov/arch/$MACHINE_ARCH/defs.mk
|
2008-09-19 17:18:28 +04:00
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
write_c $_OUTDIRBASE/lib/lib$_subdir/libgcov/arch/$MACHINE_ARCH/gcov-iov.h \
|
2008-09-19 17:18:28 +04:00
|
|
|
<$_TMPDIR/gcc/gcov-iov.h
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2006-05-12 06:12:37 +04:00
|
|
|
##### gnu/usr.bin/gcc[34]/libiberty #####
|
2003-07-25 20:26:51 +04:00
|
|
|
|
2006-05-12 06:12:37 +04:00
|
|
|
get_gcc_libiberty () {
|
|
|
|
_subdir="$1"
|
2011-06-21 08:11:12 +04:00
|
|
|
case "$_subdir" in
|
|
|
|
gcc4)
|
|
|
|
_libibertydir="usr.bin/$_subdir/libiberty"
|
|
|
|
;;
|
|
|
|
gcc)
|
2011-06-23 16:06:32 +04:00
|
|
|
_libibertydir="lib/libiberty"
|
2011-06-21 08:11:12 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
mkdir -p $_OUTDIR/$_libibertydir/arch/$MACHINE_ARCH
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
getvars libiberty/Makefile \
|
|
|
|
ALLOCA EXTRA_OFILES LIBOBJS REQUIRED_OFILES \
|
2011-06-21 08:11:12 +04:00
|
|
|
| write_mk $_OUTDIRBASE/$_libibertydir/defs.mk
|
2003-07-25 20:26:51 +04:00
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
write_c $_OUTDIRBASE/$_libibertydir/arch/$MACHINE_ARCH/config.h \
|
2003-07-25 20:26:51 +04:00
|
|
|
<$_TMPDIR/libiberty/config.h
|
|
|
|
}
|
|
|
|
|
2011-06-29 06:02:38 +04:00
|
|
|
##### lib/libdecnumber #####
|
|
|
|
|
|
|
|
get_libdecnumber () {
|
|
|
|
_subdir="$1"
|
|
|
|
|
|
|
|
mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
|
|
|
|
write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
|
|
|
|
<$_TMPDIR/libdecnumber/config.h
|
|
|
|
}
|
|
|
|
|
2003-07-25 20:26:51 +04:00
|
|
|
##### gnu/lib/libobjc #####
|
|
|
|
|
|
|
|
get_libobjc () {
|
2011-06-21 08:11:12 +04:00
|
|
|
_subdir="$1/arch/$MACHINE_ARCH"
|
|
|
|
_options="ALL_OPT_FILES"
|
|
|
|
_unwind="UNWIND_H"
|
2006-05-23 14:55:55 +04:00
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
mkdir -p $_OUTDIR/lib/$_subdir
|
2003-07-25 20:26:51 +04:00
|
|
|
|
2006-05-12 06:12:37 +04:00
|
|
|
{
|
2006-05-23 14:55:55 +04:00
|
|
|
if [ -n "$_options" ]; then
|
|
|
|
getvars gcc/Makefile $_options
|
|
|
|
fi
|
2006-05-12 06:12:37 +04:00
|
|
|
getvars $_PLATFORM/libobjc/Makefile \
|
|
|
|
ALL_CFLAGS INCLUDES OBJS OBJC_H \
|
|
|
|
| sed "s,$_GNU_DIST,\${GNUHOSTDIST},g"
|
2006-06-09 19:30:52 +04:00
|
|
|
if [ -n "$_unwind" ]; then
|
|
|
|
getvars gcc/Makefile $_unwind
|
|
|
|
fi
|
2011-06-21 08:11:12 +04:00
|
|
|
} | write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
|
2008-02-08 21:06:48 +03:00
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
write_c $_OUTDIRBASE/lib/$_subdir/config.h \
|
2008-02-08 21:06:48 +03:00
|
|
|
<$_TMPDIR/$_PLATFORM/libobjc/config.h
|
2003-07-25 20:26:51 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
##### gnu/lib/libstdc++-v3 #####
|
|
|
|
|
|
|
|
get_libstdcxx_v3 () {
|
2006-05-12 06:12:37 +04:00
|
|
|
_subdir="$1"
|
2011-06-21 08:11:12 +04:00
|
|
|
mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
|
2003-07-25 20:26:51 +04:00
|
|
|
|
2006-05-12 06:12:37 +04:00
|
|
|
case ${_subdir} in
|
2011-06-21 08:11:12 +04:00
|
|
|
*)
|
2006-05-12 06:12:37 +04:00
|
|
|
_src_CC_files="atomicity_file CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_CC CLOCALE_CC BASIC_FILE_CC"
|
|
|
|
_headers1="host_headers debug_headers tr1_headers c_compatibility_headers_extra"
|
|
|
|
_headers2="thread_host_headers host_headers_extra"
|
2006-06-02 23:44:20 +04:00
|
|
|
_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"
|
2006-06-09 19:30:52 +04:00
|
|
|
_unwind="UNWIND_H"
|
2006-05-12 06:12:37 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2006-06-02 23:44:20 +04:00
|
|
|
# build files
|
|
|
|
for h in $_build_headers; do
|
2011-06-21 08:11:12 +04:00
|
|
|
write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/$h \
|
2006-06-02 23:44:20 +04:00
|
|
|
<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/$_PLATFORM/bits/$h
|
|
|
|
done
|
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
|
2003-08-01 06:44:55 +04:00
|
|
|
<$_TMPDIR/$_PLATFORM/libstdc++-v3/config.h
|
2011-06-28 07:58:55 +04:00
|
|
|
write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/gstdint.h \
|
|
|
|
<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/gstdint.h
|
|
|
|
write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/omp.h \
|
|
|
|
<$_TMPDIR/$_PLATFORM/libgomp/omp.h
|
2003-08-01 06:44:55 +04:00
|
|
|
|
2003-07-25 20:26:51 +04:00
|
|
|
{
|
|
|
|
# libsupc++
|
|
|
|
getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \
|
|
|
|
sources | sed 's/^G_sources=/G_LIBSUPCXX_SOURCES=/'
|
|
|
|
getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \
|
|
|
|
c_sources | sed 's/^G_c_sources=/G_LIBSUPCXX_C_SOURCES=/'
|
|
|
|
|
|
|
|
# src
|
|
|
|
getvars $_PLATFORM/libstdc++-v3/src/Makefile \
|
2006-05-12 06:12:37 +04:00
|
|
|
sources $_src_CC_files SECTION_FLAGS | sed 's/^G_sources=/G_SRC_SOURCES=/'
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
# include
|
|
|
|
getvars $_PLATFORM/libstdc++-v3/include/Makefile \
|
2011-06-28 07:58:55 +04:00
|
|
|
c_base_headers std_headers | sed -e 's#/[^ ][^ ]*/##g' -e 's/\${GNUHOSTDIST}//g'
|
2003-07-25 20:26:51 +04:00
|
|
|
getvars $_PLATFORM/libstdc++-v3/include/Makefile \
|
|
|
|
bits_headers backward_headers ext_headers c_base_headers_extra \
|
2006-05-16 02:03:03 +04:00
|
|
|
$_headers1 | sed -e 's#/[^ ][^ ]*/##g' -e 's/\${GNUHOSTDIST}//g'
|
2003-07-25 20:26:51 +04:00
|
|
|
getvars $_PLATFORM/libstdc++-v3/include/Makefile \
|
2006-05-16 02:03:03 +04:00
|
|
|
$_headers2 | sed -e 's#\./[^ ][^ ]*/##g' -e 's/\${GNUHOSTDIST}//g'
|
2006-05-12 06:12:37 +04:00
|
|
|
|
2006-06-09 19:30:52 +04:00
|
|
|
if [ -n "$_unwind" ]; then
|
|
|
|
getvars gcc/Makefile $_unwind
|
|
|
|
fi
|
2011-06-21 08:11:12 +04:00
|
|
|
} | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/defs.mk
|
2003-07-25 20:26:51 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
##### gnu/usr.bin/gcc3 #####
|
|
|
|
|
|
|
|
get_gcc () {
|
2006-05-12 06:12:37 +04:00
|
|
|
_subdir="$1"
|
2011-06-21 08:11:12 +04:00
|
|
|
mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
|
2011-06-23 09:42:37 +04:00
|
|
|
mkdir -p $_OUTDIR/usr.bin/$_subdir/libcpp/arch/$MACHINE_ARCH
|
2006-06-02 23:44:20 +04:00
|
|
|
case ${_subdir} in
|
|
|
|
gcc4)
|
|
|
|
_buildname="BUILD_"
|
|
|
|
_libcppsubdir=""
|
2006-06-09 19:30:52 +04:00
|
|
|
_extravars="TM_H ALL_OPT_FILES"
|
|
|
|
_hconfig_h=""
|
|
|
|
_extravars2="tm_file_list build_xm_include_list"
|
|
|
|
_extravars3="tm_p_include_list"
|
2006-06-02 23:44:20 +04:00
|
|
|
;;
|
2011-06-23 09:42:37 +04:00
|
|
|
|
|
|
|
gcc)
|
|
|
|
_buildname="BUILD_"
|
|
|
|
_libcppsubdir=""
|
|
|
|
_extravars="TM_H ALL_OPT_FILES"
|
|
|
|
_hconfig_h=""
|
|
|
|
_extravars2="tm_file_list build_xm_include_list"
|
|
|
|
_extravars3="tm_p_include_list"
|
2006-06-02 23:44:20 +04:00
|
|
|
;;
|
|
|
|
esac
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
{
|
2006-05-12 06:12:37 +04:00
|
|
|
getvars gcc/Makefile \
|
2006-06-02 23:44:20 +04:00
|
|
|
${_buildname}EARLY_SUPPORT ${_buildname}ERRORS ${_buildname}PRINT \
|
|
|
|
${_buildname}RTL ${_buildname}SUPPORT ${_buildname}VARRAY | \
|
2006-05-12 06:12:37 +04:00
|
|
|
sed -e 's#build/errors.o#build-errors.o#g' \
|
|
|
|
-e 's#build/print-rtl.o#build-print-rtl.o#g' \
|
|
|
|
-e 's#build/rtl.o#build-rtl.o#g' \
|
|
|
|
-e 's#build/varray.o#build-varray.o#g' \
|
2006-06-25 07:06:15 +04:00
|
|
|
-e 's#build/ggc-none.o#build-ggc-none.o#g' \
|
2006-05-12 06:12:37 +04:00
|
|
|
-e 's#build/##g'
|
2003-07-25 20:26:51 +04:00
|
|
|
getvars gcc/Makefile \
|
|
|
|
ALL_CFLAGS ALL_CPPFLAGS C_AND_OBJC_OBJS C_OBJS CCCP_OBJS \
|
2006-06-09 19:30:52 +04:00
|
|
|
GCOV_OBJS PROTO_OBJS ${_extravars1} \
|
2003-07-25 20:26:51 +04:00
|
|
|
INCLUDES md_file OBJC_OBJS OBJS out_file version \
|
2006-06-09 19:30:52 +04:00
|
|
|
BUILD_PREFIX RTL_H TREE_H ${_hconfig_h} BASIC_BLOCK_H GCC_H \
|
2003-07-25 20:26:51 +04:00
|
|
|
GTFILES_SRCDIR GTFILES_FILES_FILES GTFILES_FILES_LANGS \
|
|
|
|
GTFILES GTFILES_LANG_DIR_NAMES \
|
|
|
|
tm_defines host_xm_file host_xm_defines tm_p_file \
|
2006-06-24 09:26:50 +04:00
|
|
|
target_cpu_default ${_extravars} ${_extravars2} \
|
2006-06-09 19:30:52 +04:00
|
|
|
lang_specs_files ${_extravars3}
|
2003-07-25 20:26:51 +04:00
|
|
|
getvars gcc/Makefile \
|
|
|
|
LIB2ADDEHDEP | sed 's/unwind.inc//'
|
|
|
|
getvars gcc/Makefile \
|
|
|
|
CXX_OBJS CXX_C_OBJS | sed 's/cp\///g'
|
|
|
|
getvars gcc/Makefile \
|
|
|
|
F77_OBJS | sed 's/f\///g'
|
2006-06-02 23:44:20 +04:00
|
|
|
case ${_subdir} in
|
2011-06-29 06:02:38 +04:00
|
|
|
gcc4 | gcc)
|
2006-06-02 23:44:20 +04:00
|
|
|
getvars libcpp/Makefile \
|
|
|
|
libcpp_a_OBJS
|
|
|
|
;;
|
|
|
|
gcc3)
|
|
|
|
getvars gcc/Makefile \
|
|
|
|
LIBCPP_OBJS LIBCPP_H
|
|
|
|
;;
|
|
|
|
esac
|
2004-02-10 12:37:58 +03:00
|
|
|
getvars gcc/Makefile \
|
2006-05-12 06:12:37 +04:00
|
|
|
ENABLE_SHARED
|
2006-06-09 19:30:52 +04:00
|
|
|
case ${_subdir} in
|
2011-06-21 08:11:12 +04:00
|
|
|
gcc4 | gcc)
|
2006-06-09 19:30:52 +04:00
|
|
|
echo G_SHLIB_LINK="$CC -shared"
|
|
|
|
echo G_SHLIB_MULTILIB=.
|
|
|
|
;;
|
|
|
|
esac
|
2011-06-21 08:11:12 +04:00
|
|
|
} | write_mk $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/defs.mk
|
2006-05-12 06:12:37 +04:00
|
|
|
|
|
|
|
case "$_subdir" in
|
|
|
|
gcc4)
|
2011-06-21 08:11:12 +04:00
|
|
|
write_c $_OUTDIRBASE/usr.bin/$_subdir/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
|
|
|
|
hfiles='auto-host gencheck configargs gthr-default tm bconfig config multilib'
|
|
|
|
;;
|
|
|
|
gcc)
|
2011-06-29 06:02:38 +04:00
|
|
|
mkdir -p $_OUTDIR/usr.bin/libcpp/arch/$MACHINE_ARCH
|
|
|
|
write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
|
|
|
|
hfiles='auto-host configargs gthr-default tm bconfig config multilib bversion plugin-version'
|
2006-05-12 06:12:37 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
for f in $hfiles; do
|
2011-06-21 08:11:12 +04:00
|
|
|
write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
|
2003-07-25 20:26:51 +04:00
|
|
|
done
|
2011-06-28 08:30:32 +04:00
|
|
|
|
2011-06-29 06:02:38 +04:00
|
|
|
for f in all-tree.def; do
|
|
|
|
write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f <$_TMPDIR/gcc/$f
|
|
|
|
done
|
2003-07-25 20:26:51 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
##### main #####
|
|
|
|
|
2006-05-12 06:12:37 +04:00
|
|
|
case "$1" in
|
|
|
|
# .mk and .h files for libgcc bootstrap (from host build)
|
|
|
|
libgcc)
|
|
|
|
get_libgcc gcc3
|
|
|
|
get_crtstuff crtstuff3
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
|
|
|
|
libgcc4)
|
|
|
|
get_libgcc gcc4
|
|
|
|
get_crtstuff crtstuff4
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
|
|
|
|
# gcc files
|
|
|
|
gcc4)
|
|
|
|
get_gcc gcc4
|
|
|
|
get_libgcc gcc4
|
2008-09-19 17:18:28 +04:00
|
|
|
get_libgcov gcc4
|
2006-05-12 06:12:37 +04:00
|
|
|
get_crtstuff crtstuff4
|
|
|
|
get_gcc_libiberty gcc4
|
|
|
|
get_libobjc libobjc4
|
|
|
|
get_libstdcxx_v3 libstdc++-v3_4
|
2003-07-25 20:26:51 +04:00
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
gcc45)
|
|
|
|
_OUTDIR="$_TOP/external/gpl3/gcc"
|
|
|
|
_OUTDIRBASE="external/gpl3/gcc"
|
|
|
|
get_gcc gcc
|
|
|
|
get_libgcc gcc
|
|
|
|
get_libgcov gcc
|
|
|
|
get_crtstuff crtstuff
|
|
|
|
get_gcc_libiberty gcc
|
|
|
|
get_libobjc libobjc
|
2006-05-12 06:12:37 +04:00
|
|
|
get_libstdcxx_v3 libstdc++-v3
|
2011-06-29 06:02:38 +04:00
|
|
|
get_libdecnumber libdecnumber
|
2003-07-25 20:26:51 +04:00
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
|
2011-06-21 08:11:12 +04:00
|
|
|
|
2003-07-25 20:26:51 +04:00
|
|
|
*) echo invalid arguments; exit 1;;
|
|
|
|
esac
|