Skip to content

kenny-jp/how_compile_gcc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

How to build gcc

install dependancies:

sudo apt install bison \
                 build-essential \
                 flex \
                 libgmp-dev \   
                 libmpc-dev \       
                 libmpfr-dev \
                 texinfo     

Download GCC sources

link

build and install:

tar -xvf gcc-x.y.z.tar.gz
cd gcc-x.y.z
./configure --prefix=/usr/local \
            --enable-languages=c,c++ \
            --disable-multilib \
            --program-suffix=-[gcc_version] \
            --enable-shared \
            --enable-threads=posix \
            --enable-checking=release \
            --enable-bootstrap \
            --enable-lto
make -j$(nproc)
make check (optional)
sudo make install