6 do_optional_compiler_languages=0
7 rm -f libgcj*.spec libgcj*.changes libffi*.spec libffi*.changes gcc*.spec cross*.spec cross*.changes
9 # Default is to generate the normal gcc package
10 # unless a parameter is given. In case that it is '-*',
11 # that parameter will be used as suffix for the package name
12 # and as suffix for the install path (/opt/gccSUFFIX)
13 # In case that it is '[0-9]*', that parameter will be used
14 # as a suffix for a versioned package name.
31 if test "$do_optional_compiler_languages" = "1"; then
32 echo '%define run_tests 1' >> $outfile
33 echo '%define build_optional_compiler_languages 1' >> $outfile
35 sed -e 's%@base_ver@%'$base_ver'%g' \
39 /^# PACKAGE-BEGIN/,/^# PACKAGE-END/H
40 /^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p
53 # disabled: mips, sparc, alpha
54 if test "$do_icecream" = 1 ; then
55 for arch in x86_64 armv7hl armv7l; do
56 exclarch=`echo $arch | sed -e 's/ppc$/ppc64/'`
57 { sed -n -e '1,/COMMON-BEGIN/p' cross-icecream.spec.in
58 sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile
59 sed -n -e '/COMMON-END/,$p' cross-icecream.spec.in; } |
60 sed -e "s#@cross_arch@#$arch#" \
61 -e "s#@base_ver@#$base_ver#" \
62 -e "s/^\(ExclusiveArch.*\) $exclarch /\1 /" \
63 > cross-$arch-gcc$base_ver-icecream-backend.spec
64 test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver-icecream-backend.changes
69 if test "$do_cross_shared" = 1 ; then
72 base_ver=$base_ver cross_arch=$arch sh cross.spec.in > cross-$arch-gcc$base_ver.spec
73 test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver.changes
76 if test "$do_cross_static" = 1 ; then
79 echo '%define build_static 1' > cross-$arch-gcc$base_ver-static.spec
80 base_ver=$base_ver cross_arch=$arch name_suffix="-static" sh cross.spec.in >> cross-$arch-gcc$base_ver-static.spec
81 test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-$arch-gcc$base_ver-static.changes
83 # # avr is static but wants the non-static versioned name
84 # echo '%define build_static 1' > cross-avr-gcc$base_ver.spec
85 # base_ver=$base_ver cross_arch=avr sh cross.spec.in >> cross-avr-gcc$base_ver.spec
86 # test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes cross-avr-gcc$base_ver.changes
90 sed -i -e '/^# .*-\(BEGIN\|END\)$/d' $f