Skip to content

Commit

Permalink
configure: Recognize i686 build on msys2
Browse files Browse the repository at this point in the history
  • Loading branch information
klutzy committed Aug 22, 2014
1 parent 19a44c7 commit a3d77e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -71,7 +71,7 @@ To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/ms
3. With that now start `mingw32_shell.bat` from where you installed MSYS2 (i.e. `C:\msys`).
4. From there just navigate to where you have Rust's source code, configure and build it:

$ ./configure --build=i686-pc-mingw32
$ ./configure
$ make && make install

[repo]: https://github.com/rust-lang/rust
Expand Down
18 changes: 12 additions & 6 deletions configure
Expand Up @@ -299,13 +299,19 @@ case $CFG_OSTYPE in
CFG_OSTYPE=apple-darwin
;;

MINGW32*)
MINGW*)
# msys' `uname` does not print gcc configuration, but prints msys
# configuration. so we cannot believe `uname -m`:
# msys1 is always i686 and msys2 is always x86_64.
# instead, msys defines $MSYSTEM which is MINGW32 on i686 and
# MINGW64 on x86_64.
CFG_CPUTYPE=i686
CFG_OSTYPE=pc-mingw32
;;

MINGW64*)
# msys2, MSYSTEM=MINGW64
CFG_OSTYPE=w64-mingw32
if [ "$MSYSTEM" = MINGW64 ]
then
CFG_CPUTYPE=x86_64
CFG_OSTYPE=w64-mingw32
fi
;;

# Thad's Cygwin identifers below
Expand Down

0 comments on commit a3d77e6

Please sign in to comment.