Forum: Ruby-dev [ruby-trunk - Bug #7101] 拡張ライブラリの質問

Posted by knu (Akinori MUSHA) (Guest)
on 2013-02-16 04:53
(Received via mailing list)
Issue #7101 has been updated by knu (Akinori MUSHA).


> - CCが -ansi -std=iso9899:199409 等を受け付ける -- 
NetBSD/amd64やFreeBSD(<10.0)は標準でgccなので該当

あ、NetBSDはgccだけど-ansi ...を付ける処理がスキップされるので関係ないですね。
とはいえ、rubyビルド時のoptflags/debugflags/warnflagsがC拡張のビルド時にも使われることで悪影響を与える可能性は-ansi 
...以外にもいろいろあるはずです。C拡張側で-Werrorを指定している場合等。
----------------------------------------
Bug #7101:  拡張ライブラリの質問
https://bugs.ruby-lang.org/issues/7101#change-36332

Author: ko1 (Koichi Sasada)
Status: Open
Priority: Normal
Assignee: mame (Yusuke Endoh)
Category: build
Target version: 2.0.0
ruby -v: trunk


  ささだです.


  trunk では,拡張ライブラリをビルドするとき,下記のようなオプションがつ
 きます.

 gcc -I. (snip) -Wall -Wextra -Wno-unused-parameter -Wno-parentheses
 -Wno-long-long -Wno-missing-field-initializers -Wunused-variable
 -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement
 -Wimplicit-function-declaration -ansi -std=iso9899:199409  (snip)

  -ansi -std=iso9899:199409 のあたりで,inline や // でのコメントアウト
 を利用している拡張ライブラリがビルド出来ない感じです.
 (inline については,ruby.h を include していれば適切に入れ替えられるん
 ですが,ruby.h を include していない *.c をビルドする可能性もあり,そこ
 でこけてる感じです)

  これは,仕様でしょうか.ぎゃっという人は多そうなので,拡張ライブラリの
 CC のオプションは,以前に外した方が良さそうに思いますが.


 # 目の前でマンガを読んでいる須藤さんから
 # 何とかしろと言われたのでご相談した次第です.

 --
 // SASADA Koichi at atdot dot net
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.