Carlo Cabrera
8a9ed2c48f
linux/keg_relocate: clean up GCC RPATH fix.
...
There are no more formulae in Homebrew/core that have a runtime
dependency on GCC (see Homebrew/homebrew-core#110883 ), so there is no
more need to retain linkage with GCC through a versioned path.
2022-09-22 00:53:56 +08:00
Carlo Cabrera
2d95b9acda
linux/keg_relocate: remove patchelf exemption
...
I don't think this is needed anymore. We probably needed this when we
used `patchelf` to do `RPATH` rewriting, but this is no longer the case.
2022-08-06 00:26:48 +08:00
Rylan Polster
d4ddfb88df
Merge pull request #13616 from Rylan12/simulate-macos-on-linux
...
Move `HOMEBREW_SIMULATE_MACOS_ON_LINUX` handling to `SimulateSystem`
2022-08-05 10:23:13 -04:00
Carlo Cabrera
1c0eac7874
Exclude GCC formulae from RPATH modification for GCC
2022-08-02 19:09:38 +08:00
Carlo Cabrera
532460c098
keg_relocate: fix new GCC lib directory
...
Also add comment explaining what this line does, along with a TODO
suggesting a replacement once we've shipped the GCC PR.
2022-08-02 13:29:14 +08:00
Carlo Cabrera
53fdb64113
keg_relocate (linux): prepend gcc/lib/current
to RPATH
when needed
...
This should help keep bottles that require GCC working when
Homebrew/homebrew-core#106755 is merged.
This only works on freshly-poured bottles. Previously installed bottles
will still break on systems with a host GCC older than GCC 11.
2022-08-02 11:02:47 +08:00
Rylan Polster
ea1f2098ac
Move HOMEBREW_SIMULATE_MACOS_ON_LINUX
handling to SimulateSystem
2022-07-28 15:04:25 -04:00
Bo Anderson
01d1f1ecb6
Fix Keg.bottle_dependencies
including unneeded build dependencies
2022-06-30 04:11:15 +01:00
Bo Anderson
2ddce84225
Remove Keg.relocation_formulae
...
We no longer use any formulae for relocation.
2022-06-30 03:39:29 +01:00
Rylan Polster
cff0122fc4
Remove unnecessary HOMEBREW_INSTALL_FROM_API checks
2022-06-15 16:35:50 -04:00
Bo Anderson
6db3ee6b0a
extend/os/linux/keg_relocate: restore checking only GCC major versions
2022-04-22 01:41:23 +01:00
xxyzz
990b61250a
Get gcc version from API to avoid downloading gcc bottles on Linux
2022-03-30 20:37:19 +08:00
Shaun Jackman
06bf91fe0b
Use formula_optionally_versioned_regex
...
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2022-01-02 17:30:34 -08:00
Shaun Jackman
2ad3f0a089
Patch neither glibc nor glibc@* using patchelf
...
Patching the dynamic linker of glibc breaks it.
2022-01-02 13:44:13 -08:00
Mike McQuaid
0cda6a0657
Only use patchelf.rb
...
Remove support for using the `patchelf` formula for writing as it's been
off by default for a long time now.
2021-10-19 15:15:56 +01:00
Dawid Dziurla
8d5dc50b68
keg_relocate: swap env var
2021-07-04 15:02:39 +02:00
Bo Anderson
ae49b06600
keg_relocate: replace Perl shebangs
2021-05-10 06:13:54 +01:00
Mike McQuaid
49642e4267
linux/keg_relocate: patchelf dependency is conditional.
...
This is only needed if we're not using `patchelf.rb`.
Partial fix for https://github.com/Homebrew/brew/issues/10784
2021-03-05 11:36:23 +00:00
Michka Popoff
0a292c7041
linux: use preferred_gcc instead of gcc
2021-02-09 21:48:48 +01:00
Markus Reiter
24ae318a3d
Move type annotations into files.
2020-10-10 14:59:39 +02:00
rmnull
649e02ba3d
patchelf.rb writing in ELFShim
2020-08-27 22:50:34 +05:30
rmnull
d607528a5b
introduce ELFShim#rpath, refactor keg_relocate to use the same.
...
refines PatchELF #runpath, #rpath #soname #interpreter
to return nil.
let Brew hard exits on PatchELF::PatchError.
Co-authored-by: Shaun Jackman <sjackman@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-07-25 01:07:24 +05:30
rmnull
35328ed535
[draft] refactoring keg_relocate to use ELFShim#interpreter instead of .with_interpreter?
2020-06-26 05:34:41 +05:30
rmnull
39c572b546
Instructions to install patchelf, when development tools cant locate patchelf.
2020-05-28 00:34:02 +05:30
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig.
2020-04-07 09:58:26 +01:00
Mike McQuaid
a7bfb80786
Revert "Do not run patchelf on portable-ruby [Linux]"
2019-10-10 15:16:30 +01:00
Shaun Jackman
1c6046c7e3
Do not run patchelf on portable-ruby [Linux]
...
Running patchelf on portable-ruby causes brew tests to segfault.
See https://github.com/Homebrew/brew/pull/6556
2019-10-09 09:21:04 -07: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
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files.
2019-04-20 13:27:36 +09:00
Mike McQuaid
3bde17c9f9
Cleanup from dev-cmd test changes
...
- Remove added whitespace in `extend/os/linux/keg_relocate`
- Cleanup testball bottles
2019-03-27 10:31:26 +00:00
Mike McQuaid
59d680a626
dev-cmd: only one integration test per command.
...
Integration tests are useful in detecting breakages but much slower so
let's only use one per command and install formula outside the
integration test framework (which is also slow).
2019-03-27 09:45:48 +00:00
Shaun Jackman
97a2c620a2
Merge pull request #5018 from sjackman/relocation-formulae
...
relocation_formulae: Poured bottles depend on gcc [Linux]
2018-10-23 11:15:42 -07:00
Shaun Jackman
385a05e5ae
Patching the dynamic linker of glibc breaks it [Linux]
2018-10-23 10:18:53 -07:00
Shaun Jackman
605e61095a
relocation_formulae: Poured bottles depend on gcc [Linux]
2018-10-23 09:03:20 -07:00
Shaun Jackman
afa975bf26
keg_relocate: Fix Error: wrong number of arguments [Linux]
...
Fix the error:
Error: wrong number of arguments (given 1, expected 2)
/projects/btl_scratch/sjackman/brew/Homebrew/Library/Homebrew/exceptions.rb:550:in `block in initialize'
/projects/btl_scratch/sjackman/brew/Homebrew/Library/Homebrew/exceptions.rb:559:in `map'
2018-10-02 15:16:32 -07:00
Markus Reiter
e9b9ea49a1
Update to RuboCop 0.59.1.
2018-09-17 03:45:59 +02:00
Markus Reiter
2712fcaa67
Use interleaved output for ErrorDuringExecution
.
2018-07-19 16:53:11 +02:00
Markus Reiter
2452b27866
Refactor ErrorDuringExecution
.
2018-07-19 16:41:27 +02:00
Shaun Jackman
1b688a3a25
Relocate bottles on Linux using patchelf
...
Ensure patchelf is installed to pour bottles and build bottles.
2018-07-12 10:21:26 -07:00