126 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
Mike McQuaid
8c426e8207 ENV/shared: fix gcc versions edge case. 2014-05-06 22:17:59 +01:00
Mike McQuaid
2fb6d2fdbe ENV/std: use full paths to gcc versions.
This is consistent with how e.g. `gcc-4.2` is handled.

This means e.g. `ghc` can find `gcc-4.8` at runtime.

Fixes Homebrew/homebrew#28934.
2014-05-06 16:45:50 +01:00
Mike McQuaid
c92a16e2ce shared: refactor gcc_version_formula.
Avoid throwing unnecessary exceptions by checking for paths existing and
creating formulae as late as possible. Additionally use instance
variables for some caching.
2014-05-06 16:45:50 +01:00
Mike McQuaid
1b0647d747 shared: don't use Formula.factory unnecessarily.
Instead check if the path exists by using opt.
2014-05-06 16:45:50 +01:00
Jack Nagel
4b335eb2df Xcode-only path adjustments should be the same in both environments 2014-05-01 18:36:46 -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
Mike McQuaid
116c2b06a8 ENV/shared: handle untapped e.g. gcc48 formula.
In this case we need to handle the throwing on an exception when
attempting to initialize the gcc48 Formula object.

This initialization should be unnecessary if the core GCC is already
installed and rescued if not.
2014-04-30 12:38:22 +01:00
Jack Nagel
259bbdf76c Drop obsolete compiler fallback in stdenv
This code originated in a slightly different form in 8e88b22fd1ec65a344ce6e4facd6dad4b415b2ad:

8e88b22fd1/Library/Homebrew/extend/ENV.rb (L30-L32)

Back then, MacOS.default_compiler could return nil, which meant
ENV.compiler could do the same. This code was carried forward as the
surrounding code changed. At this point it should be unreachable.
2014-04-29 21:11:03 -05:00
Mike McQuaid
2c3b04fb26 ENV/shared: use homebrew/versions GCC if installed
Closes Homebrew/homebrew#28820.
2014-04-29 08:51:56 +01:00
Jack Nagel
b6a0b95380 Use MacOS.locate and delete wrong comment 2014-04-29 01:31:22 -05:00
Jack Nagel
0de7f98b58 Remove comment that no longer reflects adjacent code 2014-04-29 01:31:22 -05:00
Jack Nagel
bfde04ee17 We don't use -Qunused-arguments anymore 2014-04-29 00:11:54 -05:00
Jack Nagel
90c03ffc17 ENV.{cc,cxx} setters already set OBJC and OBJCXX 2014-04-29 00:09:07 -05: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
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