diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CbC-INSTALL	Thu Nov 26 13:27:48 2009 +0900
@@ -0,0 +1,125 @@
+
+ * CbC on GCCのインストール方法
+
+まずはMercurialリポジトリから取得
+	hg clone ssh://one@firefly.cr/hg/CbC/GCC cbc-gcc
+ビルド用ディレクトリへ
+	mkdir build-gcc; cd build-gcc
+コンフィギュア
+一般的には以下のconfigureでビルドできる
+	../cbc-gcc/configure CFLAGS="-g3 -O0"
+	  --prefix=$PWD/INSTALL_DIR --disable-nls \
+	  --disable-bootstrap --enable-languages=c \
+	  --enable-checking=tree,rtl,assert,types 
+
+	-g3:
+		gdbでmacroの展開を可能にする
+	-O0:
+		gdbでトレースしやすいように、最適化をカット
+	--prefix:
+		インストールするベースディレクトリ
+	--enbale-checking:
+		デバグ用の指定、browse_treeやdebug_rtx、assertもこれでonになる
+	--disable-bootstrap:
+		通常、GCCは3回ビルドされる。それを最初の1回だけに限定
+	--disable-nls:
+		gettextのl10nをoffにしよう
+	--enable-language:
+		使用する言語 c|c++|ada ... もちろんCbCはcだけ
+		これもcbcを使えるようにしたい
+ビルド
+make && make install
+
+
+
+ * PowerPC Macでのインストール
+
+最新のlibgmp, libmpfrをインストール
+[gmp]
+	./configure --enable-cxx --build=powerpc-apple-darwin9 --host=powerpc-apple-darwin9
+	make && make install
+[mpfr]
+	./configure --build=powerpc-apple-darwin9 --host=powerpc-apple-darwin9
+	make && make install
+[CbC on GCC]
+	../cbc-gcc/configure CFLAGS="-g3 -O0" --with-gmp=/usr/local
+	  --with-mpfr=/usr/local --prefix=$PWD/INSTALL_DIR \
+	  --disable-nls --disable-bootstrap --enable-languages=c \
+	  --enable-checking=tree,rtl,assert,types 
+	make && make install
+もちろんインストール場所によってprefixは変更しよう
+
+
+
+
+ * PS3でのビルド
+ SPU
+../CbConGCC/configure --prefix=/usr/local/spu-cbc \
+  --build=powerpc --target=spu --program-prefix=spu- \
+  --disable-bootstrap --enable-checking=tree,rtl,assert \
+  --disable-nls --disable-shared --disable-threads \
+  --enable-languages=c --with-system-zlib --with-newlib \
+  --enable-version-specific-runtime-libs --disable-libssp \
+  --with-gnu-as -with-as=/usr/bin/spu-as --with-gnu-ld \
+  --with-ld=/usr/bin/spu-ld
+ PPU
+  binutils
+	$ tar xzvf binutils-...tar.gz
+	$ mkdir binutils_4ps3
+	$ cd binutils_4ps3
+	$ ../binutils../configure --prefix=$PWD/INSTALL_DIR
+	> --target=ppc64-yellowdog-linux
+	$ make install
+	$ cd ..
+  cross gcc
+	$ mkdir gcc_4ps3
+	$ PATH=$PWD/../binutils_4ps3/INSTALL_DIR/bin:$PATH
+	$ ../CbConGCC/configure --prefix=$PWD/INSTALL_DIR
+	> --enable-language=c --target=ppc64-yellowdog-linux
+	> --with-newlib --with-included-gettext --enable-shared
+	> --enable-threads
+	$ make
+
+
+
+ * 琉球大学総合情報センターのSolarisサーバでのビルド (sparc)
+
+なぜかデフォルトのgccが自分のライブラリすら見てくれないのでパスを指定
+	export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/gcc:$HOME/opt/lib
+	export LIBRARY_PATH=/usr/local/lib:/usr/local/lib/gcc:$HOME/opt/lib
+gmpのインストール
+	./configure --prefix=$HOME/opt \
+	  --build=sparc-sun-solaris \
+	  --host=sparc-sun-solaris
+	make 
+	make check
+	make install
+libmpfrのインストール
+	./configure --prefix=$HOME/opt/ \
+	  --with-gmp=$HOME/opt
+	  --build=sparc-sun-solaris \
+	  --host=sparc-sun-solaris
+	make
+	make check
+	make install
+	# sparc-sun-solaris2.10の方がいいかもしれない
+CbCをインストール
+	../CbCGCC/configure --prefix=$PWD/INSTALL_DIR --disable-nls \
+	  --disable-bootstrap --enable-languages=c \
+	  --with-gmp=$HOME/opt --with-mpfr=$HOME/opt \
+	  --build=sparc-sun-solaris2.10 --target=sparc-sun-solaris2.10 \
+	  --host=sparc-sun-solaris2.10 --enable-shared \
+	  --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld
+	make
+	make install
+ビルドは可能。
+ただし、実行は不能 goto cs();すら動かない
+config/sparc/sparc.cのoutput_sibcall()でエラーが出る
+gdbがインストールされてないので詳細は未調査
+もしかしてsibcallってあまり実装されてないんじゃ…
+
+
+
+
+
+