Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

CPU: Support PowerPC [Linux] #527

Merged
merged 1 commit into from Nov 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion Library/Homebrew/extend/os/linux/hardware/cpu.rb
Expand Up @@ -37,13 +37,16 @@ def type
:intel
when /^arm/
:arm
when /^ppc/
:ppc
else
:dunno
end
end

def family
return :arm if arm?
return :ppc if ppc?
return :dunno unless intel?
# See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
Expand Down Expand Up @@ -98,7 +101,7 @@ def cores
end

def flags
@flags ||= cpuinfo[/^(flags|Features).*/, 0].split
@flags ||= cpuinfo[/^(flags|Features).*/, 0]&.split || []
end

# Compatibility with Mac method, which returns lowercase symbols
Expand Down