On Sun, Oct 3, 2021 at 7:48 PM Bill Cunningham via Gcc-help < gcc-help@xxxxxxxxxxx> wrote: > Greetings I was wondering if there was a way I could compile a simple C > only compiler, as a learning experience, and just "extract" a simple C99 > compiler. To explain better, would there be a log or pathway that gcc > would create if I properly set the switches ec cetra to compile a C99 > compiler for the x86_64-pc-linux-gnu target and the log would show me > all the files used and I could "move" those files to a directory and > have a simple, smaller, gcc C compiler. > > This is for my own use to learn gcc and not to be made public. Use configure with --enable-languages=c This means only the C compiler is built. No C++, no Fortran, Objective C, etc... Of course you need a working C compiler to compile GCC. I don't know what system you're working on, but later versions of Linux distributions should have a new enough GCC to compile GCC from source. Also of note, the way GCC is currently built is such that the installation is relocatable. Say you install it into /usr/local/gcc. Then you can take the entire contents of /usr/local/gcc and move them to /opt/gcc and what is in the new location will Just Work (TM). Tom