Or, at least, in windows package. I tried ellcc-x86_64-w64-mingw32-0.1.14.tgz
After unpacking, build examples/hellocpp with commandline (or make command)
SET TARGET=i386-linux-eng
“ecc++.exe” -target %TARGET% -c -o main.o main.cpp
/* link skipped */
compiles and runs just fine.
“ecc++.exe” -target %TARGET% -O2 -c -o main.o main.cpp
crashes with suggestion to send bug to LLVM.
But i didn’t do that, instead placed in elcc/bin dir LLVM night build clang++.exe.
Replacing compile command with
“clang++.exe” -target %TARGET% -O2 -D__ELLCC__ -I%INCPATH%/include/c++ -I%INCPATH%/include/i386 -I%INCPATH%/include -c -o main.o main.cpp
Works fine.
at the end, after this, I had built all my complex project using this toolchain – clang++.exe as compiler and ecc as linker (with all that musl, etc libs) – which is handy.
Steps to reproduce:
1. get windows package
2. add -O2 to CFLAGS.
3. build hellocpp.