Build gcc-6.2.0 gcc-6.2.0ビルド
I'll keep gcc to the latest version. gccを最新版にしておこう。By the way, the current gcc version of debian jessie is 4.9.2.
ちなみに、debian jessie の現在のgccのバージョンは4.9.2 である。
Build gmp-6.1.1 gmp-6.1.1ビルド
root@jesse:~# wget https://gmplib.org/download/gmp/gmp-6.1.1.tar.lz root@jesse:~# tar xf gmp-6.1.1.tar.lz root@jesse:~# cd gmp-6.1.1 root@jesse:~/gmp-6.1.1# mkdir build root@jesse:~/gmp-6.1.1# cd build root@jesse:~/gmp-6.1.1/build# ../configure --prefix=/usr/local/gmp-6.1.1 root@jesse:~/gmp-6.1.1/build# make -j 8 root@jesse:~/gmp-6.1.1/build# make install root@jesse:~/gmp-6.1.1/build# make clean root@jesse:~/gmp-6.1.1/build# cd ../..
Build mpfr-3.1.5 mpfr3.1.5ビルド
root@jesse:~# wget http://www.mpfr.org/mpfr-current/mpfr-3.1.5.tar.xz root@jesse:~# tar xf mpfr-3.1.5.tar.xz root@jesse:~# cd mpfr-3.1.5 root@jesse:~/mpfr-3.1.5# mkdir build root@jesse:~/mpfr-3.1.5# cd build root@jesse:~/mpfr-3.1.5/build# ../configure --prefix=/usr/local/mpfr-3.1.5 --with-gmp=/usr/local/gmp-6.1.1 root@jesse:~/mpfr-3.1.5/build# make -j 8 root@jesse:~/mpfr-3.1.5/build# make install root@jesse:~/mpfr-3.1.5/build# make clean root@jesse:~/mpfr-3.1.5/build# cd ../..
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.1 --with-mpfr=/usr/local/mpfr-3.1.5 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 root@jesse:~/mpc-1.0.3/build# cd ../..
Build gcc-6.2.0 gcc-6.2.0ビルド
root@jesse:~# wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-6.2.0/gcc-6.2.0.tar.gz root@jesse:~# tar xf gcc-6.2.0.tar.gz root@jesse:~# cd gcc-6.2.0 root@jesse:~/gcc-6.2.0# mkdir build root@jesse:~/gcc-6.2.0# cd build root@jesse:~/gcc-6.2.0/build# ../configure --prefix=/usr/local/gcc-6.2.0 --with-gmp=/usr/local/gmp-6.1.1 --with-mpfr=/usr/local/mpfr-3.1.5 --with-mpc=/usr/local/mpc-1.0.3 --disable-multilib --enable-languages=c,c++ root@jesse:~/gcc-6.2.0/build# make -j 8 root@jesse:~/gcc-6.2.0build# make check root@jesse:~/gcc-6.2.0/build# make install root@jesse:~/gcc-6.2.0/build# make clean root@jesse:~/gcc-6.2.0/build# cd ../..
Version check and symbolic link create
バージョン確認とシンボリックリンク作成
root@jesse:~# /usr/local/gcc-6.2.0/bin/gcc --version Copyright (C) 2016 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-6.2.0/bin/gcc /usr/local/bin/gcc-6.2.0 root@jesse:~# gcc-6.2.0 --version Copyright (C) 2016 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).
Somehow, 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:~# gcc-6.2.0 -o hello hello.c root@jesse:~# ./hello Hello gcc-6.2.0
Gargle with one million digits of pi.
百万桁の円周率でうがい
hiroaki@jesse:~/suzuki$ make clean rm -f pi rm -f pi505 rm -f pi510 rm -f pi512 rm -f pi513 rm -f pi600 rm -f pi610 rm -f pi611 hiroaki@jesse:~/suzuki$ make pi505 gcc-6.2.0 -static -O3 -m64 -mtune=amdfam10 -fopenmp -g -I/usr/local/gmp-5.0.5/include pi.c -o pi505 /usr/local/gmp-5.0.5/lib/libgmp.a hiroaki@jesse:~/suzuki$ make pi510 gcc-6.2.0 -static -O3 -m64 -mtune=amdfam10 -fopenmp -g -I/usr/local/gmp-5.1.0/include pi.c -o pi510 /usr/local/gmp-5.1.0/lib/libgmp.a hiroaki@jesse:~/suzuki$ make pi600 gcc-6.2.0 -static -O3 -m64 -mtune=amdfam10 -fopenmp -g -I/usr/local/gmp-6.0.0/include pi.c -o pi600 /usr/local/gmp-6.0.0/lib/libgmp.a hiroaki@jesse:~/suzuki$ make pi611 gcc-6.2.0 -static -O3 -m64 -mtune=amdfam10 -fopenmp -g -I/usr/local/gmp-6.1.1/include pi.c -o pi611 /usr/local/gmp-6.1.1/lib/libgmp.a hiroaki@jesse:~/suzuki$ time ./pi505 >/dev/null with gcc-6.2.0, gmp-5.0.5 real0m1.901s user0m1.812s sys0m0.088s hiroaki@jesse:~/suzuki$ time ./pi510 >/dev/null with gcc-6.2.0, gmp-5.1.0 real0m1.687s user0m1.624s sys0m0.060s hiroaki@jesse:~/suzuki$ time ./pi600 >/dev/null with gcc-6.2.0, gmp-6.0.0 real0m1.597s user0m1.500s sys0m0.096s hiroaki@jesse:~/suzuki$ time ./pi611 >/dev/null with gcc-6.2.0, gmp-6.1.1 real0m1.414s user0m1.332s sys0m0.080s hiroaki@jesse:~/suzuki$Wow! It became a little faster? That's within the range of error.
おっ! ちょびっと速くなった? 誤差の範囲内だな。
T: Y: ALL: Online:
ThemeSwitch
- Basic
Created in 0.0923 sec.
Comments