From 6660154d7eaae83f3e8765af8b93dcd651e05452 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 28 Nov 2021 23:26:28 +0100 Subject: gcc: add notes on getting target info --- src/development/gcc.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/development/gcc.md') diff --git a/src/development/gcc.md b/src/development/gcc.md index f64bc2a..d3823f3 100644 --- a/src/development/gcc.md +++ b/src/development/gcc.md @@ -11,6 +11,15 @@ gcc -E [-dM] ... - `-E` run only preprocessor - `-dM` list only `#define` statements +### Target options +```bash +# List all target options with their description. +gcc --help=target + +# Configure for current cpu arch and query (-Q) value of options. +gcc -march=native -Q --help=target +``` + ## [Builtins][builtins] ### `__builtin_expect(expr, cond)` -- cgit v1.2.3