rbenv / ruby-build

A tool to download, compile, and install Ruby on Unix-like systems.
https://rbenv.org/man/ruby-build.1
MIT License
3.89k stars 785 forks source link

Don't force `CC=cc` (if CC is not defined) for all installing phase #311

Closed sorah closed 11 years ago

sorah commented 11 years ago

(Continuing from a0570c9bfe059517971126b9f11b3b842797686d's commit comment)

What's the commit

a0570c9bfe059517971126b9f11b3b842797686d

sorah commented 11 years ago

@sstephenson oh, Sorry I don't know require_gcc.

But, I still think we should check gcc = llvm-gcc and this workaround should be only in 2.0.0-p0.

How about that change?

nurse commented 11 years ago

Ruby 2.0.0 can choice suitable compiler from gcc-4.2, clang, gcc, and cc in configure.in by itself. see https://github.com/ruby/ruby/blob/v2_0_0_0/configure.in#L373

Ruby 1.8.7-p371 supports clang (r36253).

jeremy commented 11 years ago

OK - the issue we had with Ruby's auto-detect is that gcc-4.2 may be symlinked to llvm-gcc, which resulted in build failures.

Sounds like we can set CFLAGS to fix that issue, instead.

sorah commented 11 years ago

What? I don't know an environment which gcc-4.2 = llvm-gcc, normally it just not exists by default.

It should be users' problem.

jeremy commented 11 years ago

I may be remembering wrong. Confusing :grin:

nurse commented 11 years ago

gcc-4.2 is always GNU GCC. cc/gcc can be llvm-gcc.

sstephenson commented 11 years ago

Fixed - thank you.