Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

How do I get icc to build an object file that has both real code and IPO info?

styc
Beginner
324 Views
With pgcc I can get -Mipa to produce object files than can be used by gcc and IPA with other object files produced by pgcc. But how about doing the same with icc? gcc cannot use object files produced by -ipo.
0 Kudos
3 Replies
Dale_S_Intel
Employee
324 Views
Many moons ago, icc used to support that functionality, but we found it tended to cause many more problems than it solved.

Can I ask what problem you're trying to solve? There may be some other ways around it. For example, if you want to mix gcc and icc produced code, you should be able to safely do it by using icc tools for linking and such (icc, xiar, xilink &c.). If you want to provide both .o's and ipo code, you could do it with a library (.a files can contain both). If you want to provide maximum ipo optimization to someone who is limited to using gcc tools, you could use the -ipo-c option which will produce a single .o file using the ipo optimization and a list of input files.

Does that help?
Thanks!
Dale
0 Kudos
styc
Beginner
324 Views
Perhaps a better statement of what I really wish of icc is that it could link against IPO-info-only objects packaged in archives by ar (instead of xiar). Whenever porting certain projects with esoteric makefiles produced by configure scripts to use icc with IPO, it is a headache to make sure that every makefile uses xiar not ar because 'AR=xiar ./configure' does not always work as intended. Having icc generate real objects is of course one way-out. It would be equally good if icc could just use archives created by ar.
0 Kudos
Dale_S_Intel
Employee
324 Views
Unfortunately using xiar is the only way you can take advantage icc's IPO optimization through a .a file, as the actual compilation and generation of object code takes place at link time, when using -ipo.

Dale
0 Kudos
Reply