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-%{!?x64:x86}%{?x64}#" > ./cross-${i}-${NAME}-accel.spec
19 # baselibs.conf - part 2
20 test ! x"$i" = x"" && echo -n "${i}:${i} " >> baselibs.conf
23 echo "" >> baselibs.conf
24 cat baselibs.conf | sed -e "s/i586/x86_64/" >> baselibs.conf
26 # baselibs.conf - part 3
27 echo "" >> baselibs.conf
28 for i in ${ARCHES} ; do
29 echo "" >> baselibs.conf
30 echo "cross-${i}-${NAME}-accel-@X86@
32 targettype 32bit block!" >> baselibs.conf
33 for j in ${ARCHES//${i}} ; do
34 echo " targettype $j block!" >> baselibs.conf
36 cat >> baselibs.conf << EOF
38 targettype ${i} autoreqprov off
39 targettype ${i} provides "cross-arm-binutils-accel"
40 targettype ${i} provides "cross-${i}-binutils-accel-${i}"
41 targettype ${i} requires "cross-arm-gcc-accel"
42 targettype ${i} requires "eglibc-@X86@-arm"
43 targettype ${i} requires "zlib-@X86@-arm"
44 targettype ${i} requires "binutils"
45 targettype ${i} prefix /emul/ia32-linux
46 targettype ${i} extension -arm
48 targettype ${i} -/usr/share/man
49 targettype ${i} -/usr/share/doc
50 targettype ${i} requires "tizen-accelerator"
52 targettype ${i} post "#set -x"
53 targettype ${i} post " export GCCVER=\$(LANG=C gcc --version | head -1 | cut -d" " -f5) "
54 targettype ${i} post " for bin in addr2line ar as c++filt elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip ; do"
55 targettype ${i} post " binary="/usr/bin/\${bin}" "
56 targettype ${i} post " if test -L \${binary} -a -e \${binary}.orig-arm ; then"
57 targettype ${i} post " echo "\${binary} not installed or \${binary}.orig-arm already present !" "
58 targettype ${i} post " else "
59 targettype ${i} post " mv \${binary} \${binary}.orig-arm && ln -s <prefix>\${binary} \${binary}"
60 targettype ${i} post " ln -s \${binary} /usr/lib/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/\${bin}"
61 targettype ${i} post " fi "
62 targettype ${i} post " done "
63 targettype ${i} post " ln -sf /usr/bin/ld /usr/lib/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld"
64 targettype ${i} post " ln -sf /usr/bin/ld.bfd /usr/lib/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld.bfd"
65 targettype ${i} post " ln -sf /usr/bin/ld.gold /usr/lib/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld.gold"
67 targettype ${i} preun " set -x"
68 targettype ${i} preun " export GCCVER=\$(LANG=C gcc --version | head -1 | cut -d" " -f5) "
69 targettype ${i} preun " for bin in addr2line ar as c++filt elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip ; do"
70 targettype ${i} preun " binary="/usr/bin/\${bin}" "
71 targettype ${i} preun " if test -e \${binary}.orig-arm ; then"
72 targettype ${i} preun " rm \${binary} && mv \${binary}.orig-arm \${binary}"
73 targettype ${i} preun " rm /usr/lib/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/\${bin}"
74 targettype ${i} preun " else "
75 targettype ${i} preun " echo "\${binary}.orig-arm not present !" "
76 targettype ${i} preun " fi "
77 targettype ${i} preun " done "
78 targettype ${i} preun " rm -f /usr/lib/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld"
79 targettype ${i} preun " rm -f /usr/lib/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld.bfd"
80 targettype ${i} preun " rm -f /usr/lib/gcc/${i}-tizen-linux-gnueabi/\${GCCVER}/ld.gold"