From: Andi Kleen Date: Tue, 30 Jul 2024 16:39:48 +0000 (-0700) Subject: Add a bootstrap-native build config X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57f8cc4601454c797d0857201b26f9a7c2893933;p=thirdparty%2Fgcc.git Add a bootstrap-native build config ... 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. --- diff --git a/config/bootstrap-native.mk b/config/bootstrap-native.mk new file mode 100644 index 00000000000..a4a3d859408 --- /dev/null +++ b/config/bootstrap-native.mk @@ -0,0 +1 @@ +BOOT_CFLAGS := -march=native -mtune=native $(BOOT_CFLAGS) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 1af0082ed77..ff083360be2 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -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