Fix ELF architecture offset for x86_64

The current offset results in ELF binaries returning an `#arch` of
`:dunno`.

Also, skip the `check_binary_arches` audit on the generic OS.
This commit is contained in:
Carlo Cabrera 2021-07-18 16:55:57 +08:00
parent 488ccfdf70
commit d696250ddb
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
2 changed files with 3 additions and 1 deletions

View File

@ -316,6 +316,8 @@ module FormulaCellarChecks
def check_binary_arches(formula)
return unless formula.prefix.directory?
# There is no `binary_executable_or_library_files` method for the generic OS
return if !OS.mac? && !OS.linux?
keg = Keg.new(formula.prefix)
mismatches = keg.binary_executable_or_library_files.reject do |file|

View File

@ -33,7 +33,7 @@ module ELFShim
private_constant :ARCHITECTURE_POWERPC
ARCHITECTURE_ARM = 0x28
private_constant :ARCHITECTURE_ARM
ARCHITECTURE_X86_64 = 0x62
ARCHITECTURE_X86_64 = 0x3E
private_constant :ARCHITECTURE_X86_64
ARCHITECTURE_AARCH64 = 0xB7
private_constant :ARCHITECTURE_AARCH64