My mistake. I am rewriting stdio to have a much smaller footprint and I messed up my last version. Things should work now.
Note that the compiler now compiles for ROMv6 by default. If you want ROMv5a, you now must use option -rom=v5a.
My mistake. I am rewriting stdio to have a much smaller footprint and I messed up my last version. Things should work now.
Code: Select all
#include <stdio.h>
int main() {
printf("Hello world!");
return 0;
}
Code: Select all
+---------------------------------+
| GLCC-2.2-23 |
| -rom=v5a | -rom=v6 | -rom=dev7 |
+--------------------------+----------+----------+-----------+
| glcc | 4063 | 4025 | 3558 |
| --option=CTRL_SIMPLE | 3874 | 3836 | 3369 |
| \ --option=PRINTF_SIMPLE | 2657 | 2622 | 2274 |
+--------------------------+----------+----------+-----------+
| glcc -Dprintf=cprintf | 3756 | 3722 | 3252 |
| \ --option=PRINTF_SIMPLE | 2536 | 2498 | 2154 |
+--------------------------+----------+----------+-----------+
| glcc -Dprintf=midcprintf | 2533 | 2498 | 2149 |
| glcc -Dprintf=mincprintf | 1955 | 1917 | 1622 |
+--------------------------+----------+----------+-----------+
| glcc -DUSE_CPUTS | 1452 | 1452 | 1261 |
+--------------------------+----------+----------+-----------+
| glcc -DUSE_CONSOLE | 1448 | 1448 | 1256 |
+--------------------------+---------------------+-----------+
| glcc -DUSE_RAWCONSOLE | 808 | 808 | 695 |
| \ --no-runtime-bss | 641 | 641 | 539 |
+--------------------------+---------------------+-----------+
Code: Select all
+---------------------------------+
| GLCC-2.2 |
| -rom=v5a | -rom=v6 | -rom=dev7 |
+--------------------------+----------+----------+-----------+
| glcc | 5696 | 5625 | 4915 |
+--------------------------+----------+----------+-----------+
| glcc -Dprintf=cprintf | 4382 | 4312 | 3800 |
+--------------------------+----------+----------+-----------+
| glcc -Dprintf=mincprintf | 2246 | 2209 | 1888 |
+--------------------------+----------+----------+-----------+
| glcc -DUSE_CONSOLE | 1736 | 1736 | 1528 |
+--------------------------+---------------------+-----------+
| glcc -DUSE_RAWCONSOLE | 808 | 808 | 695 |
| \ --no-runtime-bss | 641 | 641 | 539 |
+--------------------------+---------------------+-----------+
Code: Select all
Long Mandelbrot uses long integer and takes 43 minutes to draw the screen. With latest compiler 30 minutes.
Long Julia uses long integer and takes 32 minutes to draw the screen. With latest compiler 22 minutes.
Long Burning Ship uses long integer and takes 37 minutes to draw the screen. With latest compiler 25 minutes.
Long Burning Ship zoomed uses long integer and takes 1 hour to draw the screen. With latest compiler 47 minutes.
Code: Select all
src/gigatron.md: In function ‘emit3’:
src/gigatron.md:1850: error: ‘for’ loop initial declaration used outside C99 mod
gtsim.c: In function ‘debugSysFn’:
gtsim.c:375: error: ‘for’ loop initial declaration used outside C99 mode
gtsim.c: In function ‘garble’:
gtsim.c:1033: error: ‘for’ loop initial declaration used outside C99 mode
gtsim.c: In function ‘main’:
gtsim.c:1062: error: ‘for’ loop initial declaration used outside C99 mode
gtsim.c: In function ‘debugSysFn’:
gtsim.c:376: error: ‘c’ undeclared (first use in this function)
I believe you just have to use the option gcc --std=c99.