Develop and Download Open Source Software

View 1.0.0 - Release Notes

category(Tag) tree

file info

category(Tag)
root
file name
minimal_frontend_1.0.0_-_Notes
last update
2008-05-07 00:31
type
Plain Text
editor
あろは
description
1.0.0 - Release Notes
language
English
translate
This is a minimal frontend sample.

For any input .bl file, this frontend only output an executable file or assembly source code correcponding to the following c source code : 

int main() {return 0;}



For example :

$ cat null.bl
$ ../bin/gcc null.bl
$ ls
a.out null.bl
$ ./a.out
$ ../bin/gcc -S null.bl
$ cat null.s
        .file   "null.bl"
        .text
.globl main
        .type   main, @function
main:
        pushl   %ebp
        movl    %esp, %ebp
        movl    $0, %eax
        popl    %ebp
        ret
        .size   main, .-main
        .ident  "GCC: (GNU) 4.3.0"
        .section        .note.GNU-stack,"",@progbits

Build example

$ mkdir -p /usr/local/build-gcc/build-bl
$ tar jxvf gcc-4.3.0.tar.bz2 -C /usr/local/build-gcc
$ tar jxvf bl-minimal-4.3.0.tar.bz2 -C /usr/local/build-gcc/gcc/
$ cd /usr/local/build-gcc/build-bl
$ ../gcc-4.3.0/configure --prefix=/usr/local/build-gcc/build-bl --enable-languages=bl --enable-checking=all --disable-nls --disable-bootstrap
$ make && make install