Commit Graph
19 Commits
Author SHA1 Message Date
Jack Nagel 1d0a7c66a5 Add OS.mac? and OS.linux? 2013-10-18 12:56:51 -05:00
Misty De Meo 1470fd3f0f Mach: improve PPC arch detection
Also adds some reusable constants into the global Hardware::CPU
namespace, available on both OS X and Linux.
2013-08-15 22:46:56 -07:00
Jack Nagel e17d2a24fc Use Hardware::CPU module 2013-06-14 10:34:17 -05:00
Jack Nagel 1f19374e37 Move oldest_cpu to Hardware 2013-06-06 16:02:27 -05:00
Jack Nagel 366ac016bd Reorganize compat 2013-05-10 23:27:28 -05:00
Misty De Meo e7f66519dc Hardware: separate out CPU values into CPU module
* CPU functions now exist in Hardware::CPU
* Added compatibility functions in compat/hardware_compat.rb
* Names are less specific to Mac hardware, e.g. CPU.family instead of
  Hardware.intel_family
* Hardware::CPU.family works for both Intel and PowerPC
* New helper methods on CPU, like .sse4? and .altivec?

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-03-23 13:40:18 -05:00
Shaun Jackman 076fcd11b0 Portability fixes to run Homebrew on Linux systems
Closes #16344.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-11 18:26:25 +00:00
Misty De Meo 8f4469c781 Add Ivy Bridge CPU family
Fixes #13434.
2012-07-16 16:26:47 -05:00
Jack Nagel 4043be7c7f Cache Hardware.is_64_bit?
IO#popen is called for each call to Hardware.is_64_bit?; this becomes
costly when it is repeatedly invoked. Luckily it is an invariant, so we
can store it in a class variable.

False is a valid value for this method, so the usual ||= idiom is not
applicable.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-02 01:10:21 -05:00
Austin Seipp be1d490be5 sandybridge hardware identifier for brew --config
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-07-05 09:38:41 -07:00
Adam Vandenberg edeace562e Add MacOS.prefer_64_bit?
Moved snow_leopard_64? to compatibility and replaced it with
a function MacOS.prefer_64_bit?. This method is in a better
place and has a better name once Lion comes out.

Fixes #4710
2011-03-18 10:30:26 -07:00
Adam Vandenberg 31f1fabd03 Define "snow_leopard_64?"
snow_leopard_64? (defined in Hardware) is a short-cut for:
  MACOS_VERSION >= 10.6 and Hardware.is_64_bit?

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-08-22 20:11:03 -07:00
listrophy a4e6393408 Add 'Arrandale' for core i7 MBP
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-04-29 11:51:05 -07:00
Adam Vandenberg ee8c805b65 Fix universal builds on 32-bit CPUs. 2010-04-22 17:23:59 -07:00
Adam Vandenberg e182e5f5b7 Move license block to separate LICENSE file. 2010-03-01 11:41:24 -08:00
Adam Vandenberg ef39adab33 Move some helper functions into Hardware 2009-11-19 14:03:06 -08:00
Ben Alpert 5d7cab9703 Add Hardware.is_64_bit? method
Closes #53
2009-09-24 16:30:26 -06:00
Max Howell 5c8c18870c Fix some "GCC cannot create executables"
This regards Issue #30.

Turns out -march=native isn't supported by Apple's GCC, but while investigating it I found they'd back ported the -march=core2 option, so we win anyway.

Logic reverted to how it was yesterday.

I moved the gcc options stuff back to brewkit.rb as we manipulate the cflags more later and it seemed bad form to split the logic for this area over two files.

Additionally the brew command exits immediately on powerpc now. Brewkit doesn't throw as theoretically it is a useful library file for other projects.
2009-09-03 22:39:49 +01:00
spicyj 7c1d09672a Improvements to build environment determination
Simplified hardware model testing.

Even smarter compiler option generation using sysctl and new GCC 4.2 features.

Get processor count from sysctl and thus remove our dependency on RubyCocoa.
2009-09-03 16:34:31 +01:00