221 Commits

Author SHA1 Message Date
Jack Nagel
858da0063d Allow disabling arch flag filtering
Closes Homebrew/homebrew#17352.
2014-05-14 00:00:59 -05:00
Jack Nagel
230161c1de Use a case statement 2014-05-13 16:23:12 -05:00
Jack Nagel
cb873d0833 Check value of compiler rather than HOMEBREW_CC 2014-05-13 16:22:57 -05:00
Jack Nagel
2716ed6d26 Make cc=/cxx= set HOMEBREW_CC in superenv 2014-05-13 16:20:30 -05:00
Jack Nagel
c03483b6a8 Remove legacy ENV accessor hack 2014-05-13 12:50:30 -05:00
Jack Nagel
278d9dfdb4 self, not ENV 2014-05-13 12:48:27 -05:00
Jack Nagel
deb65a959d Use a case statement 2014-05-13 12:14:51 -05:00
Jack Nagel
002cb64774 Make sure the path arrays only contain strings 2014-05-13 12:14:51 -05:00
Jack Nagel
9fc5a543d5 No need to augment path on Xcode-only 10.9 2014-05-13 11:28:44 -05:00
Jack Nagel
43d9640cb6 Move method to prepare for future changes 2014-05-13 11:28:44 -05:00
Jack Nagel
ff25f7ecf7 Future-proof this conditional 2014-05-13 11:26:21 -05:00
Jack Nagel
ff9191eca2 clean up X11 conditionals 2014-05-12 11:45:50 -05:00
Jack Nagel
5f94742afb Ensure HOMEBREW_ARCHFLAGS is always a string 2014-05-10 16:54:30 -05:00
Jack Nagel
089af6627a Always use stub tools in /usr/bin on 10.9 2014-05-08 17:24:48 -05:00
Jack Nagel
71055aa073 Move xctoolchain_path to Xcode module, where it belongs 2014-05-01 18:36:46 -05:00
Misty De Meo
48cd833a15 Superenv: determine_optflags should return a string
This is saved in HOMEBREW_OPTFLAGS and later mutated by
ENV.universal_binary, so if this returns nil the sub will fail.
2014-04-30 08:21:54 -07:00
Jack Nagel
6a2fa253cd Make ENV.O4 a no-op
On older Apple compilers "-O4" is known to cause build errors. On recent
clang, it's the same as "-O3" and you have to pass "-O3 -flto" to get
the old behavior.
2014-04-29 00:09:07 -05:00
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
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
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
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
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
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
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
Mike McQuaid
d9d2443d5d Cleanup use of some global constants. 2013-10-30 13:20: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
Jack Nagel
27f7e3503f Move verbose ENV setup out of brew.rb 2013-10-19 10:41:09 -05:00