24 Commits

Author SHA1 Message Date
Michka Popoff
5c068ef82c elf.rb: avoid corrupted elf files
Some elf files like unittest files or memory dumps may not be completely
readable by readelf.

Readelf will fail after the following message:
readelf: Warning: possibly corrupt ELF header - it has a non-zero program header offset, but no program headers

This patches avoid these files when there is a non zero offset but no
program headers
2019-03-09 17:16:36 +01:00
Mike McQuaid
234e4aec96
Improve use of default_prefix? in tests. 2019-01-21 14:33:56 +00:00
Shaun Jackman
9ef010738f needed_libraries: Fix cannot find section .dynamic
Fix the error `cannot find section .dynamic` when needed_libraries is
called on a static ELF executable.
2019-01-02 12:34:16 -08:00
Jonathan Chang
03597404af os: add version info for kernel and glibc [Linux] 2019-01-01 16:10:43 -08:00
Mike McQuaid
51af87f85f
Add HOMEBREW_FORCE_HOMEBREW_ON_LINUX
This serves a similar purpose to the HOMEBREW_FORCE_HOMEBREW_ORG
variable but applies to more settings.
2018-10-20 13:58:27 +01:00
EricFromCanada
20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Shaun Jackman
f6093961ef Add Homebrew::DEFAULT_PREFIX for Linux
The default prefix is /usr/local on macOS
and /home/linuxbrew/.linuxbrew on Linux.
2018-09-11 09:57:08 -07:00
Markus Reiter
2452b27866 Refactor ErrorDuringExecution. 2018-07-19 16:41:27 +02:00
Maxim Belkin
e5435dfeb7
Cross-platform diagnostics. 2018-05-14 04:44:15 -05:00
Shaun Jackman
0575d7b610 config: Print host glibc version [Linux] 2017-12-07 10:37:19 -08:00
Shaun Jackman
e5847b652f extend/pathname: Add os/linux/elf.rb 2017-12-03 16:22:51 -08:00
Mike McQuaid
8d995e961f Make hardware code cross-platform. 2016-05-08 16:51:22 +01:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Misty De Meo
07660bb7b6 Hardware: add new .features method
This returns a list of symbols with the various CPU features supported
by the active hardware.
2014-06-21 21:59:51 -07:00
Shaun Jackman
94a0b26fec Linuxbrew: Read CPU flags from /proc/cpuinfo
Closes Homebrew/homebrew#29895.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-06-06 19:47:16 +01:00
Shaun Jackman
12b5de391e hardware: Add Intel CPUs to OPTIMIZATION_FLAGS
Closes Homebrew/homebrew#29866.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-06-04 07:26:18 -07:00
Shaun Jackman
774cd8b68b universal_archs returns ArchitectureListExtension
Closes Homebrew/homebrew#22210.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-08-29 20:47:18 -07:00
Misty De Meo
e6d5e813d4 LinuxCPUs: provide stub methods 2013-08-15 22:46:57 -07:00
Shaun Jackman
f7b8fb1da0 os/linux/hardware: uname -m may be /i[3-6]86/
Closes homebrew/linuxbrew#16

Closes Homebrew/homebrew#20903.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-06-29 13:15:59 -05:00
Jack Nagel
dc454aad92 Freeze optimization flags hash rather than duping it 2013-06-14 10:34:17 -05:00
Sebastian Staudt
5c17405982 LinuxCPUs: Fix method alias
Closes Homebrew/homebrew#18683.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-03-23 14:23:03 -05:00
Misty De Meo
2476801613 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
258d70028f Portability fixes to run Homebrew on Linux systems
Closes Homebrew/homebrew#16344.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-11 18:26:25 +00:00