diff options
author | Christopher Faylor <me@cgf.cx> | 2008-10-12 03:20:37 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2008-10-12 03:20:37 +0000 |
commit | 12c819e204763ddb79c40dddc8361c237a9c6007 (patch) | |
tree | 8137cb1c6d4a3a5a5354e6c7d5fffb32e9c43496 /winsup | |
parent | 9401a0f805692549fb9b647f99a787e050f2cdc2 (diff) | |
download | cygnal-12c819e204763ddb79c40dddc8361c237a9c6007.tar.gz cygnal-12c819e204763ddb79c40dddc8361c237a9c6007.tar.bz2 cygnal-12c819e204763ddb79c40dddc8361c237a9c6007.zip |
* mingw: Use a better method to find where mingw directory lives.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 4 | ||||
-rwxr-xr-x | winsup/utils/mingw | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 374cc8efc..bd31c3f7c 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,5 +1,9 @@ 2008-10-11 Christopher Faylor <me+cygwin@cgf.cx> + * mingw: Use a better method to find where mingw directory lives. + +2008-10-11 Christopher Faylor <me+cygwin@cgf.cx> + * mingw: New front-end script to control building of MinGW files without using the deprecated -mno-cygwin option. * Makefile.in: Use mingw front-end. diff --git a/winsup/utils/mingw b/winsup/utils/mingw index 7d49bf326..720a25e2c 100755 --- a/winsup/utils/mingw +++ b/winsup/utils/mingw @@ -6,18 +6,12 @@ # Find the path to the compiler. # compiler=$1; shift -case "$compiler" in - */*) ;; - *) compiler=($(type "$compiler")) - compiler=${compiler[2]} ;; -esac +dir=$(cd $(dirname $("$compiler" -print-prog-name=ld))/../..; pwd) # # The mingw32 directory should live somewhere close by to the # compiler. Search for it. # -updir=$(dirname "$compiler") -dir=$(cd "$updir"/..; pwd) [ "$dir" = '/' ] && dir='' mingw_dir='' for d in "$dir"/*-mingw32 "$dir"/usr/*-mingw32 "$dir"/*-mingw* "$dir"/usr/*-mingw*; do |