OrangeC
OrangeC copied to clipboard
FR: add gcc wrapper
Most free or open-source projects out there have an option to be build against gcc. To ease compilation of these projects using OrangeC it would be nice to include a gcc wrapper, something that reads the command line and translates the options as necessary / reasonable.
Otherwise projects that use a standard configure script can only be used if OrangeC is added into it beforehand (which for most projects would mean patches to Autoconf and rebuilding the configure script with patched [or, if accepted into main line, most recent] version of Autoconf).
Parameters not supported (or not-yet included in the wrapper) like -Wall may be skipped and warned (at least when -v is used).
Example:
occ-gcc -o conftest.exe -I"C:\dev\orangec\include" -I"C:\dev\orangec\include\win32" -v std=c99 -Wall -fspecial-switch -O0 -g -DTEST=19 -fmax-errors=99 -funsigned-char conftest.c -ltest -L"C:\dev\test"
would be translated to
Warning (1234): Option -Wall has no equivalent in OrangeC
Warning (1234): Option -fspecial-switch unkown in occ-gcc
occ.exe /oconftest.exe /I"C:\dev\orangec\include";"C:\dev\orangec\include\win32" -y /9 /O- +v /DTEST=19 /E99 /C+u test.l /L"C:\dev\test" conftest.c
Note: I didn't found the correct option to specify the library search path and assume /L is wrong.
Time for an update... gcc and clang options are getting included step by step, last one in cdd3980; so the wrapper may not be even needed in the mid-term...
we added gccocc and arocc at some point...
Yes. this was done as part of #713 in 16dc88175490e9756a9a346234dce1219a29175f.