このブログは、旧・はてなダイアリー「檜山正幸のキマイラ飼育記 メモ編」(http://d.hatena.ne.jp/m-hiyama-memo/)のデータを移行・保存したものであり、今後(2019年1月以降)更新の予定はありません。

今後の更新は、新しいブログ http://m-hiyama-memo.hatenablog.com/ で行います。

MinGWの新旧版とGit/TDM混合環境

新旧MinGWとは言っても、いじっているから、標準インストールとは違うかもしれない。

ツールバージョンのまとめを見ると手っ取り早い。

ディレクトリ構造

※が違う部分。

c:/Installed/MinGW.OLD/

  • bin/
  • mingw32/
  • lib/
  • libexec/
  • include/
  • share/
  • doc/ ※
  • var/
  • msys/
  • unins000.exe ※
  • unins000.dat ※

c:/Installed/MinGW.NEW/

  • bin/
  • mingw32/
  • lib/
  • libexec/
  • include/
  • share/
  • info/ ※
  • man/ ※
  • var/
  • msys/
  • COPYING ※
  • COPYING.LIB ※

OLDにアンイストーラーがあるが、コンパネでは、「2013年1月1日(なんと!)インストールのMinGW-get」の項目が出る。

 2013-01-01  unins000.dat
 2013-01-01  unins000.exe

日付から言って、コンパネの項目とこのディレクトリが対応しているのは確かだろう。

新板ではアンイストーラーがない。

-a---        2014/03/08     16:28      86528 mingw-get-setup.exe

これが残っているから、mingw-get-setup.exe を使って2014年3月にインストールしたのだろう。

ツールバージョン

MingGW 旧版:

>>> MinGW.OLD > bin/gcc --version
gcc.exe (GCC) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

>>> MinGW.OLD > bin/ar --version
GNU ar (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGW.OLD > bin/nm --version
GNU nm (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGW.OLD > mingw32/bin/ar --version
GNU ar (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGW.OLD > mingw32/bin/nm --version
GNU nm (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGW.OLD > msys/1.0/bin/bash --version
GNU bash, version 3.1.17(1)-release (i686-pc-msys)
Copyright (C) 2005 Free Software Foundation, Inc.

bin/ar, bin/nm, bin/ld と mingw32/bin/ar, mingw32/bin/nm, mingw32/bin/ld などがあるが、まったく同じバイナリである。本来はシンボリックリンクでいいはずだが、Windowsシンボリックリンクがアテにならないから実体まるコピーしているのだろう。

おそらく、mingw32/bin/ のなかのものは32ビット固有なのだが、それは bin/ と同じ。mingw64/bin が出来れば、それは64ビット固有で、bin/ のものを上書き(優先)すると思われる。bin/ から mingw32/bin, mingw64/bin へのシンボリックリンクのハズ? なのか??

MinGW 新板:

>>> MinGw > bin/gcc --version
gcc.exe (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

>>> MinGw > bin/ar --version
GNU ar (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGw > bin/nm --version
GNU nm (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGw > bin/ld --version
GNU ld (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

>>> MinGw > mingw32/bin/ar --version
GNU ar (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGw > mingw32/bin/nm --version
GNU nm (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGw > mingw32/bin/nm --version
GNU nm (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>>> MinGw > mingw32/bin/ld --version
GNU ld (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

Git BashとTDM-GCCの混合環境:

>>> git > bin/bash --version
GNU bash, version 4.3.42(2)-release (x86_64-pc-msys)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

>>> TDM-GCC-64 > bin/gcc --version
gcc.exe (tdm64-1) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


>> TDM-GCC-64 > bin/ar --version
GNU ar (GNU Binutils) 2.25
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

>> TDM-GCC-64 > ./x86_64-w64-mingw32/bin/ar --version
GNU ar (GNU Binutils) 2.25
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

ツールバージョンのまとめ

MinGW MinGW 混合
gcc 4.6.2 4.9.3 5.1.0
bash 3.1.17 - 4.3.42
binutils 2.22 2.25.1 2.25