Omnimaga

General Discussion => Technology and Development => Web Programming and Design => Topic started by: compu on May 02, 2011, 03:20:31 pm

Title: Nspire Online Compiler
Post by: compu on May 02, 2011, 03:20:31 pm
I made a small tool that lets you upload a zip archive containing source code of an nspire program and compiles it.
You can modify the EXE and OBJS variables in the makefile to whatever you want.
http://compu.vortexirc.com/compiler/ (http://compu.vortexirc.com/compiler/)

It uses arm-elf-gcc 4.4.6 because I have problems to get 4.5 to work.
__builtin_unreachable() was added in 4.5 so you will always get a warning:
Code: [Select]
/home/julian/ndless/include/os.h: In function 'exit':
/home/julian/ndless/include/os.h:389: warning: implicit declaration of function '__builtin_unreachable'
Title: Re: Nspire Online Compiler
Post by: DJ Omnimaga on May 02, 2011, 03:28:30 pm
Hmm nice, is this for ASM and C or Lua?
Title: Re: Nspire Online Compiler
Post by: compu on May 02, 2011, 03:29:27 pm
At the moment, only C is supported, but it is easy to add Asm.
Title: Re: Nspire Online Compiler
Post by: Silver Shadow on May 02, 2011, 05:37:18 pm
What OS is the server running? (for arm-elf-gcc)
Title: Re: Nspire Online Compiler
Post by: compu on May 03, 2011, 03:46:15 am
Debian with Linux Kernel 2.6.18.
Title: Re: Nspire Online Compiler
Post by: ExtendeD on May 04, 2011, 04:37:41 am
Letting anyone run arbitrary commands on your server isn't a bit risky? Or are there any filter mechanisms?
Title: Re: Nspire Online Compiler
Post by: compu on May 04, 2011, 08:27:09 am
PHP has a filter function called escapeshellcmd() that will filter all |, ;, etc. out.
Title: Re: Nspire Online Compiler
Post by: fb39ca4 on June 25, 2011, 11:47:32 pm
Couldn't you still run arbitrary commands by changing nspire-gcc in the makefile to anything you want?
Title: Re: Nspire Online Compiler
Post by: AngelFish on June 26, 2011, 12:17:51 am
Probably, unless he uses REGEX to filter out non-GCC calls.
Title: Re: Nspire Online Compiler
Post by: Munchor on June 26, 2011, 06:31:59 am
Compu, I get "404 - Not Found" on the webpage.
Title: Re: Nspire Online Compiler
Post by: compu on June 27, 2011, 02:54:28 am
Compu, I get "404 - Not Found" on the webpage.
Yes, I have accidentally moved the directory, I will fix it as soon as possible ;)