]> code.ossystems Code Review - openembedded-core.git/commitdiff
tune-corei7.inc: update TUNE_CCARGS -march CPU type corei7 -> nehalem
authorAndre McCurdy <armccurdy@gmail.com>
Thu, 26 Apr 2018 17:57:27 +0000 (10:57 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 May 2018 09:03:27 +0000 (10:03 +0100)
The gcc "corei7" CPU type was last documented in gcc 4.8.x and has
been undocumented from gcc 4.9.x onwards:

  https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/i386-and-x86-64-Options.html
  https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/i386-and-x86-64-Options.html

Although it still seems to be accepted by gcc 7.x, it's likely to be
deprecated and removed at some point. To preempt that, switch the
corei7 TUNE_CCARGS -march CPU type to "nehalem", which is the closest
replacement (and matches the CPU type already being passed to qemu).

Since the tune-corei7.inc include file is intended to cover a range
of CPUs from Nehalem onwards, switch the TUNE_CCARGS -mtune option
from "corei7" to "generic", which instructs gcc to produce code
optimized for the most common IA32/AMD64/EM64T processors.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/conf/machine/include/tune-corei7.inc

index 6edfb680e22717db671fce40aeed38cc2510cb20..9ce731c27a2896ee559b6d710c6f84ff27176cb0 100644 (file)
@@ -1,7 +1,7 @@
-# Settings for the GCC(1) cpu-type "corei7":
+# Settings for the GCC(1) cpu-type "nehalem":
 #
-#     Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1
-#     and SSE4.2 instruction set support.
+#     Intel Nehalem CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1,
+#     SSE4.2 and POPCNT instruction set support.
 #
 # This tune is recommended for Intel Nehalem and Silvermont (e.g. Bay Trail) CPUs
 # (and beyond).
@@ -11,10 +11,9 @@ DEFAULTTUNE ?= "corei7-64"
 # Pull in the previous tune in to pull in PACKAGE_EXTRA_ARCHS
 require conf/machine/include/tune-core2.inc
 
-
 # Extra tune features
 TUNEVALID[corei7] = "Enable corei7 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2', '', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=nehalem -mtune=generic -mfpmath=sse -msse4.2', '', d)}"
 
 # Extra tune selections
 AVAILTUNES += "corei7-32"