2 # $NetBSD: mknative-gcc,v 1.74 2013/11/28 12:08:57 mrg Exp $
4 # Shell script for generating all the constants needed for a native
5 # platform build of gcc.
16 _VPATH
=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ ]*,,'`
17 _GNU_DIST
=`cd ${_VPATH}; pwd`
19 if [ -z "$_DESTDIR" ]; then
20 echo "\$_DESTDIR is empty" 2>&1
24 .
$_TOP/tools
/gcc
/mknative.common
26 # default to GCC 4.1 for now
30 sanitise_includes
() {
32 -e "s,-I$_DESTDIR/usr/include,,g" \
33 -e "s,-I$_SRC/external/lgpl3/mpfr/dist,,g" \
34 -e "s,-I$_SRC/external/lgpl3/mpc/dist/src,,g" \
35 -e "s,-I$_SRC/external/lgpl3/gmp/lib/libgmp/arch/$MACHINE_ARCH,,g" \
36 -e "s,-I/usr/include/[^ ]*,,"
39 ##### gnu/lib/crtstuff #####
43 mkdir
-p $_OUTDIR/lib
/$_subdir/arch
45 getvars gcc
/Makefile \
46 INCLUDES CRTSTUFF_CFLAGS CRTSTUFF_T_CFLAGS CRTSTUFF_T_CFLAGS_S \
47 tm_defines xm_file xm_defines \
49 | write_mk
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH.mk
52 ##### gnu/lib/libg2c #####
55 mkdir
-p $_OUTDIR/lib
/libg2c
3/arch
/$MACHINE_ARCH
57 write_c
$_OUTDIRBASE/lib
/libg2c
3/arch
/$MACHINE_ARCH/config.h
<$_TMPDIR/$_PLATFORM/libf2c
/libU77
/config.h
58 write_c
$_OUTDIRBASE/lib
/libg2c
3/arch
/$MACHINE_ARCH/g2c.h
<$_TMPDIR/$_PLATFORM/libf2c
/g2c.h
61 getvars
$_PLATFORM/libf2c
/Makefile \
63 getvars
$_PLATFORM/libf2c
/libF77
/Makefile \
65 getvars
$_PLATFORM/libf2c
/libI77
/Makefile \
66 ALL_CFLAGS OBJS |
sed 's,=,+=,'
67 getvars
$_PLATFORM/libf2c
/libU77
/Makefile \
68 ALL_CFLAGS OBJS |
sed 's,=,+=,'
69 } | write_mk
$_OUTDIRBASE/lib
/libg2c
3/arch
/$MACHINE_ARCH/defs.mk
72 ##### gnu/lib/libgcc #####
74 get_libgcc_list_funcs_asm
() {
76 getvars gcc
/Makefile LIB1ASMFUNCS |
{
77 # print newline separated list
85 getvars gcc
/Makefile LIB2FUNCS_EXTRA |
{
86 # print newline separated list
94 /\.S$/ { s,^.*/,,; s,\.S$,,; p; }
95 /\.asm$/ { s,^.*/,,; s,\.asm$,,; p; }
110 get_libgcc_list_funcs_lib
() {
112 local _lib_prefix
=${_lib%.*}
113 local _lib_suffix
=${_lib#*.}
114 local _abi
=${2:-'\.'}
116 cat build
/gcc
/libgcc.mk | \
117 grep '/'${_abi}'/' | \
119 /^'${_abi}'\/'${_lib_prefix}'\.'${_lib_suffix}': .*\.o$/ {
127 get_libgcc_list_objs_libs
() {
128 local _abi
=${1:-'\.'}
130 cat build
/gcc
/libgcc.mk | \
131 grep '/'${_abi}'/' | \
132 egrep '^'${_abi}'\/(libgcc_s\.so|libgcc\.a|libgcc_eh\.a|libgcov\.a): (libgcc_s|libgcc|libgcc_eh|libgcov)\/.*\.o$' | \
136 s,^\(.*\) \(.*\)$,\2 \1,
140 get_libgcc_list_objs_srcs
() {
141 local _abi
=${1:-'\.'} # XXX not used
143 if [ -e $_TOP/${libgcc_db_funcs}.S
]; then
144 cut
-f1 $_TOP/${libgcc_db_objs_libs} |
sed -e 's,\.o$,,' | \
145 comm -23 /dev
/stdin
$_TOP/${libgcc_db_funcs}.S | \
146 sed -e 's,\(.*\),\1.o \1.c,'
148 cut
-f1 $_TOP/${libgcc_db_objs_libs} |
sed -e 's,\.o$,,' | \
149 comm -12 /dev
/stdin
$_TOP/${libgcc_db_funcs}.S | \
150 sed -e 's,\(.*\),\1.o \1.S,'
152 cut
-f1 $_TOP/${libgcc_db_objs_libs} |
sed -e 's,\.o$,,' | \
153 sed -e 's,\(.*\),\1.o \1.c,'
157 get_libgcc_list_objs_tmplsrcs
() {
158 local _abi
=${1:-'\.'}
160 grep 'GCC_FOR_TARGET.*\.o$' build
/gcc
/libgcc.mk | \
161 grep '/'${_abi}'/' | \
163 s,^.* -c \([^ ]*\).* -o .*/\([^ ]*\.o\)$,\2 \1,
171 get_libgcc_list_objs_xflags
() {
173 local _abi
=${2:-'\.'}
175 grep 'GCC_FOR_TARGET.*\.o$' build
/gcc
/libgcc.mk | \
176 grep '/'${_abi}'/' | \
181 s/^\(.*\) \(-['${_flags}'][^ ][^ ]*\) \(.*\) \(-o .*\)\/\(.*\.o\)$/\5 \2/p
183 s/^\(.*\) \(-['${_flags}'][^ ][^ ]*\) \(.*\) \(-o .*\)\/\(.*\.o\)$/\1 \3 \4\/\5/
189 get_libgcc_list_objs_cppflags
() {
190 get_libgcc_list_objs_xflags D
$1
193 get_libgcc_list_objs_copts
() {
194 get_libgcc_list_objs_xflags fmx
$1
197 get_libgcc_list_tmplsrcs
() {
199 local _abi
=$2 # XXX not used
200 local _tmplallsrcs
=$
( mktemp
/tmp
/mknative-gcc._tmplallsrcs.XXXXXX
)
202 touch $_TOP/${libgcc_db_tmplsrcs}.tmplsrcs.
${_lib%.*}
203 touch $_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.
${_lib%.*}
204 touch $_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.
${_lib%.*}
207 local _lib_prefix
=${_lib%.*}
208 local _lib_suffix
=${_lib#*.}
209 join $_TOP/$libgcc_db_objs_libs $_TOP/$libgcc_db_objs_tmplsrcs | \
210 grep ${_lib_prefix}'\.'${_lib_suffix} | cut
-d' ' -f 3 |
sort -u > \
213 # TMPLFPSRCS = [fdp]p-bit.c
214 grep '[fdt]p-bit\.c' <$_tmplallsrcs |
sort -u | \
215 writefile
${libgcc_db_tmplsrcs}.tmplfpsrcs.
${_lib%.*}
217 # TMPLASMSRCS = $(LIB1ASMSRC)
218 grep '\$(LIB1ASMSRC)' <$_tmplallsrcs |
sort -u | \
219 writefile
${libgcc_db_tmplsrcs}.tmplasmsrcs.
${_lib%.*}
221 # TMPLSRCS is anything else; exclude TMPLFPSRCS and TMPLASMSRCS
222 cat $_tmplallsrcs | \
223 comm -23 /dev
/stdin
$_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.
${_lib%.*} | \
224 comm -23 /dev
/stdin
$_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.
${_lib%.*} | \
225 writefile
${libgcc_db_tmplsrcs}.tmplsrcs.
${_lib%.*}
230 get_libgcc_new_analyze
() {
233 mkdir
-p $_TOP/${_machine_arch_subdir}
235 touch $_TOP/${libgcc_db_funcs}.S
236 get_libgcc_list_funcs_asm | \
237 writefile
${libgcc_db_funcs}.S
239 for _lib
in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a
; do
240 touch $_TOP/${libgcc_db_funcs}.
${_lib%.*}
241 get_libgcc_list_funcs_lib
$_lib $_abi | \
242 writefile
${libgcc_db_funcs}.
${_lib%.*}
245 get_libgcc_list_objs_libs
$_abi | writefile
${libgcc_db_objs_libs}
246 get_libgcc_list_objs_srcs
$_abi | writefile
${libgcc_db_objs_srcs}
247 get_libgcc_list_objs_tmplsrcs
$_abi | writefile
${libgcc_db_objs_tmplsrcs}
248 get_libgcc_list_objs_cppflags
$_abi | writefile
${libgcc_db_objs_cppflags}
249 get_libgcc_list_objs_copts
$_abi | writefile
${libgcc_db_objs_copts}
251 for _lib
in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a
; do
252 get_libgcc_list_tmplsrcs
$_lib $_abi
258 get_libgcc_gen_tmplsrcs_tmplsrcs
() {
262 printf 'TMPLSRCS.%s = \\\n' $_lib
263 sed -e 's,^, ,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplsrcs.
${_lib%.*}
266 get_libgcc_gen_tmplsrcs_tmplfpsrcs
() {
270 printf 'TMPLFPSRCS.%s = \\\n' $_lib
271 sed -e 's,^, ,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplfpsrcs.
${_lib%.*}
274 get_libgcc_gen_tmplsrcs_tmplasmsrcs
() {
278 printf 'TMPLASMSRCS.%s = \\\n' $_lib
279 sed -e 's,^, ,; s,$, \\,' $_TOP/${libgcc_db_tmplsrcs}.tmplasmsrcs.
${_lib%.*} | \
280 sed -e 's,LIB1ASMSRC,G_&,'
283 get_libgcc_gen_srcs
() {
287 printf 'SRCS.%s = \\\n' $_lib
288 if [ -e $_TOP/${libgcc_db_funcs}.S
]; then
289 comm -23 $_TOP/${libgcc_db_funcs}.${_lib%.*} $_TOP/${libgcc_db_funcs}.S | \
290 sed -e 's,$,.c,; s,^,tmp_,'
291 comm -12 $_TOP/${libgcc_db_funcs}.${_lib%.*} $_TOP/${libgcc_db_funcs}.S | \
292 sed -e 's,$,.S,; s,^,tmp_,'
294 cat $_TOP/${libgcc_db_funcs}.
${_lib%.*} | \
295 sed -e 's,$,.c,; s,^,tmp_,'
297 sed -e 's,^, ,; s,$, \\,'
301 local _obj
=$1; local _key
=$2
303 eval grep \^
$_obj\\\ \
$_TOP/\
${libgcc_db_objs_${_key}} | cut
-f2
306 get_libgcc_gen_srcs_tmplsrcs
() {
307 cut
-f1 $_TOP/${libgcc_db_objs_libs} | \
309 printf 'SRCS.tmp_%s=%s\n' \
310 "$( _lookup_objs $_obj srcs )" \
311 "$( _lookup_objs $_obj tmplsrcs )"
313 sed -e 's,\$(\(.*\)),${G_\1},'
316 get_libgcc_gen_srcs_cppflags
() {
317 cut
-f1 $_TOP/${libgcc_db_objs_libs} | \
319 printf '_CPPFLAGS.tmp_%s=%s\n' \
320 "$( _lookup_objs $_obj srcs )" \
321 "$( _lookup_objs $_obj cppflags | xargs )"
325 get_libgcc_gen_srcs_copts
() {
326 cut
-f1 $_TOP/${libgcc_db_objs_libs} | \
328 printf 'COPTS.tmp_%s=%s\n' \
329 "$( _lookup_objs $_obj srcs )" \
330 "$( _lookup_objs $_obj copts | xargs )"
334 get_libgcc_new_generate
() {
337 for _lib
in libgcc_s.so libgcc.a libgcc_eh.a libgcov.a
; do
338 for _tmpl
in tmplsrcs tmplfpsrcs tmplasmsrcs
; do
339 eval get_libgcc_gen_tmplsrcs_
${_tmpl} $_lib | \
340 write_mk
${libgcc_libs_mk}.${_lib%.*}.tmplsrcs.${_tmpl}.mk
343 get_libgcc_gen_srcs
$_lib | \
344 write_mk
${libgcc_libs_mk}.
${_lib%.*}.srcs.mk
347 for _arg
in tmplsrcs cppflags copts
; do
348 eval get_libgcc_gen_srcs_
${_arg} | \
349 eval writefile \
$libgcc_srcs_mk_${_arg}
359 # List of generated files.
361 _machine_arch_subdir
=$_OUTDIRBASE/lib
/lib
$_subdir/arch
${_archsubdir}/$MACHINE_ARCH/$_abi
363 libgcc_db_funcs
=${_machine_arch_subdir}/funcs
364 libgcc_db_tmplsrcs
=${_machine_arch_subdir}/tmplsrcs
365 libgcc_db_objs_libs
=${_machine_arch_subdir}/objs.libs
366 libgcc_db_objs_srcs
=${_machine_arch_subdir}/objs.srcs
367 libgcc_db_objs_tmplsrcs
=${_machine_arch_subdir}/objs.tmplsrcs
368 libgcc_db_objs_cppflags
=${_machine_arch_subdir}/objs.cppflags
369 libgcc_db_objs_copts
=${_machine_arch_subdir}/objs.copts
371 get_libgcc_new_analyze
$_abi
373 libgcc_libs_mk
=${_machine_arch_subdir}/libs
374 libgcc_srcs_mk
=${_machine_arch_subdir}/srcs.mk
375 libgcc_srcs_mk_tmplsrcs
=${_machine_arch_subdir}/srcs.tmplsrcs.mk
376 libgcc_srcs_mk_cppflags
=${_machine_arch_subdir}/srcs.cppflags.mk
377 libgcc_srcs_mk_copts
=${_machine_arch_subdir}/srcs.copts.mk
379 get_libgcc_new_generate
$_abi
384 mkdir
-p $_OUTDIR/lib
/lib
$_subdir/arch
388 _extravars
="COLLECT2 UNWIND_H xm_include_list"
393 # DPBIT, FPBIT only used on mn10[23]00, we don't need them.
394 # XXX we should probably grab everything Just In Case for
397 getvars gcc
/Makefile \
398 INCLUDES LIB2ADD LIB2ADDEH LIB2ADD_ST \
399 LIB1ASMFUNCS LIB1ASMSRC \
400 LIB2_DIVMOD_FUNCS LIB2FUNCS_ST \
403 SHLIB_MKMAP SHLIB_MKMAP_OPTS \
404 SHLIB_MAPFILES SHLIB_NM_FLAGS \
405 EXTRA_HEADERS xm_defines \
406 tm_defines
${_extravars}
407 } | sanitise_includes \
408 | write_mk
$_OUTDIRBASE/lib
/lib
$_subdir/arch
${_archsubdir}/$MACHINE_ARCH.mk
410 # Generate new style files.
411 if [ -n "${MKNATIVE_LIBGCC_NEW}" ]; then
412 get_libgcc_new
$_subdir $_ABI
416 ##### gnu/lib/libgcov #####
421 mkdir
-p $_OUTDIR/lib
/lib
$_subdir/libgcov
/arch
/$MACHINE_ARCH
424 getvars gcc
/Makefile \
426 } | write_mk
$_OUTDIRBASE/lib
/lib
$_subdir/libgcov
/arch
/$MACHINE_ARCH/defs.mk
428 write_c
$_OUTDIRBASE/lib
/lib
$_subdir/libgcov
/arch
/$MACHINE_ARCH/gcov-iov.h \
429 <$_TMPDIR/gcc
/gcov-iov.h
433 ##### gnu/usr.bin/gcc[34]/libiberty #####
435 get_gcc_libiberty
() {
439 _libibertydir
="usr.bin/$_subdir/libiberty"
442 _libibertydir
="lib/libiberty"
445 mkdir
-p $_OUTDIR/$_libibertydir/arch
/$MACHINE_ARCH
447 getvars libiberty
/Makefile \
448 ALLOCA EXTRA_OFILES LIBOBJS REQUIRED_OFILES \
449 | write_mk
$_OUTDIRBASE/$_libibertydir/defs.mk
451 write_c
$_OUTDIRBASE/$_libibertydir/arch
/$MACHINE_ARCH/config.h \
452 <$_TMPDIR/libiberty
/config.h
455 ##### lib/libdecnumber #####
457 get_libdecnumber
() {
460 mkdir
-p $_OUTDIR/usr.bin
/$_subdir/arch
/$MACHINE_ARCH
461 write_c
$_OUTDIRBASE/usr.bin
/$_subdir/arch
/$MACHINE_ARCH/config.h \
462 <$_TMPDIR/libdecnumber
/config.h
465 ##### lib/libgomp #####
470 mkdir
-p $_OUTDIR/lib
/$_subdir/arch
/$MACHINE_ARCH
471 write_c
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH/config.h \
472 <$_TMPDIR/$_PLATFORM/libgomp
/config.h
473 write_c
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH/libgomp_f.h \
474 <$_TMPDIR/$_PLATFORM/libgomp
/libgomp_f.h
475 write_mk
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH/libgomp.spec \
476 <$_TMPDIR/$_PLATFORM/libgomp
/libgomp.spec
477 write_c
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH/omp.h \
478 <$_TMPDIR/$_PLATFORM/libgomp
/omp.h
481 ##### gnu/lib/libobjc #####
484 _subdir
="$1/arch/$MACHINE_ARCH"
485 _options
="ALL_OPT_FILES"
488 mkdir
-p $_OUTDIR/lib
/$_subdir
491 if [ -n "$_options" ]; then
492 getvars gcc
/Makefile
$_options
494 getvars
$_PLATFORM/libobjc
/Makefile \
495 ALL_CFLAGS INCLUDES OBJS OBJC_H \
496 |
sed "s,$_GNU_DIST,\${GNUHOSTDIST},g"
497 if [ -n "$_unwind" ]; then
498 getvars gcc
/Makefile
$_unwind
500 } | write_mk
$_OUTDIRBASE/lib
/$_subdir/defs.mk
502 write_c
$_OUTDIRBASE/lib
/$_subdir/config.h \
503 <$_TMPDIR/$_PLATFORM/libobjc
/config.h
506 ##### gnu/lib/libstdc++-v3 #####
508 get_libstdcxx_v3
() {
510 mkdir
-p $_OUTDIR/lib
/$_subdir/arch
/$MACHINE_ARCH
514 _src_CC_files
="atomicity_file CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_CC CLOCALE_CC BASIC_FILE_CC"
515 _headers1
="host_headers debug_headers tr1_headers c_compatibility_headers_extra tr1_impl_headers parallel_headers decimal_headers"
516 _headers2
="thread_host_headers host_headers_extra"
517 _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"
523 for h
in $_build_headers; do
524 write_c
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH/$h \
525 <$_TMPDIR/$_PLATFORM/libstdc
++-v3/include
/$_PLATFORM/bits
/$h
528 write_c
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH/config.h \
529 <$_TMPDIR/$_PLATFORM/libstdc
++-v3/config.h
530 write_c
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH/gstdint.h \
531 <$_TMPDIR/$_PLATFORM/libstdc
++-v3/include
/gstdint.h
535 getvars
$_PLATFORM/libstdc
++-v3/libsupc
++/Makefile \
536 sources |
sed 's/^G_sources=/G_LIBSUPCXX_SOURCES=/'
537 getvars
$_PLATFORM/libstdc
++-v3/libsupc
++/Makefile \
538 c_sources |
sed 's/^G_c_sources=/G_LIBSUPCXX_C_SOURCES=/'
541 getvars
$_PLATFORM/libstdc
++-v3/src
/Makefile \
542 sources
$_src_CC_files SECTION_FLAGS |
sed 's/^G_sources=/G_SRC_SOURCES=/'
545 getvars
$_PLATFORM/libstdc
++-v3/include
/Makefile \
546 c_base_headers std_headers |
sed -e 's#/[^ ][^ ]*/##g' -e 's/\${GNUHOSTDIST}//g'
547 getvars
$_PLATFORM/libstdc
++-v3/include
/Makefile \
548 bits_headers backward_headers ext_headers c_base_headers_extra \
549 $_headers1 |
sed -e 's#/[^ ][^ ]*/##g' -e 's/\${GNUHOSTDIST}//g'
550 getvars
$_PLATFORM/libstdc
++-v3/include
/Makefile \
551 $_headers2 |
sed -e 's#\./[^ ][^ ]*/##g' -e 's/\${GNUHOSTDIST}//g'
553 if [ -n "$_unwind" ]; then
554 getvars gcc
/Makefile
$_unwind
556 } | write_mk
$_OUTDIRBASE/lib
/$_subdir/arch
/$MACHINE_ARCH/defs.mk
559 ##### gnu/usr.bin/gcc* #####
561 get_gcc_bootstrap
() {
563 mkdir
-p $_OUTDIR/usr.bin
/$_subdir/arch
/$MACHINE_ARCH
564 for f
in auto-host tm config gthr-default
; do
565 write_c
$_OUTDIRBASE/usr.bin
/$_subdir/arch
/$MACHINE_ARCH/$f.h
<$_TMPDIR/gcc
/$f.h
571 mkdir
-p $_OUTDIR/usr.bin
/$_subdir/arch
/$MACHINE_ARCH
572 mkdir
-p $_OUTDIR/usr.bin
/libcpp
/arch
/$MACHINE_ARCH
577 _extravars
="TM_H ALL_OPT_FILES"
579 _extravars2
="tm_file_list build_xm_include_list"
580 _extravars3
="tm_p_include_list"
586 _extravars
="TM_H ALL_OPT_FILES"
588 _extravars2
="tm_file_list build_xm_include_list"
589 _extravars3
="tm_p_include_list"
594 getvars gcc
/Makefile \
595 ${_buildname}EARLY_SUPPORT ${_buildname}ERRORS ${_buildname}PRINT \
596 ${_buildname}RTL ${_buildname}SUPPORT ${_buildname}VARRAY | \
597 sed -e 's#build/errors.o#build-errors.o#g' \
598 -e 's#build/print-rtl.o#build-print-rtl.o#g' \
599 -e 's#build/rtl.o#build-rtl.o#g' \
600 -e 's#build/varray.o#build-varray.o#g' \
601 -e 's#build/ggc-none.o#build-ggc-none.o#g' \
603 getvars gcc
/Makefile \
604 ALL_CFLAGS ALL_CPPFLAGS C_AND_OBJC_OBJS C_OBJS CCCP_OBJS \
605 GCOV_OBJS PROTO_OBJS
${_extravars1} \
606 INCLUDES md_file OBJC_OBJS OBJS out_file version \
607 BUILD_PREFIX RTL_H TREE_H
${_hconfig_h} BASIC_BLOCK_H GCC_H \
608 GTFILES_SRCDIR GTFILES_FILES_FILES GTFILES_FILES_LANGS \
609 GTFILES GTFILES_LANG_DIR_NAMES \
610 tm_defines host_xm_file host_xm_defines tm_p_file \
611 target_cpu_default
${_extravars} ${_extravars2} \
612 lang_specs_files
${_extravars3} \
614 getvars gcc
/Makefile \
615 LIB2ADDEHDEP |
sed 's/unwind.inc//'
616 getvars gcc
/Makefile \
617 CXX_OBJS CXX_C_OBJS |
sed 's/cp\///g'
618 getvars gcc
/Makefile \
619 F77_OBJS |
sed 's/f\///g'
622 getvars libcpp
/Makefile \
626 getvars gcc
/Makefile \
630 echo G_SHLIB_LINK
="$CC -shared"
631 echo G_SHLIB_MULTILIB
=.
634 } | write_mk
$_OUTDIRBASE/usr.bin
/$_subdir/arch
/$MACHINE_ARCH/defs.mk
638 write_c
$_OUTDIRBASE/usr.bin
/$_subdir/libcpp
/arch
/$MACHINE_ARCH/config.h
<$_TMPDIR/libcpp
/config.h
639 hfiles
='auto-host gencheck configargs gthr-default tm bconfig config multilib'
642 write_c
$_OUTDIRBASE/usr.bin
/libcpp
/arch
/$MACHINE_ARCH/config.h
<$_TMPDIR/libcpp
/config.h
643 hfiles
='auto-host configargs gthr-default tm bconfig config multilib bversion plugin-version'
647 write_c
$_OUTDIRBASE/usr.bin
/$_subdir/arch
/$MACHINE_ARCH/$f.h
<$_TMPDIR/gcc
/$f.h
648 if [ "${MACHINE_ARCH}" = "powerpc" -a "${f}" = "configargs" ]
650 ex
<<__EOF__ $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
651 /configuration_arguments/ s/$//
657 s/";$/ -with-float=soft";/
663 /configure_default_options/ s/{ NULL.*$//
677 for f
in all-tree.def
; do
678 cp $_TMPDIR/gcc
/$f $_OUTDIR/usr.bin
/$_subdir/arch
/$MACHINE_ARCH/$f
682 for f
in gtyp-input.list
; do
683 sed -e 's/^.*external\/gpl3\/gcc\/dist/SRCDIR/' < $_TMPDIR/gcc
/$f > $_OUTDIR/usr.bin
/$_subdir/arch
/$MACHINE_ARCH/$f
687 if [ "${MACHINE_ARCH}" = "sh3el" -o "${MACHINE_ARCH}" = "sh3eb" ]; then
688 write_c
$_OUTDIRBASE/usr.bin
/$_subdir/arch
/$MACHINE_ARCH/sysroot-suffix.h
<$_TMPDIR/gcc
/sysroot-suffix.h
695 # .mk and .h files for libgcc bootstrap (from host build)
699 get_crtstuff crtstuff4
704 _OUTDIR
="$_TOP/external/gpl3/gcc"
705 _OUTDIRBASE
="external/gpl3/gcc"
707 get_crtstuff crtstuff
709 get_gcc_bootstrap gcc
718 get_crtstuff crtstuff4
719 get_gcc_libiberty gcc4
721 get_libstdcxx_v3 libstdc
++-v3_4
726 _OUTDIR
="$_TOP/external/gpl3/gcc"
727 _OUTDIRBASE
="external/gpl3/gcc"
731 get_crtstuff crtstuff
732 get_gcc_libiberty gcc
734 get_libstdcxx_v3 libstdc
++-v3
735 get_libdecnumber libdecnumber
741 *) echo invalid arguments
; exit 1;;