Issue #9658 has been updated by Akinori MUSHA.
Nobuyoshi N. wrote:
いいんじゃないでしょうか。
trunkに入れました。2.1にもそのまま当たり、同じように直ると思います。
しかし、その警告は本当にただの余計なお世話ですよねぇ。
- コンパイラのフラグはソースファイル群に対してまとめて指定する
- -Idirの先のヘッダファイルをincludeするかどうかは個々のソースファイル次第
なので、目障りなケースが多いのは事実ですね。
-Iについてだけ警告を抑制できるようなきめ細かい指定があればいいのですが。
Bug #9658: configure --with-opt-dir=dir と clang の組合せでビルドに失敗する
https://bugs.ruby-lang.org/issues/9658#change-45891
- Author: Akinori MUSHA
- Status: Closed
- Priority: Normal
- Assignee: Akinori MUSHA
- Category: build
- Target version: current: 2.2.0
- ruby -v: 2.1.0 and later
- Backport: 2.0.0: UNKNOWN, 2.1: REQUIRED
ruby 2.1以降で configure に --with-opt-dir=/opt/local を指定すると、
-
checking for printf prefix for long long… が、 clang の吐く clang:
warning: argument unused during compilation: ‘-I /opt/local/include’
のせいで失敗し、 config.h に PRI_LL_PREFIX の定義が入らない -
compiling …/ext/-test-/num2int/num2int.c がこけてビルド失敗
という流れです。
パッチを添付します。
cf.
https://twitter.com/knu/status/421181635455766529
https://gist.github.com/knu/8330662
https://github.com/ruby/ruby/pull/571
—Files--------------------------------
571.patch (2.65 KB)