Changeset cb7c685 in mainline


Ignore:
Timestamp:
2011-05-19T02:30:26Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
10a530cc
Parents:
53d9ee9
Message:

Improved syntax for file appending in shell scripts.
Minor improvements in comments.

Location:
uspace/app/binutils
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/binutils/intrusive.sh

    r53d9ee9 rcb7c685  
    3131#
    3232# This shell script is reserved for intrusive patches (hacks) to binutils
    33 # that are not possible to be done in a clean and isolated way or for
    34 # which doing so would require too much complexity.
     33# that cannot be done in a clean and isolated way or for which doing so
     34# would require too much complexity.
    3535#
    3636
     
    3838        "do")
    3939                # Binutils plugin support is dependent on libdl.so library.
    40                 # By default, the plugin support is switched of for all
     40                # By default, the plugin support is switched off for all
    4141                # configure scripts of binutils. The only exception is configure
    4242                # script of ld 2.21 (and possibly above), where plugin support
  • uspace/app/binutils/patch.awk

    r53d9ee9 rcb7c685  
    3232# This script is reserved for transformation of native
    3333# uspace/Makefile.common so it would be compatible with ported
    34 # application and its operation could be intercepted.
     34# application and its operations could be intercepted.
    3535#
    3636
  • uspace/app/binutils/toolchain.sh

    r53d9ee9 rcb7c685  
    5757case "$1" in
    5858        "gcc")
    59                 echo '#! /bin/bash' > 'gcc'
    60                 echo 'AS_LINK="`echo $* | grep '\'as-new\''`"' >> 'gcc'
    61                 echo 'LD_LINK="`echo $* | grep '\'ld-new\''`"' >> 'gcc'
    62                 echo 'LINK="`echo -n "$AS_LINK""$LD_LINK"`"' >> 'gcc'
    63                 echo 'if [ -n "$LINK" ]; then' >> 'gcc'
    64                 echo '  LD_ARGS="`echo $* | \' >> 'gcc'
    65                 echo '          sed '\'s/-O[^ ]*//g\'' | \' >> 'gcc'
    66                 echo '          sed '\'s/-W[^ ]*//g\'' | \' >> 'gcc'
    67                 echo '          sed '\'s/-g//g\'' | \' >> 'gcc'
    68                 echo '          sed '\'s/-l[^ ]*//g\'' | \' >> 'gcc'
    69                 echo '          sed '\'s/ [ ]*/ /g\''`"' >> 'gcc'
    70                 echo '  ld "$LD_ARGS"' >> 'gcc'
    71                 echo 'else' >> 'gcc'
     59                (
     60                echo '#! /bin/bash'
     61                echo 'AS_LINK="`echo $* | grep '\'as-new\''`"'
     62                echo 'LD_LINK="`echo $* | grep '\'ld-new\''`"'
     63                echo 'LINK="`echo -n "$AS_LINK""$LD_LINK"`"'
     64                echo 'if [ -n "$LINK" ]; then'
     65                echo '  LD_ARGS="`echo $* | \'
     66                echo '          sed '\'s/-O[^ ]*//g\'' | \'
     67                echo '          sed '\'s/-W[^ ]*//g\'' | \'
     68                echo '          sed '\'s/-g//g\'' | \'
     69                echo '          sed '\'s/-l[^ ]*//g\'' | \'
     70                echo '          sed '\'s/ [ ]*/ /g\''`"'
     71                echo '  ld "$LD_ARGS"'
     72                echo 'else'
    7273                CFLAGS="`echo "$3" | \
    7374                        sed 's/-O[^ ]*//g' | \
     
    7677                        sed 's/-g//g' | \
    7778                        sed 's/ [ ]*/ /g'`"
    78                 echo "  $2" "$CFLAGS" '$@' >> 'gcc'
    79                 echo 'fi' >> 'gcc'
     79                echo "  $2" "$CFLAGS" '$@'
     80                echo 'fi'
     81                ) > 'gcc'
    8082                chmod a+x 'gcc'
    8183                ;;
    8284        "as")
    83                 echo '#! /bin/bash' > 'as'
    84                 echo "$2" '$@' >> 'as'
     85                (
     86                echo '#! /bin/bash'
     87                echo "$2" '$@'
     88                ) > 'as'
    8589                chmod a+x 'as'
    8690                ;;
    8791        "ar")
    88                 echo '#! /bin/bash' > 'ar'
    89                 echo "$2" '$@' >> 'ar'
     92                (
     93                echo '#! /bin/bash'
     94                echo "$2" '$@'
     95                ) > 'ar'
    9096                chmod a+x 'ar'
    9197                ;;
    9298        "ranlib")
    93                 echo '#! /bin/bash' > 'ranlib'
    94                 echo "ar -s" '$@' >> 'ranlib'
     99                (
     100                echo '#! /bin/bash'
     101                echo "ar -s" '$@'
     102                ) > 'ranlib'
    95103                chmod a+x 'ranlib'
    96104                ;;
    97105        "ld")
    98                 echo '#! /bin/bash' > 'ld'
    99                 echo "$2 -n $3 -T $4" '$@' "$5" >> 'ld'
     106                (
     107                echo '#! /bin/bash'
     108                echo "$2 -n $3 -T $4" '$@' "$5"
     109                ) > 'ld'
    100110                chmod a+x 'ld'
    101111                ;;
    102112        "objdump")
    103                 echo '#! /bin/bash' > 'objdump'
    104                 echo "$2" '$@' >> 'objdump'
     113                (
     114                echo '#! /bin/bash'
     115                echo "$2" '$@'
     116                ) > 'objdump'
    105117                chmod a+x 'objdump'
    106118                ;;
    107119        "objcopy")
    108                 echo '#! /bin/bash' > 'objcopy'
    109                 echo "$2" '$@' >> 'objcopy'
     120                (
     121                echo '#! /bin/bash'
     122                echo "$2" '$@'
     123                ) > 'objcopy'
    110124                chmod a+x 'objcopy'
    111125                ;;
    112126        "strip")
    113                 echo '#! /bin/bash' > 'strip'
    114                 echo "$2" '$@' >> 'strip'
     127                (
     128                echo '#! /bin/bash'
     129                echo "$2" '$@'
     130                ) > 'strip'
    115131                chmod a+x 'strip'
    116132                ;;
Note: See TracChangeset for help on using the changeset viewer.