397 Commits

Author SHA1 Message Date
Mike McQuaid
55d277c335 Support core GCC formula as a GCC compiler.
It is activated by the same mechanism as the Homebrew/versions compilers
which now check if the GCC formula uses the same, correct version.

References Homebrew/homebrew#28418.
2014-04-23 08:10:48 +01:00
Mike McQuaid
593702c70b shared: don't warn about non-Apple compilers now. 2014-04-23 08:10:48 +01:00
Jack Nagel
6cdc76452b Only directories are candidates for superenv bin 2014-04-22 15:39:59 -05:00
Jack Nagel
dd8dc7a380 Remove obsolete DEVELOPER_DIR hacks
These days Homebrew refuses to do anything if the xcode-select path is
busted, so this workaround is unnecessary.
2014-04-20 16:33:41 -05:00
Jack Nagel
dc3691eccd Clean up some concatentation inside interpolation 2014-04-04 22:02:48 -05:00
Misty De Meo
0ec7e39287 Add ENV.refurbish_args helper
Rationale: our arg refurbishment is normally only turned on when
called via the `make` wrapper, for compatibility reasons. However,
there are numberous places we'd like this to be turned on elsewhere,
like software that builds via `python setup.py` where bad flags from
the system python can be pulled in.

This helper appends 'O' to CCCFG, which enables refurbishment for
all calls of the compiler shims.
2014-03-28 17:02:14 -07:00
Mike McQuaid
3b0eef09e9 Remove unnecessary swearing. 2014-03-22 10:14:20 +00:00
Mike McQuaid
f155b0570e Revert "ENV: request no byte code Python when bottling."
This reverts commit b603c96276cf7fe1417d2355eebc47fb15da0b8c.
2014-03-08 00:04:30 +00:00
Mike McQuaid
536430e0ae ENV: request no byte code Python when bottling. 2014-03-02 02:08:59 +00:00
cadrpear
f43bb0c292 Fix building universal binaries on 32-bit CPUs
[jn: style, update comment]

Closes Homebrew/homebrew#25728.
Fixes Homebrew/homebrew#26834.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-02-19 14:15:03 -05:00
Jack Nagel
a1d2aa0f69 Stop exporting HOMEBREW_VERBOSE to build environment
This flag no longer affects the output of the compiler wrappers, since
everything is buffered by the build process rather than each individual
tool.

Additionally, this is a user-facing knob that affects ARGV.verbose?, and
the combination of these two issues broke the --quieter feature.
2014-02-18 21:46:26 -05:00
Camillo Lugaresi
cbd14fde1e Correctly find Homebrew-installed fortran
Fixes Homebrew/homebrew#26338.
Closes Homebrew/homebrew#26352.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-02-02 14:13:53 -05:00
Misty De Meo
b7781c4571 Revert "Add python superenv wrapper"
This reverts commit 90e22e389c539b25fe7864645bfe5e2a9ce7452f.
2014-01-27 20:46:04 -08:00
Misty De Meo
ee76cf75af Add python superenv wrapper
Closes Homebrew/homebrew#26140.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2014-01-26 10:55:49 -08:00
Jack Nagel
8f89db4882 Fix typo 2014-01-11 21:28:25 -06:00
Mike McQuaid
996c7bd7d1 ENV: add method to prepend and create a PATH. 2014-01-04 13:19:20 +00:00
Misty De Meo
51d8270abd ENV.gcc: remove raise
This raise happened in no other ENV methods, and isn't really necessary
since fails_with guards against this method actually being called unless
gcc-4.2 is actually installed.
2014-01-04 01:22:04 -08:00
Misty De Meo
d7a6161751 Recommit ENV changes 2014-01-04 01:20:56 -08:00
Mike McQuaid
3cf2cc853d Revert "stdenv: fix self.cc check"
This reverts commit 0e1d52c0d3945ae0ac69383c7734e425b7fbf8f1.
2014-01-04 09:14:28 +00:00
Mike McQuaid
1dcf726a59 Revert "stdenv: set correct compiler symbol for gcc 4.0"
This reverts commit f4dc5614953b3b90acc28c83262d56587b0616b1.
2014-01-04 09:14:25 +00:00
Misty De Meo
bdd2e71b3a stdenv: set correct compiler symbol for gcc 4.0 2014-01-03 19:13:35 -08:00
Misty De Meo
97bb9c5b73 stdenv: fix self.cc check
Since ENV.cc/cxx are accessors to ENV, any values being passed through
are coerced into strings, which means that a nil `ENV.cc` is actually
an empty string - which isn't considered to be false in Ruby.

