gcc
- Disable bootstrap; stage1 is good enough
 - Use a different 
libexecdir bootstrap-ltobuild configuration adjustsCFLAGSandLDFLAGSbootstrap-lto-leanhas to be used withmake profiledbootstrapbootstrap-debug-leanis slower and bigger compared tobootstrap-debugBOOT_CFLAGS,BOOT_LDFLAGSand--with-boot-ldflagsonly make sense when bootstrapping gcc; applies to stages 2 and 3LD_FOR_TARGET,STAGE1_CFLAGSandSTAGE1_LDFLAGSapply to stage 1--enable-link-mutexhas been deprecated, use--enable-link-serialization=1instead: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109310 (=1is sane, any higher value might thrash the system)cc1depends onmpcat run time- Depends on 
tarfor themaketargetinstall-headers-tar - As of 14.1, new configure options 
--enable-host-pie, to build the compiler executables as PIE; and--enable-host-bind-now, to link the compiler executables with-Wl,-z,nowto enable additional hardening --enable-host-sharedhas a performance penalty ongcc- Might need a lex/flex library 
libfl.a: 
checking for lex library... not foundconfigure: WARNING: required lex library not found; giving up on touch lex.yy.cBOOT_CXXFLAGShas been deprecatedCFLAGS,CXXFLAGS,CFLAGS_FOR_TARGETandCXXFLAGS_FOR_TARGETare being picked up from the environment; the latter two are automatically assigned to the former two- Check 
clocaleto use forlibstdc++;genericvs--disable-clocale? libgcc_s.so.1size dramatically reduced when using stage1 flags (from ~ 830k to ~ 170k)otoolis for mach os, and is part of LLVM; theotoolnot found error is normal forgcc- Move cpp from lib to bin?
 - The following (ignored) errors occur when building 
libstdc++-v3(in all stages): 
libstdc++-v3.log:945:make[1]: [Makefile:1831: x86_64-glaucus-linux-musl/bits/largefile-config.h] Error 1 (ignored)libstdc++-v3.log:946:make[1]: [Makefile:1832: x86_64-glaucus-linux-musl/bits/largefile-config.h] Error 1 (ignored)According to tmp/gcc/gcc-14.2.0/build/x86_64-glaucus-linux-musl/libstdc++-v3/include/Makefile:
...# This header is not installed, it's only used to build libstdc++ itself.${host_builddir}/largefile-config.h: ${CONFIG_HEADER} stamp-${host_alias}  @rm -f $@.tmp  @-grep 'define _DARWIN_USE_64_BIT_INODE' ${CONFIG_HEADER} >> $@.tmp  @-grep 'define _FILE_OFFSET_BITS' ${CONFIG_HEADER} >> $@.tmp  @-grep 'define _LARGE_FILES' ${CONFIG_HEADER} >> $@.tmp  @mv $@.tmp $@...and indeed if we check tmp/gcc/gcc-14.2.0/build/x86_64-glaucus-linux-musl/libstdc++-v3/include/x86_64-glaucus-linux-musl/bits/largefile-config.h:
# define _DARWIN_USE_64_BIT_INODE 1which means that the first @-grep is working, while the latter two are not causing these two Error 1 (ignored) messages; and no this is not related to a race condition and it does not go away neither with -j 1 nor with --disable-largefile
- No need to fix headers or includes on glaucus
 libsupc++is the ABI library and it is a subset oflibstdc++- Alpine sets 
libat_cv_have_ifunc=nobefore gcc configure; related to libatomic, and Alpaquita are providing ifunc and are not setting this variable - Alpine uses 
gcc-goto bootstrap go -fstack-protector-strongis the default; no need to lowerssp-buffer-sizefrom the default8to4, but glaucus still does it- Sanitizers can be enabled with musl on 
x86-64(according to alpine) - Do we need to remove 
usr/lib/gcc/x86_64-glaucus-linux-musl/$ver/install-tools/(andinclude-fixed/)? - Patching 
gccto linklibatomicto everything is not needed onx86_64(Alpine enables it forriscv64) 
References
Section titled “References”- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106162
 - https://gcc.gnu.org/install/build.html
 - https://gcc.gnu.org/install/configure.html
 - https://gcc.gnu.org/install/specific.html
 - https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
 - https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
 - https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
 - https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html
 - https://github.com/dslm4515/Musl-LFS/issues/74
 - https://wiki.osdev.org/Building_GCC