60 Commits

Author SHA1 Message Date
Max Howell
d4503b1202 Fixes Homebrew/homebrew#14542; ocaml superenv issues
This patch removes most of the settings for CC, CXX etc. because we are trying to be minimal. Then we force the compiler to Homebrew's choice underneath in superenv. We however leave LD because we prefer that build-systems use the c-compiler for linking, it generally works better (copiously tested), however when the build-system explicitly calls ld, we respect that. This gets around the ocaml bug in question, since somehow clang was crashing during link, but the ld tool itself (which is kind of clang, kind of llvm-gcc) is okay with this.

Also moved the setting of O (so that cc-args are refurbished) into a make wrapper. Not sure if this matter much, but seems more consistent.
2012-08-30 20:02:29 -04:00
Jack Nagel
a4ccf68602 superenv: look for pc files under prefix, not repository
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-30 16:08:24 -05:00
Max Howell
ea12f340e7 Put user's PATHs at end of superenv PATH
Making sure to remove X11, should be safe if this order is kept.

Refs Homebrew/homebrew#14519.
Fixes Homebrew/homebrew#14544.
2012-08-30 09:45:33 -04:00
Max Howell
491be4fa89 Typo
Not sure how I forgot to test that.
2012-08-29 14:52:00 -04:00
Max Howell
096ba6c17c Don't fail pre-Xcode 4.3
Refs Homebrew/homebrew#14392.
2012-08-29 14:49:03 -04:00
Max Howell
95164a5d46 Use fortran from std-env in superenv
Fixes Homebrew/homebrew#14524.
2012-08-29 14:45:04 -04:00
Max Howell
a360a41472 superenv only adds X11 paths if required
Since we are moving towards only depending on X11 for X-headers, superenv now doesn't automatically add X11 compilation. I was reluctant to do this, but it is the right thing to do now that X11 is not automatically installed by OS X or Xcode.

I didn't implement ENV.x11 because the order that the X headers are inserted is important. It must be done at initial setup to ensure that brewed versions of e.g. freetype and Cairo are used and not the ones installed by XQuartz.
2012-08-29 12:41:37 -04:00
Max Howell
4f06d131df Superenv wrapper for sed
Fixes Mountain Lion specific sed issue.

Provided scripts don't use the full-path to see we are fine. They never do though, that would assume too much.
2012-08-29 12:41:35 -04:00
Max Howell
1ec368759e Support HOMEBREW_MAKE_JOBS 2012-08-29 12:41:34 -04:00
Max Howell
65d195dcaa superenv: build-environments that just work
1. A minimal build environment, we don't set CFLAGS, CPPFLAGS, LDFLAGS, etc. the rationale being, the less that is set, the less variables we are introducing that can break builds.
2. A set of scripts that replace cc, ld, etc. and inject the -I, -L, etc. flags we need into the args passed to the build-tools.

Because we now have complete control over compiler instantiations we do a variety of clean-up tasks, like removing bad flags, enforcing universal builds and ensuring makefiles don't try to change the order of library and include paths from ones that work to ones that don't.

The previous ENV-system is still available when --env=std is specified.

superenv applies to Xcode >= 4.3 only currently.
2012-08-29 12:41:34 -04:00