comparison CbC-INSTALL @ 29:cc07adb17855

deleting old commented out code.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Thu, 26 Nov 2009 13:27:48 +0900
parents
children 59194914942b
comparison
equal deleted inserted replaced
28:f2ea7e07d030 29:cc07adb17855
1
2 * CbC on GCCのインストール方法
3
4 まずはMercurialリポジトリから取得
5 hg clone ssh://one@firefly.cr/hg/CbC/GCC cbc-gcc
6 ビルド用ディレクトリへ
7 mkdir build-gcc; cd build-gcc
8 コンフィギュア
9 一般的には以下のconfigureでビルドできる
10 ../cbc-gcc/configure CFLAGS="-g3 -O0"
11 --prefix=$PWD/INSTALL_DIR --disable-nls \
12 --disable-bootstrap --enable-languages=c \
13 --enable-checking=tree,rtl,assert,types
14
15 -g3:
16 gdbでmacroの展開を可能にする
17 -O0:
18 gdbでトレースしやすいように、最適化をカット
19 --prefix:
20 インストールするベースディレクトリ
21 --enbale-checking:
22 デバグ用の指定、browse_treeやdebug_rtx、assertもこれでonになる
23 --disable-bootstrap:
24 通常、GCCは3回ビルドされる。それを最初の1回だけに限定
25 --disable-nls:
26 gettextのl10nをoffにしよう
27 --enable-language:
28 使用する言語 c|c++|ada ... もちろんCbCはcだけ
29 これもcbcを使えるようにしたい
30 ビルド
31 make && make install
32
33
34
35 * PowerPC Macでのインストール
36
37 最新のlibgmp, libmpfrをインストール
38 [gmp]
39 ./configure --enable-cxx --build=powerpc-apple-darwin9 --host=powerpc-apple-darwin9
40 make && make install
41 [mpfr]
42 ./configure --build=powerpc-apple-darwin9 --host=powerpc-apple-darwin9
43 make && make install
44 [CbC on GCC]
45 ../cbc-gcc/configure CFLAGS="-g3 -O0" --with-gmp=/usr/local
46 --with-mpfr=/usr/local --prefix=$PWD/INSTALL_DIR \
47 --disable-nls --disable-bootstrap --enable-languages=c \
48 --enable-checking=tree,rtl,assert,types
49 make && make install
50 もちろんインストール場所によってprefixは変更しよう
51
52
53
54
55 * PS3でのビルド
56 SPU
57 ../CbConGCC/configure --prefix=/usr/local/spu-cbc \
58 --build=powerpc --target=spu --program-prefix=spu- \
59 --disable-bootstrap --enable-checking=tree,rtl,assert \
60 --disable-nls --disable-shared --disable-threads \
61 --enable-languages=c --with-system-zlib --with-newlib \
62 --enable-version-specific-runtime-libs --disable-libssp \
63 --with-gnu-as -with-as=/usr/bin/spu-as --with-gnu-ld \
64 --with-ld=/usr/bin/spu-ld
65 PPU
66 binutils
67 $ tar xzvf binutils-...tar.gz
68 $ mkdir binutils_4ps3
69 $ cd binutils_4ps3
70 $ ../binutils../configure --prefix=$PWD/INSTALL_DIR
71 > --target=ppc64-yellowdog-linux
72 $ make install
73 $ cd ..
74 cross gcc
75 $ mkdir gcc_4ps3
76 $ PATH=$PWD/../binutils_4ps3/INSTALL_DIR/bin:$PATH
77 $ ../CbConGCC/configure --prefix=$PWD/INSTALL_DIR
78 > --enable-language=c --target=ppc64-yellowdog-linux
79 > --with-newlib --with-included-gettext --enable-shared
80 > --enable-threads
81 $ make
82
83
84
85 * 琉球大学総合情報センターのSolarisサーバでのビルド (sparc)
86
87 なぜかデフォルトのgccが自分のライブラリすら見てくれないのでパスを指定
88 export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/gcc:$HOME/opt/lib
89 export LIBRARY_PATH=/usr/local/lib:/usr/local/lib/gcc:$HOME/opt/lib
90 gmpのインストール
91 ./configure --prefix=$HOME/opt \
92 --build=sparc-sun-solaris \
93 --host=sparc-sun-solaris
94 make
95 make check
96 make install
97 libmpfrのインストール
98 ./configure --prefix=$HOME/opt/ \
99 --with-gmp=$HOME/opt
100 --build=sparc-sun-solaris \
101 --host=sparc-sun-solaris
102 make
103 make check
104 make install
105 # sparc-sun-solaris2.10の方がいいかもしれない
106 CbCをインストール
107 ../CbCGCC/configure --prefix=$PWD/INSTALL_DIR --disable-nls \
108 --disable-bootstrap --enable-languages=c \
109 --with-gmp=$HOME/opt --with-mpfr=$HOME/opt \
110 --build=sparc-sun-solaris2.10 --target=sparc-sun-solaris2.10 \
111 --host=sparc-sun-solaris2.10 --enable-shared \
112 --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld
113 make
114 make install
115 ビルドは可能。
116 ただし、実行は不能 goto cs();すら動かない
117 config/sparc/sparc.cのoutput_sibcall()でエラーが出る
118 gdbがインストールされてないので詳細は未調査
119 もしかしてsibcallってあまり実装されてないんじゃ…
120
121
122
123
124
125