aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/development/gcc.md
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2021-11-28 23:26:28 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2021-11-28 23:26:28 +0100
commit6660154d7eaae83f3e8765af8b93dcd651e05452 (patch)
tree26a9f782c98e9c4980a414b644d5f093b7f9cd7b /src/development/gcc.md
parentc1e3312a519d175908288deba2ec8d7585e4a8fe (diff)
downloadnotes-6660154d7eaae83f3e8765af8b93dcd651e05452.tar.gz
notes-6660154d7eaae83f3e8765af8b93dcd651e05452.zip
gcc: add notes on getting target info
Diffstat (limited to 'src/development/gcc.md')
-rw-r--r--src/development/gcc.md9
1 files changed, 9 insertions, 0 deletions
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)`