5 ARCHES="armv5tel armv6l armv7l armv7hl armv7nhl mipsel"
10 # baselibs.conf - part 1
11 mv -f baselibs.conf baselibs.conf.old 2>&1 > /dev/null || true
12 echo -n "arch i586 targets " > baselibs.conf
15 for i in ${ARCHES} ; do
17 cat ./${SPECNAME} | sed -e "s#Name: .*#Name: cross-${i}-${NAME}#" > ./cross-${i}-${NAME}.spec
18 cat ./${SPECNAME} | sed -e "s#Name: .*#Name: cross-${i}-${NAME}-accel#" > ./cross-${i}-${NAME}-accel.spec
19 # baselibs.conf - part 2
20 test ! x"$i" = x"" && echo -n "${i}:${i} " >> baselibs.conf
23 # baselibs.conf - part 3
24 echo "" >> baselibs.conf
25 for i in ${ARCHES} ; do
26 echo "" >> baselibs.conf
27 echo "cross-${i}-${NAME}-accel
29 targettype 32bit block!" >> baselibs.conf
30 for j in ${ARCHES//${i}} ; do
31 echo " targettype $j block!" >> baselibs.conf
33 cat >> baselibs.conf << EOF
35 targettype ${i} autoreqprov off
36 targettype ${i} provides "cross-arm-binutils-accel"
37 targettype ${i} requires "cross-arm-gcc-accel"
38 targettype ${i} requires "glibc-x86-arm"
39 targettype ${i} requires "zlib-x86-arm"
40 targettype ${i} requires "binutils"
41 targettype ${i} prefix /emul/ia32-linux
42 targettype ${i} extension -arm
44 targettype ${i} -/usr/share/man
45 targettype ${i} -/usr/share/doc
46 targettype ${i} requires "tizen-accelerator"
48 targettype ${i} post "#set -x"
49 targettype ${i} post " export GCCVER=\$(LANG=C gcc --version | head -1 | cut -d" " -f5) "
50 targettype ${i} post " for bin in addr2line ar as c++filt gprov ld ld.bfd nm objcopy objdump ranlib readelf size strings strip ; do"
51 targettype ${i} post " binary="/usr/bin/\${bin}" "
52 targettype ${i} post " if test -L \${binary} -a -e \${binary}.orig-arm ; then"
53 targettype ${i} post " echo "\${binary} not installed or \${binary}.orig-arm already present !" "
54 targettype ${i} post " else "
55 targettype ${i} post " mv \${binary} \${binary}.orig-arm && ln -s <prefix>\${binary} \${binary}"
56 targettype ${i} post " ln -s \${binary} /usr/libexec/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/\${bin}"
57 targettype ${i} post " fi "
58 targettype ${i} post " done "
59 targettype ${i} post " ln -sf /usr/bin/ld /usr/libexec/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld"
60 targettype ${i} post " ln -sf /usr/bin/ld.bfd /usr/libexec/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld.bfd"
62 targettype ${i} preun " set -x"
63 targettype ${i} preun " export GCCVER=\$(LANG=C gcc --version | head -1 | cut -d" " -f5) "
64 targettype ${i} preun " for bin in addr2line ar as c++filt gprov ld ld.bfd nm objcopy objdump ranlib readelf size strings strip ; do"
65 targettype ${i} preun " binary="/usr/bin/\${bin}" "
66 targettype ${i} preun " if test -e \${binary}.orig-arm ; then"
67 targettype ${i} preun " rm \${binary} && mv \${binary}.orig-arm \${binary}"
68 targettype ${i} preun " rm /usr/libexec/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/\${bin}"
69 targettype ${i} preun " else "
70 targettype ${i} preun " echo "\${binary}.orig-arm not present !" "
71 targettype ${i} preun " fi "
72 targettype ${i} preun " done "
73 targettype ${i} preun " rm -f /usr/libexec/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld"
74 targettype ${i} preun " rm -f /usr/libexec/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld.bfd"