sml#
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* SML#をMacにインストールした時のメモ [#oab6bf86]
** SML#とは [#o368b2f9]
SML#は東北大学天気通信研究所が開発を進めているプログラミ...
SML#ではStandard MLとの後方互換性, C言事の直接連携, マ...
[[SML#ホームページ:http://www.pllab.riec.tohoku.ac.jp/sm...
** SML#のインストール [#xda659e6]
SML#のインストールには 32bitのGMP(https://gmplib.org )と...
*** GMPの32bit版インストール [#k7a0f3e0]
% ./configure ABI=32 --prefix=インストール先
% make -j
% make install
既存のGMPライブラリとの衝突を防ぐために --prefix オプショ...
*** LLVM3.4の32bit版インストール [#v439c77a]
configure時に
% ./configure CC='gcc -m32' CXX='g++ -m32' .....
とつけるそれ以外は基本的に[[LLVM]] を参照
*** SML#のインストール [#g30e8d92]
ソースは公式ホームページに公開している([[ダウンロード先:h...
% ./configure CC='gcc -m32' CXX='g++ -m32' LD='ld -m el...
% make -j
% make install
でprefix先に bin, libが出来る
% prefix/bin/smlsharp
でsml#の対話モードが立ち上がる
% prefix/bin/smlsharp example.sml
でsml#プログラムをコンパイルできる
** lldbで追う(Cで書かれている部分だけ) [#j5da91e6]
SML#のコンパイラはSML#で書かれているため、lldbでは追うこ...
ランタイムLibraryはCで書かれているためそれは追うことが可...
% lldb prefix/bin/smlsharp int.sml
(lldb) target create "../build/bin/smlsharp"
maiCurrent executable set to '../build/bin/smlsharp' (i3...
(lldb) settings set -- target.run-args "int.sml"
(lldb) b main
Breakpoint 1: where = smlsharp`main + 12 at main.c:16, a...
(lldb) r
Process 1939 launched: '../build/bin/smlsharp' (i386)
Process 1939 stopped
* thread #1: tid = 0x1dcb20, 0x0000270c smlsharp`main(ar...
frame #0: 0x0000270c smlsharp`main(argc=2, argv=0xbff...
13 int
14 main(int argc, char **argv)
15 {
-> 16 sml_init(argc, argv);
17 _SMLmain();
18 sml_finish();
19 return 0;
終了行:
* SML#をMacにインストールした時のメモ [#oab6bf86]
** SML#とは [#o368b2f9]
SML#は東北大学天気通信研究所が開発を進めているプログラミ...
SML#ではStandard MLとの後方互換性, C言事の直接連携, マ...
[[SML#ホームページ:http://www.pllab.riec.tohoku.ac.jp/sm...
** SML#のインストール [#xda659e6]
SML#のインストールには 32bitのGMP(https://gmplib.org )と...
*** GMPの32bit版インストール [#k7a0f3e0]
% ./configure ABI=32 --prefix=インストール先
% make -j
% make install
既存のGMPライブラリとの衝突を防ぐために --prefix オプショ...
*** LLVM3.4の32bit版インストール [#v439c77a]
configure時に
% ./configure CC='gcc -m32' CXX='g++ -m32' .....
とつけるそれ以外は基本的に[[LLVM]] を参照
*** SML#のインストール [#g30e8d92]
ソースは公式ホームページに公開している([[ダウンロード先:h...
% ./configure CC='gcc -m32' CXX='g++ -m32' LD='ld -m el...
% make -j
% make install
でprefix先に bin, libが出来る
% prefix/bin/smlsharp
でsml#の対話モードが立ち上がる
% prefix/bin/smlsharp example.sml
でsml#プログラムをコンパイルできる
** lldbで追う(Cで書かれている部分だけ) [#j5da91e6]
SML#のコンパイラはSML#で書かれているため、lldbでは追うこ...
ランタイムLibraryはCで書かれているためそれは追うことが可...
% lldb prefix/bin/smlsharp int.sml
(lldb) target create "../build/bin/smlsharp"
maiCurrent executable set to '../build/bin/smlsharp' (i3...
(lldb) settings set -- target.run-args "int.sml"
(lldb) b main
Breakpoint 1: where = smlsharp`main + 12 at main.c:16, a...
(lldb) r
Process 1939 launched: '../build/bin/smlsharp' (i386)
Process 1939 stopped
* thread #1: tid = 0x1dcb20, 0x0000270c smlsharp`main(ar...
frame #0: 0x0000270c smlsharp`main(argc=2, argv=0xbff...
13 int
14 main(int argc, char **argv)
15 {
-> 16 sml_init(argc, argv);
17 _SMLmain();
18 sml_finish();
19 return 0;
ページ名: