]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add a bootstrap-native build config
authorAndi Kleen <ak@gcc.gnu.org>
Tue, 30 Jul 2024 16:39:48 +0000 (09:39 -0700)
committerAndi Kleen <ak@gcc.gnu.org>
Fri, 23 May 2025 22:24:21 +0000 (15:24 -0700)
... that uses -march=native -mtune=native to build a compiler optimized
for the host.

config/ChangeLog:

* bootstrap-native.mk: New file.

gcc/ChangeLog:

* doc/install.texi: Document bootstrap-native.

config/bootstrap-native.mk [new file with mode: 0644]
gcc/doc/install.texi

diff --git a/config/bootstrap-native.mk b/config/bootstrap-native.mk
new file mode 100644 (file)
index 0000000..a4a3d85
--- /dev/null
@@ -0,0 +1 @@
+BOOT_CFLAGS := -march=native -mtune=native $(BOOT_CFLAGS)
index 1af0082ed772978cc3161b55ca0fcc4d97ffe2d5..ff083360be213c26ea6100b469e08260f4834309 100644 (file)
@@ -3144,6 +3144,13 @@ Removes any @option{-O}-started option from @code{BOOT_CFLAGS}, and adds
 @itemx @samp{bootstrap-Og}
 Analogous to @code{bootstrap-O1}.
 
+@item @samp{bootstrap-native}
+@itemx @samp{bootstrap-native}
+Optimize the compiler code for the build host, if supported by the
+architecture. Note this only affects the compiler, not the targeted
+code. If you want the later, choose options suitable to the target you
+are looking for. For example @samp{--with-cpu} would be a good starting point.
+
 @item @samp{bootstrap-lto}
 Enables Link-Time Optimization for host tools during bootstrapping.
 @samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding