| OLD | NEW | 
|    1 #! /bin/sh |    1 #! /bin/sh | 
|    2 # Wrapper for compilers which do not understand '-c -o'. |    2 # Wrapper for compilers which do not understand '-c -o'. | 
|    3  |    3  | 
|    4 scriptversion=2012-01-04.17; # UTC |    4 scriptversion=2012-03-05.13; # UTC | 
|    5  |    5  | 
|    6 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free |    6 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free | 
|    7 # Software Foundation, Inc. |    7 # Software Foundation, Inc. | 
|    8 # Written by Tom Tromey <tromey@cygnus.com>. |    8 # Written by Tom Tromey <tromey@cygnus.com>. | 
|    9 # |    9 # | 
|   10 # This program is free software; you can redistribute it and/or modify |   10 # This program is free software; you can redistribute it and/or modify | 
|   11 # it under the terms of the GNU General Public License as published by |   11 # it under the terms of the GNU General Public License as published by | 
|   12 # the Free Software Foundation; either version 2, or (at your option) |   12 # the Free Software Foundation; either version 2, or (at your option) | 
|   13 # any later version. |   13 # any later version. | 
|   14 # |   14 # | 
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   72           file=`cygpath -m "$file" || echo "$file"` |   72           file=`cygpath -m "$file" || echo "$file"` | 
|   73           ;; |   73           ;; | 
|   74         wine/*) |   74         wine/*) | 
|   75           file=`winepath -w "$file" || echo "$file"` |   75           file=`winepath -w "$file" || echo "$file"` | 
|   76           ;; |   76           ;; | 
|   77       esac |   77       esac | 
|   78       ;; |   78       ;; | 
|   79   esac |   79   esac | 
|   80 } |   80 } | 
|   81  |   81  | 
 |   82 # func_cl_dashL linkdir | 
 |   83 # Make cl look for libraries in LINKDIR | 
 |   84 func_cl_dashL () | 
 |   85 { | 
 |   86   func_file_conv "$1" | 
 |   87   if test -z "$lib_path"; then | 
 |   88     lib_path=$file | 
 |   89   else | 
 |   90     lib_path="$lib_path;$file" | 
 |   91   fi | 
 |   92   linker_opts="$linker_opts -LIBPATH:$file" | 
 |   93 } | 
 |   94  | 
 |   95 # func_cl_dashl library | 
 |   96 # Do a library search-path lookup for cl | 
 |   97 func_cl_dashl () | 
 |   98 { | 
 |   99   lib=$1 | 
 |  100   found=no | 
 |  101   save_IFS=$IFS | 
 |  102   IFS=';' | 
 |  103   for dir in $lib_path $LIB | 
 |  104   do | 
 |  105     IFS=$save_IFS | 
 |  106     if $shared && test -f "$dir/$lib.dll.lib"; then | 
 |  107       found=yes | 
 |  108       lib=$dir/$lib.dll.lib | 
 |  109       break | 
 |  110     fi | 
 |  111     if test -f "$dir/$lib.lib"; then | 
 |  112       found=yes | 
 |  113       lib=$dir/$lib.lib | 
 |  114       break | 
 |  115     fi | 
 |  116   done | 
 |  117   IFS=$save_IFS | 
 |  118  | 
 |  119   if test "$found" != yes; then | 
 |  120     lib=$lib.lib | 
 |  121   fi | 
 |  122 } | 
 |  123  | 
|   82 # func_cl_wrapper cl arg... |  124 # func_cl_wrapper cl arg... | 
|   83 # Adjust compile command to suit cl |  125 # Adjust compile command to suit cl | 
|   84 func_cl_wrapper () |  126 func_cl_wrapper () | 
|   85 { |  127 { | 
|   86   # Assume a capable shell |  128   # Assume a capable shell | 
|   87   lib_path= |  129   lib_path= | 
|   88   shared=: |  130   shared=: | 
|   89   linker_opts= |  131   linker_opts= | 
|   90   for arg |  132   for arg | 
|   91   do |  133   do | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|  102               set x "$@" -Fo"$file" |  144               set x "$@" -Fo"$file" | 
|  103               shift |  145               shift | 
|  104               ;; |  146               ;; | 
|  105             *) |  147             *) | 
|  106               func_file_conv "$2" |  148               func_file_conv "$2" | 
|  107               set x "$@" -Fe"$file" |  149               set x "$@" -Fe"$file" | 
|  108               shift |  150               shift | 
|  109               ;; |  151               ;; | 
|  110           esac |  152           esac | 
|  111           ;; |  153           ;; | 
 |  154         -I) | 
 |  155           eat=1 | 
 |  156           func_file_conv "$2" mingw | 
 |  157           set x "$@" -I"$file" | 
 |  158           shift | 
 |  159           ;; | 
|  112         -I*) |  160         -I*) | 
|  113           func_file_conv "${1#-I}" mingw |  161           func_file_conv "${1#-I}" mingw | 
|  114           set x "$@" -I"$file" |  162           set x "$@" -I"$file" | 
|  115           shift |  163           shift | 
|  116           ;; |  164           ;; | 
|  117 »       -l*) |  165 »       -l) | 
|  118 »         lib=${1#-l} |  166 »         eat=1 | 
|  119 »         found=no |  167 »         func_cl_dashl "$2" | 
|  120 »         save_IFS=$IFS |  168 »         set x "$@" "$lib" | 
|  121 »         IFS=';' |  | 
|  122 »         for dir in $lib_path $LIB |  | 
|  123 »         do |  | 
|  124 »           IFS=$save_IFS |  | 
|  125 »           if $shared && test -f "$dir/$lib.dll.lib"; then |  | 
|  126 »             found=yes |  | 
|  127 »             set x "$@" "$dir/$lib.dll.lib" |  | 
|  128 »             break |  | 
|  129 »           fi |  | 
|  130 »           if test -f "$dir/$lib.lib"; then |  | 
|  131 »             found=yes |  | 
|  132 »             set x "$@" "$dir/$lib.lib" |  | 
|  133 »             break |  | 
|  134 »           fi |  | 
|  135 »         done |  | 
|  136 »         IFS=$save_IFS |  | 
|  137  |  | 
|  138 »         test "$found" != yes && set x "$@" "$lib.lib" |  | 
|  139           shift |  169           shift | 
|  140           ;; |  170           ;; | 
 |  171         -l*) | 
 |  172           func_cl_dashl "${1#-l}" | 
 |  173           set x "$@" "$lib" | 
 |  174           shift | 
 |  175           ;; | 
 |  176         -L) | 
 |  177           eat=1 | 
 |  178           func_cl_dashL "$2" | 
 |  179           ;; | 
|  141         -L*) |  180         -L*) | 
|  142 »         func_file_conv "${1#-L}" |  181 »         func_cl_dashL "${1#-L}" | 
|  143 »         if test -z "$lib_path"; then |  | 
|  144 »           lib_path=$file |  | 
|  145 »         else |  | 
|  146 »           lib_path="$lib_path;$file" |  | 
|  147 »         fi |  | 
|  148 »         linker_opts="$linker_opts -LIBPATH:$file" |  | 
|  149           ;; |  182           ;; | 
|  150         -static) |  183         -static) | 
|  151           shared=false |  184           shared=false | 
|  152           ;; |  185           ;; | 
|  153         -Wl,*) |  186         -Wl,*) | 
|  154           arg=${1#-Wl,} |  187           arg=${1#-Wl,} | 
|  155           save_ifs="$IFS"; IFS=',' |  188           save_ifs="$IFS"; IFS=',' | 
|  156           for flag in $arg; do |  189           for flag in $arg; do | 
|  157             IFS="$save_ifs" |  190             IFS="$save_ifs" | 
|  158             linker_opts="$linker_opts $flag" |  191             linker_opts="$linker_opts $flag" | 
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  301  |  334  | 
|  302 # Local Variables: |  335 # Local Variables: | 
|  303 # mode: shell-script |  336 # mode: shell-script | 
|  304 # sh-indentation: 2 |  337 # sh-indentation: 2 | 
|  305 # eval: (add-hook 'write-file-hooks 'time-stamp) |  338 # eval: (add-hook 'write-file-hooks 'time-stamp) | 
|  306 # time-stamp-start: "scriptversion=" |  339 # time-stamp-start: "scriptversion=" | 
|  307 # time-stamp-format: "%:y-%02m-%02d.%02H" |  340 # time-stamp-format: "%:y-%02m-%02d.%02H" | 
|  308 # time-stamp-time-zone: "UTC" |  341 # time-stamp-time-zone: "UTC" | 
|  309 # time-stamp-end: "; # UTC" |  342 # time-stamp-end: "; # UTC" | 
|  310 # End: |  343 # End: | 
| OLD | NEW |