nice, thanks, but I am unsure that it is a good idea to put this to /usr/local and overlay the existing environment
might make it difficult to install packages via sbo
I personal prefer installing trial gcc versions into a custom folder, and have a script to activate it.
so I can test it, but keep a clean system
on a old RHEL 6 32 bit I use this for building
Code:
GCCVERSION=6.3.0
../configure \
--prefix=$HOME/local/opt/gcc-$GCCVERSION \
--libdir=$HOME/local/opt/gcc-$GCCVERSION/lib \
--enable-lto \
--disable-nls \
--enable-languages=c,c++
make -j$(nproc) && make install
and this for activation of the gcc envrionment
Code:
GCCVERSION=6.3.0
export GCCDIR=$HOME/local/opt/gcc-$GCCVERSION
export LIBDIR=$GCCDIR/lib:/usr/local/lib
export PATH=$GCCDIR/bin:$PATH
export LD_LIBRARY_PATH=$LIBDIR
export C_INCLUDE_PATH=$GCCDIR/include
export CXX_INCLUDE_PATH=$GCCDIR/include/c++/$GCCVERSION
export CC=$GCCDIR/bin/i686-pc-linux-gnu-gcc
export CXX=$GCCDIR/bin/i686-pc-linux-gnu-g++
doing so makes it easy to test several gcc versions in different configurations on 1 system.
maybe you want to put something this in your build? than I don't need to build it self anymore,