Build gcc-5.3.0 gcc-5.3.0ビルド

I'll keep gcc to the latest version. gccを最新版にしておこう。

Build mpfr-3.1.3 mpfr3.1.3ビルド

root@jesse:~# wget http://www.mpfr.org/mpfr-current/mpfr-3.1.3.tar.xz
root@jesse:~# tar xf mpfr-3.1.3.tar.xz
root@jesse:~# cd mpfr-3.1.3
root@jesse:~/mpfr-3.1.3# mkdir build
root@jesse:~/mpfr-3.1.3# cd build
root@jesse:~/mpfr-3.1.3/build# ../configure --prefix=/usr/local/mpfr-3.1.3
root@jesse:~/mpfr-3.1.3/build# make -j 8
root@jesse:~/mpfr-3.1.3/build# make install
root@jesse:~/mpfr-3.1.3/build# make clean

Build gmp-6.1.0 gmp-6.1.0ビルド

root@jesse:~# wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.xz
root@jesse:~# tar xf gmp-6.1.0.tar.xz
root@jesse:~# cd gmp-6.1.0
root@jesse:~/gmp-6.1.0# mkdir build
root@jesse:~/gmp-6.1.0# cd build
root@jesse:~/gmp-6.1.0/build# ../configure --prefix=/usr/local/gmp-6.1.0
root@jesse:~/gmp-6.1.0/build# make -j 8
root@jesse:~/gmp-6.1.0/build# make install
root@jesse:~/gmp-6.1.0/build# make clean

Build mpc-1.0.3 mpc-1.0.3ビルド

root@jesse:~# wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
root@jesse:~# tar xf mpc-1.0.3.tar.gz
root@jesse:~# cd mpc-1.0.3
root@jesse:~/mpc-1.0.3# mkdir build
root@jesse:~/mpc-1.0.3# cd build
root@jesse:~/mpc-1.0.3/build# ../configure --prefix=/usr/local/mpc-1.0.3 --with-gmp=/usr/local/gmp-6.1.0 --with-mpfr=/usr/local/mpfr-3.1.3
root@jesse:~/mpc-1.0.3/build# make -j 8
root@jesse:~/mpc-1.0.3/build# make install
root@jesse:~/mpc-1.0.3/build# make clean

Build gcc-5.3.0 gcc-5.3.0ビルド

root@jesse:~# wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz
root@jesse:~# tar xf gcc-5.3.0.tar.gz
root@jesse:~# cd gcc-5.3.0
root@jesse:~/gcc-5.0.3# mkdir build
root@jesse:~/gcc-5.0.3# cd build
root@jesse:~/gcc-5.0.3/build# ../configure --prefix=/usr/local/gcc-5.3.0 --with-gmp=/usr/local/gmp-6.1.0 --with-mpfr=/usr/local/mpfr-3.1.3 --with-mpc=/usr/local/mpc-1.0.3 --disable-multilib --enable-languages=c,c++
root@jesse:~/gcc-5.0.3/build# make -j 8
root@jesse:~/gcc-5.0.3/build# make check
root@jesse:~/gcc-5.0.3/build# make install
root@jesse:~/gcc-5.0.3/build# make clean

Version check and symbolic link create

バージョン確認とシンボリックリンク作成

/bin/gc
root@jesse:~# /usr/local/gcc-5.3.0/bin/gc c   --version
gcc (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@jesse:~# ln -s /usr/local/gcc-5.3.0/bin/gc c /usr/local/bin/gc c530
root@jesse:~# gcc530 --version
gcc530 (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*Annotation: /bin/gc c --> /bin/gcc(Half size).
For some reason, an error occurs in PHP.
*注: /bin/gc c --> /bin/gcc(半角).
何故か、PHPでエラーが起こる。

Operation check 動作確認

root@jesse:~# cat hello.c
#include        <stdio.h>

int main (int argc,  char *argv[]) {

    printf("Hello gcc-%d.%d.%d\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);

}
root@jesse:~# gcc530 -o hello hello.c
root@jesse:~# ./hello
Hello gcc-5.3.0

Gargle in one million digits pi

百万桁の円周率でうがい

hiroaki@jesse:~/suzuki$ make clean
rm -f pi
rm -f pi510
rm -f pi512
rm -f pi513
rm -f pi600
rm -f pi610
hiroaki@jesse:~/suzuki$ make pi610
gcc530 -static -O3 -m64 -mtune=amdfam10 -fopenmp -g -I/usr/local/gmp-6.1.0/include pi.c  -o pi610 /usr/local/gmp-6.1.0/lib/libgmp.a

hiroaki@jesse:~/suzuki$ time ./pi610 > pi.txt
with gcc-5.3.0, gmp-6.1.0

real0m1.522s
user0m1.484s
sys0m0.032s
Wow! It became a little faster? That's within the range of error.
おっ! ちょびっと速くなった? 誤差の範囲内だな。
gcc-4.4.5/gmp-5.1.0: 1.618sec
gcc-5.3.0/gmp-6.1.0: 1.522sec (6%SpeedUp)

T: Y: ALL: Online:
ThemeSwitch
  • Basic
Created in 0.0187 sec.
prev
2024.11
next
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
 
strawberry-linux geigercounter Ver.2
Sibasaki, Cyofu City, Tokyo, JAPAN
blogBar