24 Commits

Author SHA1 Message Date
Misty De Meo
45e7f0ccb0 Allow older non-Apple GCCs to build things 2013-10-16 18:43:56 -07:00
Misty De Meo
48dde74503 Move ld64 into SharedEnvExtension
Superenv is being tested on Xcode 3.1.4, so this needs to be supported
in both ENVs, not just stdenv.
2013-09-28 17:22:27 -07:00
Misty De Meo
497ccdc41c ENV: Ensure @compiler is set
If @compiler isn't set/checked by ENV.compiler and the ENV.clang/etc.
methods, ENV.compiler may return unexpected results after fails_with
picks a fallback compiler.

See Homebrew/homebrew#22674.
2013-09-19 23:36:15 -07:00
Misty De Meo
1ae81f0bf7 Move CompilerSelector logic into build env setup
This moves the CompilerSelector fails_with logic into the build
environment setup, making the compiler selection available before
performing actions that depends on knowing what the compiler is, e.g.
setting up PATH.

ENV.setup_build_environment now optionally takes a Formula argument
to provide the information necessary to do the fails_with, and the new
ENV.validate_cc! extracts the fails_with logic from Build.install.
2013-09-17 12:43:38 -07:00
Jack Nagel
7e079fc37d ENV: convert values to strings in cc setters 2013-09-03 10:07:53 -05:00
Misty De Meo
96b50e013e Remove HOMEBREW_CC warning from ENV.compiler
ENV.compiler is called outside setting up the build environment, where
values unsupported for user input might have been specified - for
example, GNU GCC executables.
2013-09-01 14:42:37 -07:00
Misty De Meo
71268b7f16 Provide reusable GNU GCC constants in ENV 2013-09-01 13:19:13 -07:00
Misty De Meo
11f8b2f49c Experimental support for non-Apple GCCs 2013-09-01 13:19:12 -07:00
Jack Nagel
6b79a4e714 ENV: only set fortran flags in one place 2013-08-30 19:07:10 -05:00
Jack Nagel
8828187b4c ENV: use fc accessor 2013-08-30 19:00:19 -05:00
Jack Nagel
405ba3df68 Fix conditional in ENV.fortran 2013-08-30 18:59:58 -05:00
Jack Nagel
aa79e21ba4 ENV: add cc and cxx setters 2013-08-30 18:42:12 -05:00
Jack Nagel
4bee5db66d Simplify handling custom FCFLAGS 2013-08-30 16:42:04 -05:00
Jack Nagel
43bd5d44c2 Remove PATH hack from ENV.fortran 2013-08-30 16:30:34 -05:00
Misty De Meo
7e1af4b7d5 Unify compiler selection logic
This unifies the logic for selecting a compiler between superenv and
stdenv. A variation of superenv's `determine_cc`, which now returns a
symbol, has been moved into the shared ENV extension. Stdenv uses the
result of this directly (as it's always used symbols), while superenv
translates that back into a compiler string.

This also has the effect of disabling HOMEBREW_USE_(gcc|llvm|clang) in
stdenv, which have already been marked as deprecated for some time, and
enables the HOMEBREW_CC= environment variable syntax from superenv in
stdenv.
2013-08-30 07:52:13 -07:00
Misty De Meo
221bb2419f Add --cc= syntax for selecting compilers 2013-08-30 07:52:12 -07:00
Jack Nagel
fb50be432a Remove default values from ENV.{cc,cxx}
Closes Homebrew/homebrew#22138.
2013-08-29 19:22:36 -05:00
Jack Nagel
9e8638ea35 Only perform coercion to string once in ENV.{append,prepend} 2013-08-26 15:03:37 -05:00
Jack Nagel
4a3dac82ef Use ENV.prepend_path 2013-08-19 17:21:13 -05:00
Jack Nagel
b672b44cf9 Add ENV.append_path 2013-08-19 17:21:13 -05:00
Jack Nagel
b8bac2ba53 Fix typo 2013-08-19 14:07:14 -05:00
Amos Wenger
52ace99f14 Use File::PATH_SEPARATOR globally instead of ':'
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.

The main places the magic constant ':' was being used were:
  - the $PATH environment variable
  - CMAKE-related environment variables
  - pkg-config related environment variables

Closes Homebrew/homebrew#21921.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19 13:35:44 -05:00
Jack Nagel
e0574b854e More robust implementation of ENV.with_build_environment 2013-08-19 12:32:59 -05:00
Jack Nagel
dd9c269c69 Rename HomebrewEnvExtension to Stdenv 2013-08-19 12:32:59 -05:00