gcc-force-options: Create symlink gcc-real to allow acceleration of gcc with forced... 12/72512/1
authorYury Usishchev <y.usishchev@samsung.com>
Tue, 22 Mar 2016 08:05:41 +0000 (11:05 +0300)
committerMaxim Ostapenko <m.ostapenko@samsung.com>
Wed, 1 Jun 2016 09:31:06 +0000 (12:31 +0300)
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>
packaging/gcc-force-options
packaging/gcc-unforce-options

index 3f48ec7..34f4945 100755 (executable)
@@ -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
 
index 7f57c05..cf36d04 100755 (executable)
@@ -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