Skip to content

Commit

Permalink
Updated configure + readme for ucc, added ucc symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrippling committed May 31, 2012
1 parent d1a33ba commit fbefea9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ src/cc
src/cc1/cc1
src/cpp2/cpp
src/ucc/ucc
src/ucc/cfg.h

lib/syscall.s
lib/syscall_err.s
Expand Down
19 changes: 9 additions & 10 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ make
Compiling C files
=================

Pretty much the standard args, cc is found in src/
All paths in cc are relative to this, so don't change it.
I haven't made an install make target yet.
Pretty much the standard args
I haven't made an install make target yet, ucc finds libraries + includes locally

All programs compiled by ucc are staticly linked.

Expand All @@ -38,28 +37,28 @@ floating point numbers, long + short types (asm_backend_recode branch)
Examples
========

./src/cc -o hello hello.c
./ucc -o hello hello.c
- preprocess, compile, assemble and link hello.c into hello

./src/cc -o- -S test.c
./ucc -o- -S test.c
- output assmebly code for test.c

./src/cc -o- -S -Xprint test.c
./ucc -o- -S -Xprint test.c
- show the abstract parse tree with type annotation and stack offsets, etc

./src/cc -c test.c
./ucc -c test.c
- (preprocess) compile and assemble test.c -> test.o

./src/cc -c test.s
./ucc -c test.s
- assemble test.s -> test.o
(preprocessing and compilation are skipped)

./src/cc -fenglish -Xprint -o- test.c
./ucc -fenglish -Xprint -o- test.c
- (-fenglish) show the abstract parse tree with output decls in english
e.g.:
int *(*const (*x)(void))(int);
becomes:
"x": pointer to function(taking no arguments) returning const pointer to function(int) returning pointer to int

./src/cc -E -o- test.c
./ucc -E -o- test.c
- if you need to ask then read some proper compiler documentation
6 changes: 1 addition & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ UCC_ARCH = ${UCC_ARCH}
UCC_LDFLAGS = ${UCC_LDFLAGS}
!

echo "TODO: cc.h config" >&2
exit 1

cat > src/cc.h <<!
cat > src/ucc/cfg.h <<!
#define UCC_NASM "${UCC_NASM}"
#define UCC_LD "${UCC_LD}"
#define UCC_ARCH "${UCC_ARCH}"
#define UCC_LDFLAGS "${UCC_LDFLAGS}"
int main(int argc, char **argv);
!

if [ $1 = Linux ]
Expand Down
1 change: 1 addition & 0 deletions ucc

0 comments on commit fbefea9

Please sign in to comment.