GCC: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
GCC installation: | GCC installation: | ||
* download gcc-4.9.4.tar.gz from one of mirrors (for example http://mirrors.concertpass.com/gcc/releases/) and put it in /usr/downloads/ | * download gcc-4.9.4.tar.gz from one of mirrors (for example http://mirrors.concertpass.com/gcc/releases/, or http://ftp.gnu.org/gnu/gcc/gcc-11.5.0/) and put it in /usr/downloads/ | ||
* download gmp-4.3.2.tar.bz2, mpfr-2.4.2.tar.bz2, mpc-0.8.1.tar.gz (similar place, for example http://mirrors.concertpass.com/gcc/infrastructure/) and put it in /usr/downloads/ | * download gmp-4.3.2.tar.bz2, mpfr-2.4.2.tar.bz2, mpc-0.8.1.tar.gz (and isl-0.18.tar.bz2 ?????) (similar place, for example http://mirrors.concertpass.com/gcc/infrastructure/) and put it in /usr/downloads/ | ||
* set for gcc11.3 (based on command ''contrib/download_prerequisites''): | |||
gmp-6.1.0.tar.bz2: OK | |||
mpfr-3.1.6.tar.bz2: OK | |||
mpc-1.0.3.tar.gz: OK | |||
isl-0.18.tar.bz2: OK | |||
* ''mkdir /apps/gcc'' if does not exist | * ''mkdir /apps/gcc'' if does not exist | ||
* ''cd /apps/gcc'' and copy | * ''cd /apps/gcc'' and run ''contrib/download_prerequisites''; it may not get needed pachages because of firewall, but it will tell what is needed; copy it manually, for example: | ||
cp /usr/downloads/gcc-8.3.0.tar.gz . | cp /usr/downloads/gcc-8.3.0.tar.gz . | ||
cp /usr/downloads/gmp-6.1.0.tar.bz2 . | cp /usr/downloads/gmp-6.1.0.tar.bz2 . | ||
Line 18: | Line 20: | ||
cp /usr/downloads/mpc-1.0.3.tar.gz . | cp /usr/downloads/mpc-1.0.3.tar.gz . | ||
* ./configure --prefix=/apps/gcc/8.3.0 --enable-languages=c,c++,fortran | |||
* ./configure --prefix=/apps/gcc/ | |||
NOTE: possible options can be checked on https://gcc.gnu.org/install/configure.html | NOTE: possible options can be checked on https://gcc.gnu.org/install/configure.html | ||
Line 49: | Line 29: | ||
'''ARM installation''' | |||
ssh to any vtp board as root, go to /apps/gcc, copy gcc-8.3.0.tar.xz from /usr/downloads. Untar it and type following: | |||
cd gcc-8.3.0/ | |||
export ALL_PROXY=http://jprox:8082 | |||
contrib/download_prerequisites | |||
./configure --prefix=/apps/gcc/8.3.0 --enable-languages=c,c++,fortran --with-float=hard | |||
make | |||
make install | |||
'''NOTE''': if ''export ALL_PROXY'' above does not work, copy corresponding packages into ''gcc-8.3.0/'' manually. | |||
Latest revision as of 16:01, 17 September 2025
GCC installation:
- download gcc-4.9.4.tar.gz from one of mirrors (for example http://mirrors.concertpass.com/gcc/releases/, or http://ftp.gnu.org/gnu/gcc/gcc-11.5.0/) and put it in /usr/downloads/
- download gmp-4.3.2.tar.bz2, mpfr-2.4.2.tar.bz2, mpc-0.8.1.tar.gz (and isl-0.18.tar.bz2 ?????) (similar place, for example http://mirrors.concertpass.com/gcc/infrastructure/) and put it in /usr/downloads/
- set for gcc11.3 (based on command contrib/download_prerequisites):
gmp-6.1.0.tar.bz2: OK mpfr-3.1.6.tar.bz2: OK mpc-1.0.3.tar.gz: OK isl-0.18.tar.bz2: OK
- mkdir /apps/gcc if does not exist
- cd /apps/gcc and run contrib/download_prerequisites; it may not get needed pachages because of firewall, but it will tell what is needed; copy it manually, for example:
cp /usr/downloads/gcc-8.3.0.tar.gz . cp /usr/downloads/gmp-6.1.0.tar.bz2 . cp /usr/downloads/mpfr-3.1.4.tar.bz2 . cp /usr/downloads/mpc-1.0.3.tar.gz .
- ./configure --prefix=/apps/gcc/8.3.0 --enable-languages=c,c++,fortran
NOTE: possible options can be checked on https://gcc.gnu.org/install/configure.html
- make
- make install
ARM installation
ssh to any vtp board as root, go to /apps/gcc, copy gcc-8.3.0.tar.xz from /usr/downloads. Untar it and type following:
cd gcc-8.3.0/ export ALL_PROXY=http://jprox:8082 contrib/download_prerequisites ./configure --prefix=/apps/gcc/8.3.0 --enable-languages=c,c++,fortran --with-float=hard make make install
NOTE: if export ALL_PROXY above does not work, copy corresponding packages into gcc-8.3.0/ manually.
info from Kelvin:
# # Quick note on how I built gcc 4.9.2 # 0) ensure the environment variable CCC does *not* exist prior to configure 1) make sure /apps/(gmp, mpc, mpfr, isl) exist 2) foreach (gmp, mpc, mpfr, isl) create lib/shared and mv *.so* into it -- This is so that gcc links (statically) with the required libraries and, thus, does not need to have LD_LIBRARY_PATH set for compiling. 3) setup a separate build environment for gcc (gcc-4.9.2-obj) 3) do the configure (note that this only builds teh 64bit gcc compiler): ../gcc-4.9.2/configure --prefix=/apps/gcc/4.9.2 --with-gmp=/apps/gmp --with-mpfr=/apps/mpfr --with-mpc=/apps/mpc --with-isl=/apps/isl/0.12.2 --disable-multilib --enable-languages=c,c++,fortran 4) make 5) make install 6) make clean 7) go back and mv [gmp, mpc, mpfr, isl]/lib/shared/*.so* to appropriate lib area 8) Create /site/cuesw/gcc/4.9.2/use.conf