[ruby-dev:49884] [Ruby trunk Bug#12959] win32ole has a libgcc dll dependency when newer GCC version use

From: golirev@...
Date: 2016-11-19 01:29:57 UTC
List: ruby-dev #49884
Issue #12959 has been reported by Tsuyoshi Morita.

----------------------------------------
Bug #12959: win32ole has a libgcc dll dependency when newer GCC version use
https://bugs.ruby-lang.org/issues/12959

* Author: Tsuyoshi Morita
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby -v: ruby 2.4.0dev (2016-11-19 trunk 56831) [x64-mingw32]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
win32oleだけが、libgcc_s_seh-1.dllに依存してしまいます。

以下はMinGW-w64 の環境での確認結果です。

~~~~
tsuyoshi@jupiter MINGW64 ~/ruby24_build
$ find . \( -name "*.dll" -o -name "*.so" \) | while read -r f; do \
  echo "Checking: $f"; \
  objdump -x $f | egrep "DLL Name: libstd|DLL Name: libgcc"; \
done

<snip>
Checking: ./.ext/x64-mingw32/win32ole.so
        DLL Name: libgcc_s_seh-1.dll
<snip>
tsuyoshi@jupiter MINGW64 ~/ruby24_build
~~~~

他の \*.dll, \*.soは、libgcc*.dll への依存はありませんでした。
Dependency walkerでみると、win32oleは __emutls_get_address を
必要としているようです。

win32oleのリンク時に -static-libgcc を付ければ良いのですが、
現状ext下の生成時にはオプションが付かないようになっているのを、
(mingwでは?)付けるようにした方が良いのではないでしょうか。

なお、RubyInstallerのgcc 4.7.2では、libgcc*.dll依存にはなりません。



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next