summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury Usishchev <y.usishchev@samsung.com>2016-03-22 11:05:41 +0300
committerMaxim Ostapenko <m.ostapenko@samsung.com>2016-06-01 12:31:06 +0300
commitdb6ced57e0aa5cffc69e027b28f5b921635fdb19 (patch)
treec4284445851e36159251492c308b0e3f385f0119
parenta422e6d1349b8267cf0d3a4890f9fbe9193d4527 (diff)
downloadlinaro-gcc-db6ced57e0aa5cffc69e027b28f5b921635fdb19.tar.gz
linaro-gcc-db6ced57e0aa5cffc69e027b28f5b921635fdb19.tar.bz2
linaro-gcc-db6ced57e0aa5cffc69e027b28f5b921635fdb19.zip
gcc-force-options: Create symlink gcc-real to allow acceleration of gcc with forced options.
gcc-force-options script moves gcc binary from /usr/bin/gcc to /usr/bin/gcc-real. To correctly accelerate new binary qemu-binfmt requires symlink in /emul dirrectory. Change-Id: Ie72fdc2775cbb2e1da00c2d8144a267bbfcfd9cf Signed-off-by: Yury Usishchev <y.usishchev@samsung.com>
-rwxr-xr-xpackaging/gcc-force-options6
-rwxr-xr-xpackaging/gcc-unforce-options5
2 files changed, 11 insertions, 0 deletions
diff --git a/packaging/gcc-force-options b/packaging/gcc-force-options
index 3f48ec76001..34f49455f2b 100755
--- a/packaging/gcc-force-options
+++ b/packaging/gcc-force-options
@@ -60,5 +60,11 @@ find -L $(dirname $0) -type f -a -perm -a=x | grep -E '(gcc|g\+\+|c\+\+)$' | whi
cp $TMP $tool
done
+if [ -d /emul ]; then
+ find -L /emul -type f -a -perm -a=x | grep -E '(gcc|g\+\+|c\+\+)$' | while read tool; do
+ ln -sf $(basename $tool) $tool-real
+ done
+fi
+
rm $TMP
diff --git a/packaging/gcc-unforce-options b/packaging/gcc-unforce-options
index 7f57c053d8e..cf36d042a07 100755
--- a/packaging/gcc-unforce-options
+++ b/packaging/gcc-unforce-options
@@ -11,4 +11,9 @@ find $(dirname $0) -name \*-real | while read tool_real; do
tool=$(echo "$tool_real" | sed -e 's/-real$//')
mv $tool_real $tool
done
+if [ -d /emul ]; then
+ find /emul -name \*-real | while read tool_real; do
+ rm $tool_real
+ done
+fi