Go to file
leungwensen 7ff53786f8 bugfix in executing install.sh 2016-05-15 20:33:20 +08:00
bin * bin/cbc: resolve symbolic link to command file. 2008-10-25 22:04:56 +00:00
docker bugfix in executing install.sh 2016-05-15 20:33:20 +08:00
import * import/stdlib.hb: add system() prototype. 2009-06-20 18:47:38 +00:00
lib build 2016-05-15 11:04:18 +00:00
net/loveruby/cflat for ubuntu 64bit 2016-05-15 18:43:39 +08:00
test do not rely on subversion metadata. 2009-07-19 05:28:03 +00:00
tools calculate test dir from $0 2008-09-27 20:26:50 +00:00
unit add tests for AsmUtils. 2009-06-13 06:30:57 +00:00
ChangeLog * test/test_cbc.sh: do not override CBC environment. 2009-07-19 05:22:21 +00:00
Makefile new target "dist" 2009-07-19 05:47:30 +00:00
README.md add documents and Dockerfile 2016-05-15 20:01:07 +08:00
ToDo r4842@macbookpro: aamine | 2009-05-13 04:35:34 +0900 2009-05-17 02:27:31 +00:00
build.properties * cbc -> bin/cbc 2008-09-14 16:19:44 +00:00
build.xml * convert all source codes to Java 5 using generics and foreach stmt. 2008-09-28 18:46:56 +00:00
install.sh use install command instead of cp command to set permissions correctly. 2009-07-19 04:33:49 +00:00

README.md

CbC - Cflat Compiler (the ubuntu 64bit version)

《自制编译器》一书中实现的cbc编译器的ubuntu64位版本。

用法在ubuntu 64位系统上

安装依赖

apt-get update && apt-get install -y \
        gcc-multilib g++-multilib libc6-i386 lib32ncurses5 lib32stdc++6 \
        openjdk-8-jre \
        git

下载&安装

git clone https://github.com/leungwensen/cbc-ubuntu-64bit.git
cd cbc-ubuntu-64bit
./install.sh

使用

和原始的cbc不同在64位系统里需要增加-Wa,"--32" -Wl,"-melf_i386"执行参数。

$ cbc -Wa,"--32" -Wl,"-melf_i386" test/hello.cb
$ ./hello
Hello, World!

docker镜像

参考