I am using
iconc -C "gcc -O3 -march=native" prog.icn
for gcc-10 builds, with good results on a ryzen CPU.
(-O2 is terribly slow on gcc-10)
(-O3 was broken on older gcc)
unicon -C
does not let me do that AFAICT
how should this work?
FYI: with -O3 in CFLAGS, cobench hits 85M coswitches/s on a ryzen CPU
( optional, for recent gcc only, -march is not portable, -mtune=native should be )
Makedefs:
CFLAGS += -flto -O3 -march=native
LDFLAGS += -flto -fuse-linker-plugin
RANLIB = gcc-ranlib
(iconc is not using CFLAGS or LDFLAGS, so)
export iconcflags=" -flto -O3 -march=native -fuse-linker-plugin"
iconc -C "gcc $iconcflags" cobench.icn
NOTE: -flto is causing iconc to spam warnings, #pragma ... ignored # is ignored.
possibly related to:
GCC Bugzilla – Bug 53431 C++ preprocessor ignores #pragma GCC diagnostic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
fixed in gcc-13
bash workaround for unicon -C only:
export ICONC=' iconc -p "'''$iconcflags"'"'
unicon -C file -v9
^# cc now has the flags