vishapoberon / compiler

vishap oberon compiler
http://oberon.vishap.am
GNU General Public License v3.0
186 stars 25 forks source link

read CC environment variable #68

Closed luarockr closed 5 years ago

luarockr commented 5 years ago

maybe it would make sense to read the CC environment variable to allow c compilers other than gcc or to allow providing optimization flags to the c compiler.

norayr commented 5 years ago

we read CFLAGS to customize C compiler flags.

what about CC, formerly we were just using cc, but apparently it's not enough to just set CC, CFLAGS, and type sizes. if you look at src/tools/make/configure.c, you'd see that there are supported compilers other than gcc, and that there are many specifics that should be handled.

so I would say, if you want to run voc on the unsupported platform, file a ticket.

we already have some lines in code that keep in mind that the compiler might be used wth avr gcc or sdcc.

but no ready to use target yet.

anyway, the existing codebase covers almost everything possible, it should run on all Unix systems (I think only AIX/PowerPC is unsupported due to its big endian nature), and Windows.

and you cannot use tcc to compile this complex code.

luarockr commented 5 years ago

Thanks a lot for the hint with the CFLAGS, works fine for me. Alternatively, to use different C compilers, could write a Makefile using voc -S and compiling generated C code manually in it (or via shell command manually). Great work on voc, loving it :-)