Skip to content

Commit 5ca7cd3

Browse files
committed
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
1 parent 7b31a3d commit 5ca7cd3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Library/Homebrew/hardware.rb

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class << self
99
OPTIMIZATION_FLAGS = {
1010
core2: "-march=core2",
1111
core: "-march=prescott",
12+
armv6: "-march=armv6",
13+
armv8: "-march=armv8-a",
1214
dunno: "-march=native",
1315
}.freeze
1416

@@ -147,6 +149,12 @@ def self.oldest_cpu
147149
else
148150
:core
149151
end
152+
elsif Hardware::CPU.arm?
153+
if Hardware::CPU.is_64_bit?
154+
:armv8
155+
else
156+
:armv6
157+
end
150158
else
151159
Hardware::CPU.family
152160
end

0 commit comments

Comments
 (0)