linker - Linking libraries built with ICC with application built with GCC -
i have set of static libraries, lib1.a, lib2.a , lib3.a have been compiled using icc (intel c/c++ compiler). used icc -ipo -c compilation create .o files , xiar (intel archiver) creating .a libraries.
i want give these 3 libraries client not have icc , hence using gcc compile , link application these libraries. speed-gain (expected cross-file optimizations due libs built -ipo option) not achieved at all if links these libraries using gcc?
this page intel website on "gcc compatibility , interoperability" states:
link-time optimization using -ffat-lto-objects compiler option provided gcc compatibility. implies ld , ar can used link , archive object files, doing lose cross-file optimizations.
i using icc version 13.1.0 (gcc version 4.6.0 compatibility) gcc version 4.6.3 on ubuntu 12.04.2.
any appreciated.
if using -ipo optimization happen @ link stage.
during compilation (icc -c -ipo) intel compiler stores additional information in object files. additional information used @ link stage actual interprocedural optimization (ipo).
so in order benefit ipo need use intel compiler @ compile and link stage.
Comments
Post a Comment