Shaun Jackman
b79e047e12
Merge pull request #7780 from rmNULL/enable-patchelfrb-for-devs
...
enable patchelf.rb when HOMEBREW_DEVELOPER is set
2020-06-22 13:59:43 -07:00
rmnull
6106bfc497
Enable patchelf.rb for HOMEBREW_DEVELOPERs.
...
HOMEBREW_PATCHELF_RB is enabled on 2 cases.
1) `HOMEBREW_PATCHELF_RB` is set
2) `HOMEBREW_DEVELOPER` is set , and `HOMEBREW_NO_PATCHELF_RB` is not set.
use `HOMEBREW_NO_PATCHELF_RB` to turn it off for devs.
Note: When HOMEBREW_PATCHELF_RB and HOMEBREW_NO_PATCHELF_RB both are
present, it is on
2020-06-23 00:11:50 +05:30
rmnull
3f211415ca
don't warn "no interpreter found" for Shared ELF objects.
2020-06-22 01:24:03 +05:30
rmnull
486114282c
In ELFShim, #needed_libraries, #dynamic_elf? and #with_interpreter? check using patchelf gem.
...
Having HOMEBREW_PATCHELF_RB set in the ENV,
will conditionally install patchelf.rb gem,
use patchelf.rb in the above mentioned methods.
The installed vendored gems are listed in .gitignore
to maintain a clean state.
2020-06-19 21:23:57 +05:30
Maxim Belkin
7b08e2252e
os/linux/glibc.rb: up minimum glibc version to 2.13
2020-05-17 20:14:05 -05:00
rmnull
69e1673a81
skip needed_libraries check when patchelf is the bottle being installed.
2020-05-15 05:36:49 +05:30
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig.
2020-04-07 09:58:26 +01:00
Issy Long
b87782ef7d
Auto-fix Style/UnpackFirst offenses
2019-10-13 16:04:34 +01:00
Dawid Dziurla
8ff7601a92
define default prefix constants
...
also use them to detect if prefix line in bottle block is needed
2019-09-30 16:46:53 +02:00
Cheng XU
2c82623318
keg_relocate: relocate the interpreter for elf files with INTERP header (Linux)
...
Some elf files (e.g. created by rust compiler) have INTERP header despite
their magic header denotes shared object instead of executable.
We should relocate the interpreter elf files as long as they have INTERP header.
This should fix the broken bottles for rust based formulae.
2019-07-18 15:22:43 +08:00
Cheng XU
3ab93b6e2b
elf: fix caching of dynamic_elf?
2019-07-18 15:22:43 +08:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files.
2019-04-20 13:27:36 +09:00
Mike McQuaid
d1ea6f38d3
Fix mutable constants violations.
2019-04-19 21:46:20 +09:00
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