[FE training-materials-updates] Toolchains: make -march, -mtune and -mcpu explanations a little more correct
Michael Opdenacker
michael.opdenacker at free-electrons.com
Tue Jun 13 06:32:44 CEST 2017
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=f164ca31e012b1ee983e8d218df75b31d71424dd
>---------------------------------------------------------------
commit f164ca31e012b1ee983e8d218df75b31d71424dd
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Tue Jun 13 06:32:44 2017 +0200
Toolchains: make -march, -mtune and -mcpu explanations a little more correct
- The primary options are -march and -mtune, not -march and -mcpu
- -mcpu can be used as a shortcut, guessing the instruction set from
the cpu name.
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
f164ca31e012b1ee983e8d218df75b31d71424dd
.../sysdev-toolchains-options/sysdev-toolchains-options.tex | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/slides/sysdev-toolchains-options/sysdev-toolchains-options.tex b/slides/sysdev-toolchains-options/sysdev-toolchains-options.tex
index 65675d5..57fe638 100644
--- a/slides/sysdev-toolchains-options/sysdev-toolchains-options.tex
+++ b/slides/sysdev-toolchains-options/sysdev-toolchains-options.tex
@@ -48,16 +48,19 @@
\begin{itemize}
\item A set of cross-compiling tools is specific to a CPU architecture (ARM,
x86, MIPS, PowerPC)
- \item However, with the \code{-march=}, \code{-mcpu=},
- \code{-mtune=} options, one can select more precisely the
- target CPU type
+ \item However, gcc offers further options:
\begin{itemize}
- \item For example, \code{-march=armv7 -mcpu=cortex-a8}
+ \item \code{-march} allows to select a specific target instruction set
+ \item \code{-tune} allows to optimize code for a specific CPU
+ \item For example: \code{-march=armv7 -mtune=cortex-a8}
+ \item \code{-mcpu=cortex-a8} can be used instead to allow gcc to infer the target
+ instruction set (\code{-march=armv7}) and cpu optimizations (\code{-mtune=cortex-a8})
+ \item \url{https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html}
\end{itemize}
\item At the toolchain compilation time, values can be chosen. They are used:
\begin{itemize}
\item As the default values for the cross-compiling tools, when no
- other \code{-march}, \code{-mcpu}, \code{-mtune} options are
+ other \code{-march}, \code{-mtune}, \code{-mcpu} options are
passed
\item To compile the C library
\end{itemize}
More information about the training-materials-updates
mailing list