Bug #7451

r37911 breaks build on non gcc or non IA-32 platforms

Added by Naohisa Goto over 2 years ago. Updated over 2 years ago.

[ruby-dev:46646]
Status:Closed
Priority:Normal
Assignee:Yui NARUSE
ruby -v:- Backport:

Description

r37911 以降、__sync_val_compare_and_swap がリンク失敗したら必ず -march=i486 が付くため、
gccではないコンパイラ、またはIA-32ではない環境ではコンパイルに失敗します。

Sun(Oracle)の SolarisStudio 12.3 のccでは、-m はリンカに何かを渡すオプションらしく、
以下のようにminirubyのリンクに失敗します。Fujitsu C Compiler でも同様です。

cc -xO1 -xtarget=sparc64viiplus -m64 -march=i486 -L. -L/usr/local/64/lib -R/usr/local/64/lib -m64 main.o dmydln.o dmyencoding.o dmyversion.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o dln_find.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o compile.o debug.o iseq.o vm.o vm_dump.o vm_backtrace.o vm_trace.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o sparc.o flock.o isinf.o setproctitle.o addr2line.o dmyext.o probes.o -lpthread -lrt -lsocket -ldl -lcrypt -lm -o miniruby
cc: Warning: Option -march=i486 passed to ld, if ld is invoked, ignored otherwise
ld: fatal: -c option is incompatible with building a static object (-dn, -r, --relocatable)
ld: fatal: -a and relocatable object option (-r, --relocatable) are incompatible
ld: fatal: flags processing errors
make: *** [miniruby] Error 2

Associated revisions

Revision 37924
Added by Naohisa Goto over 2 years ago

  • configure.in: revert r37911, r37906 and r37904 which break build with non-gcc and/or non-IA32 compilers, e.g. Solaris Studio, Fujitsu C Compiler. [Bug #7451]

Revision 37924
Added by Naohisa Goto over 2 years ago

  • configure.in: revert r37911, r37906 and r37904 which break build with non-gcc and/or non-IA32 compilers, e.g. Solaris Studio, Fujitsu C Compiler. [Bug #7451]

History

#1 Updated by Naohisa Goto over 2 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37924.
Naohisa, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • configure.in: revert r37911, r37906 and r37904 which break build with non-gcc and/or non-IA32 compilers, e.g. Solaris Studio, Fujitsu C Compiler. [Bug #7451]

Also available in: Atom PDF