Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sorah opened this issue Feb 25, 2013 · 7 comments
Closed

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

sorah opened this issue Feb 25, 2013 · 7 comments

Comments

@sorah
Copy link
Contributor

sorah commented Feb 25, 2013

(Continuing from a0570c9's commit comment)

What's the commit

a0570c9

  • This meaning to force clang by specifying CC=cc if CC isn't set, because ruby-2.0.0-p0 build fails on llvm-gcc
    • cc is symlinked to clang, but gcc symlinked to llvm-gcc and llvm-gcc make failures.
    • ruby-2.0.0-p0 uses gcc for default, so llvm-gcc will be used. and currently build will be failed with llvm-gcc.
    • Here's must read about OS X's C compiler background: 2.0.0-rc2 build failed #290 (comment)

Problems

  • Segmentation faults on 1.8 because 1.8 doesn't support clang.

So, I recommend to...

  • Add comment that like "this is forcing to clang due to 2.0.0-p0's problem"
  • Use CC=clang instead of CC=cc
  • check platform, or gcc is llvm-gcc
  • Move CC=clang into 2.0.0-p0 file, because 1.8 doesn't support clang and it makes SEGV on 1.8.
@sorah
Copy link
Contributor Author

sorah commented Feb 25, 2013

@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
Copy link

nurse commented Feb 25, 2013

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
Copy link
Member

jeremy commented Feb 25, 2013

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
Copy link
Contributor Author

sorah commented Feb 26, 2013

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
Copy link
Member

jeremy commented Feb 26, 2013

I may be remembering wrong. Confusing 😁

@nurse
Copy link

nurse commented Feb 27, 2013

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

@sstephenson
Copy link
Contributor

Fixed - thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants