I have tried several methods for build and install gcc-5.4.0 on my PC;
I ran this code:
GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"
cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2
cd gcc-${GCC_VERSION}
./contrib/download_prerequisites
cd ..
mkdir gcc-build
cd gcc-build
../gcc-${GCC_VERSION}/configure \
--prefix=${INSTALLDIR} \
--enable-shared \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--enable-languages=all \
&& make \
&& make install
which did not work; telling me that I should disable multi-lib.
I did it using this code:
GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"
cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2
cd gcc-${GCC_VERSION}
./contrib/download_prerequisites
cd ..
mkdir gcc-build
cd gcc-build
../gcc-${GCC_VERSION}/configure \
--prefix=${INSTALLDIR} \
--enable-shared \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--enable-languages=all \
--disable-multilib \
&& make \
&& make install
which was running for almost half an hour and made a directory as big as 1 GB. So I doubted the source file and interrupted it.
Then I tried downloading gcc-5.4.0 from another source.
Compiled with the following command:
GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"
cd $WORKDIR
wget http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2
cd gcc-${GCC_VERSION}
./contrib/download_prerequisites
cd ..
mkdir gcc-build
cd gcc-build
../gcc-${GCC_VERSION}/configure \
--prefix=${INSTALLDIR} \
--disable-multilib \
--enable-shared \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--enable-languages=all \
&& make \
&& make install
Again I got an error, do you know any direct way that I can do that?
gcc-5
package from official repository? Do you plan to use it as cross-compiler? – N0rbert Jan 15 '19 at 19:10