Project

General

Profile

Bug #14447

Solaris 10 上の古いFujitsu C Compiler(fcc)のmjit関係のエラー

Added by ngoto (Naohisa Goto) over 1 year ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-dev:50469]

Description

Solaris 10 にて、古いバージョン(5.6)のFujitsu C Compiler(fcc)にてr62224をコンパイルしようとすると、以下のエラーが出ました。

オプジェクトファイル vm.new の作成を、拡張子が違反だとして拒否されてしまっています。
このコンパイラでは、オブジェクトファイルの拡張子は任意には指定できないようです。

fcc -E  -O2 -KV9 -KVIS2 -DRUBY_DEVEL=1 -DRUBY_EXPORT -I/usr/local/64/lib/libffi-3.0.10/include -I/usr/local/64/include  -D_XOPEN_SOURCE=500   -I. -I.ext/include/sparc64-solaris2.10 -I./include -I. -I./enc/unicode/10.0.0 -DMJIT_HEADER_BUILD_DIR=\"".ext/include/sparc64-solaris2.10"\" -DLIBRUBYARG_SHARED=\""-rpath /XXXXX/sparc64-fcc-trunk/lib -L/user/gen-info/ngoto/testruby/daily/sparc64-fcc-trunk/lib "\" -DLIBRUBY_LIBDIR=\""/XXXXX/sparc64-fcc-trunk/lib"\" -DMJIT_HEADER_INSTALL_DIR=\""/XXXX/sparc64-fcc-trunk/include/ruby-2.6.0/sparc64-solaris2.10"\" -DMJIT_HEADER ./vm.c -o vm.new
fcc: error: vm.new: illegal suffix.
make: *** [rb_mjit_header.h] Error 1

Related issues

Related to Ruby trunk - Bug #6591: r35101以降、古いfccで拡張ライブラリのコンパイルに失敗Third Party's Issue06/14/2012Actions

Associated revisions

Revision 646b24a9
Added by k0kubun (Takashi Kokubun) over 1 year ago

transform_mjit_header.rb: ignore unsupported cc

to generate MJIT header.

Even if we can't build MJIT header, Ruby's build should success. And
compilers which are not explicitly supported are likely to fail to
transform MJIT header.

Also you can pass only gcc or clang to --jit-cc=xxx for now. Thus
generating header does never make sense.

So I decided to conservatively give up MJIT header generation.
But please feel free to add your favorite compiler's macro if you think
it's working. (Another workaround is passing -D_GNUC_ :p)

[Bug #14447] [Bug #14446]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 62285
Added by k0kubun (Takashi Kokubun) over 1 year ago

transform_mjit_header.rb: ignore unsupported cc

to generate MJIT header.

Even if we can't build MJIT header, Ruby's build should success. And
compilers which are not explicitly supported are likely to fail to
transform MJIT header.

Also you can pass only gcc or clang to --jit-cc=xxx for now. Thus
generating header does never make sense.

So I decided to conservatively give up MJIT header generation.
But please feel free to add your favorite compiler's macro if you think
it's working. (Another workaround is passing -D_GNUC_ :p)

[Bug #14447] [Bug #14446]

Revision 62285
Added by k0kubun (Takashi Kokubun) over 1 year ago

transform_mjit_header.rb: ignore unsupported cc

to generate MJIT header.

Even if we can't build MJIT header, Ruby's build should success. And
compilers which are not explicitly supported are likely to fail to
transform MJIT header.

Also you can pass only gcc or clang to --jit-cc=xxx for now. Thus
generating header does never make sense.

So I decided to conservatively give up MJIT header generation.
But please feel free to add your favorite compiler's macro if you think
it's working. (Another workaround is passing -D_GNUC_ :p)

[Bug #14447] [Bug #14446]

History

Updated by k0kubun (Takashi Kokubun) over 1 year ago

-Eを渡しているため実際に生成しているのはプリプロセッサの結果なのですが、vm.newとなっている箇所をvm.oに変えるとその後のコンパイルプロセスも通りますか?

#2

Updated by ngoto (Naohisa Goto) over 1 year ago

  • Related to Bug #6591: r35101以降、古いfccで拡張ライブラリのコンパイルに失敗 added

Updated by ngoto (Naohisa Goto) over 1 year ago

  • Status changed from Open to Rejected

出力ファイルの拡張子を .i にすると、コマンドはエラーにならないことが判明しましたが、
そもそも、 "-E" オプションの解釈が標準的なUNIX上のCコンパイラと異なるため、無理でした。
(何らかのラッパースクリプトをかませば大丈夫かもしれません)

古いコンパイラをいつまでも使い続けるほうが悪いので、諦めてRejectします。

man fcc より抜粋:

     -E   This option performs preprocessing only on  the  speci-
          fied  C  source code and sends the results to the stan-
          dard  output.  The  output  includes  the  preprocessor
          directives used in the next step of the processing sys-
          tem.

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

標準出力に出るのであれば、 make 'CPPOUTFLAG=>' mjit-heaers などでできないでしょうか。

Also available in: Atom PDF