Changeset 3e22494f in mainline


Ignore:
Timestamp:
2011-06-24T02:15:07Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d4988e
Parents:
41e2118
Message:

Added runtime flag filtration into gcc wrapper.

File:
1 edited

Legend:

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

    r41e2118 r3e22494f  
    6060                (
    6161                echo '#! /bin/bash'
    62                 echo 'AS_LINK="`echo $* | grep '\'as-new\''`"'
    63                 echo 'LD_LINK="`echo $* | grep '\'ld-new\''`"'
     62                echo 'AS_LINK="`echo \"$*\" | grep '\'as-new\''`"'
     63                echo 'LD_LINK="`echo \"$*\" | grep '\'ld-new\''`"'
    6464                echo 'LINK="`echo -n "$AS_LINK""$LD_LINK"`"'
    6565                echo 'if [ -n "$LINK" ]; then'
    66                 echo '  LD_ARGS="`echo $* | \'
     66                echo '  LD_ARGS="`echo \"$*\" | \'
    6767                echo '          sed '\'s/-O[^ ]*//g\'' | \'
    6868                echo '          sed '\'s/-W[^ ]*//g\'' | \'
     
    7070                echo '          sed '\'s/-l[^ ]*//g\'' | \'
    7171                echo '          sed '\'s/ [ ]*/ /g\''`"'
    72                 echo '  ld "$LD_ARGS"'
     72                echo '  ld $LD_ARGS'
    7373                echo 'else'
    7474                CFLAGS="`echo "$3" | \
     
    7878                        sed 's/-g//g' | \
    7979                        sed 's/ [ ]*/ /g'`"
    80                 echo '  CONFTEST="`echo $* | grep '\' conftest \''`"'
     80                echo '  CONFTEST="`echo \"$*\" | grep '\' conftest \''`"'
    8181                echo '  if [ -n "$CONFTEST" ]; then'
    8282                echo '          LFLAGS="-Xlinker -z -Xlinker muldefs"'
     
    8484                echo "          $2" '$@' "$CFLAGS -T $4" '$LFLAGS' "$5"
    8585                echo '  else'
    86                 echo '          echo' \'"$2"\' '"$@"' \'"$CFLAGS"\'
    87                 echo "          $2" '$@' "$CFLAGS"
     86                                        # Remove flags:
     87                                        # -Wc++-compat
     88                                        #               Required just for gold linker.
     89                echo '          GCC_ARGS="`echo \"$*\" | \'
     90                echo '                  sed '\'s/-Wc++-compat//g\'' | \'
     91                echo '                  sed '\'s/ [ ]*/ /g\''`"'
     92                                        # Add flags:
     93                                        # -Wno-type-limits
     94                                        #               HelenOS pid_t is unsigned
     95                                        #               while on most systems it is signed.
     96                echo '          GCC_ARGS="$GCC_ARGS -Wno-type-limits"'
     97                echo '          echo' \'"$2"\' '"$GCC_ARGS"' \'"$CFLAGS"\'
     98                echo "          $2" '$GCC_ARGS' "$CFLAGS"
    8899                echo '  fi'
    89100                echo 'fi'
Note: See TracChangeset for help on using the changeset viewer.