Fixes mistydemeo/tigerbrew#161.
Fixes mistydemeo/tigerbrew#135.
2014-01-03 17:59:00 -08:00
Jack Nagel
b745d21912 superenv: don't accidentally filter out HOMEBREW_TEMP
Fixes Homebrew/homebrew#25471.
2013-12-27 13:01:41 -06:00
Jack Nagel
5e0a8668fb Silence more warnings 2013-12-09 15:15:53 -06:00
Jack Nagel
009541c446 Help autoconf find m4 on Xcode-only systems
Closes Homebrew/homebrew#24904.
2013-12-06 20:56:46 -06:00
Jack Nagel
65a00e213b Make CompilerSelectionError an InstallationError
Fixes Homebrew/homebrew#19962.
2013-12-03 22:16:37 -06:00
Jack Nagel
ea992b02e5 Fix typo 2013-12-02 01:16:50 -06:00
Jack Nagel
98f25e4407 Yielded value is not used 2013-12-02 00:16:48 -06:00
Jack Nagel
0581532fdc Require Formula before using it 2013-11-27 17:30:21 -06:00
Jack Nagel
14b19ba3c4 Adjust optimization flags if the CPU does not support SSE4
Tentatively fixes Homebrew/homebrew#21778, Homebrew/homebrew#24363.
2013-11-27 17:25:27 -06:00
Jack Nagel
f89c8bbaf9 Remove comment 2013-11-21 17:13:37 -06:00
Jack Nagel
0a236abe53 Simplify passing archflags to cc wrapper 2013-11-20 13:19:14 -06:00
Jack Nagel
e0d2492247 Move optimization flag selection out of cc wrapper
The mapping of architectures to optimization flags is now retrieved from
Hardware::CPU and the selected flags are passed as an environmen
variable, rather than duplicated in the cc wrapper and re-calculated on
every invocation of the compiler.

Closes Homebrew/homebrew#24540.
2013-11-20 13:19:06 -06:00
Jack Nagel
c020950a42 Export HOMEBREW_PREFIX to build environment
Constructing the path relative to a file in the repository is incorrect
on some supported configurations (i.e., the repository is located in a
different place than the prefix).

Closes Homebrew/homebrew#24418.
2013-11-17 22:57:16 -06:00
Jack Nagel
b1f8358fa8 Combine X11 path conditionals 2013-11-15 21:25:43 -06:00
Jack Nagel
ba0cfd3582 Improve heuristic for detecting configure 2013-11-15 00:40:17 -06:00
Jack Nagel
7fc9ffec86 Better documentation for no-op superenv methods 2013-11-12 13:53:29 -06:00
Jack Nagel
4cb824b92e Allow changing the optimization level under superenv 2013-11-12 13:53:29 -06:00
Jack Nagel
c7b7fdf0ca Simplify ENV.0x methods in stdenv 2013-11-12 13:53:29 -06:00
Jack Nagel
0b793e321e Add ENV.O0 to stdenv 2013-11-12 13:53:29 -06:00
Jack Nagel
83cbb1e3fb Group public ENV methods together 2013-11-11 18:34:15 -06:00
Jack Nagel
c95c32fbb0 Remove outdated comment 2013-11-11 18:32:56 -06:00
Jack Nagel
e7f20bcfbc superenv: fix type error
This is a string since it is used to match string keys in a hash.
2013-11-08 23:15:12 -06:00
Mike McQuaid
8484e72f75 superenv: set cc/cxx based on actual compiler.
Closes Homebrew/homebrew#23449.
2013-11-07 12:06:03 +00:00
Jack Nagel
06dbec5aaf Disable make_fuss when running configure invoked by make
The cc wrapper's make_fuss is only enabled when HOMEBREW_CCCFG contains
'O', which is set by the make wrapper. This means it is disable when
running configure scripts. However, this does not include configure
scripts invoked by make, which inherit the value of HOMEBREW_CCCFG from
the make process. make_fuss will be enabled for these scripts, cause
breakage.

Configure scripts generated by autoconf 2.56 (November 2002) or later
export DUALCASE into the environment of subprocesses. This variable is
only used by the MKS shell, so we can use it as a heuristic to determine
if we are running as a subprocess of a configure script.
2013-11-04 11:02:18 -06:00
Xiyue Deng
6fc6dd791b stdenv: drop space between "-isystem" and path.
* This is consistent with superenv.
2013-11-02 01:47:35 -07:00
Mike McQuaid
d9d2443d5d Cleanup use of some global constants. 2013-10-30 13:20:48 -07:00
Xiyue Deng
ea2dd613a4 Make stdenv handling less intrusive.
* Don't encode "-Qunused-arguments", as this is only supported in Clang
  and will break building when C/C++ compiler is switched during the
  process, e.g. building gcc. The warning is harmless without
  "-Werror".
2013-10-27 06:30:48 -07:00
Xiyue Deng
15e5fe4384 Clang standard library selection.
* Add new ENV function for selecting stdlib for Clang.
  - The selection is no-op for non-system-clang compilers.
  - Both superenv and stdenv are handled.
* Add new HOMEBREW_CCCFG flag and ccwrapper handling.
2013-10-26 22:17:04 -07:00
Xiyue Deng
f2132c47bd C++11 support.
* Add options and ENV method to specify building in C++11 mode.
  - Set C++ compiler flags to enable C++11 mode.
  - To add options to support C++11 mode, a formula can now use

      option :cxx11

    to provide "--c++11" option, and detect and enable C++11 support in
    install method using

      ENV.cxx11 if build.cxx11?

Closes Homebrew/homebrew#22453.
2013-10-26 22:17:04 -07:00