Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
oldest_cpu: Bottling architecture of ARM is armv6
armv6 is the oldest supported 32-bit ARM architecture
armv8-a is the oldest 64-bit ARM architecture.

See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
and https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html
  • Loading branch information
sjackman committed May 16, 2018
1 parent 7b31a3d commit 5ca7cd3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Library/Homebrew/hardware.rb
Expand Up @@ -9,6 +9,8 @@ class << self
OPTIMIZATION_FLAGS = {
core2: "-march=core2",
core: "-march=prescott",
armv6: "-march=armv6",
armv8: "-march=armv8-a",
dunno: "-march=native",
}.freeze

Expand Down Expand Up @@ -147,6 +149,12 @@ def self.oldest_cpu
else
:core
end
elsif Hardware::CPU.arm?
if Hardware::CPU.is_64_bit?
:armv8
else
:armv6
end
else
Hardware::CPU.family
end
Expand Down

0 comments on commit 5ca7cd3

Please sign in to comment.