don't use -fpic and -mcmodel together with version 10 compiler


Reference Number : dpd200038028,  dpd200041691


Version : Intel C++ and Fortran Compilers for Intel64, version 10.1


Operating System : Linux


Problem Description :  The Intel compiler for Intel 64 Linux does not support the use of both -fpic and -mcmodel medium (or -mcmodel large) on the same command line. A typical error message might be:

relocation R_X86_64_PC32 against `xxxxxx' can not be used when making a shared object; recompile with –fPIC


Resolution Status :   Versions 11 and later of the Intel compilers support the simultaneous use
of the -fpic and -mcmodel medium or large switches.

In older compilers, all parts of applications or static libraries that may use 64 bit addressing of statically allocated objects should be built using -mcmodel medium (and without -fpic). Shared libraries should be built with -fpic (and without any -mcmodel switch). Applications should be linked using -shared-intel (the shared library version of the Intel compiler runtime library is built with -fpic).

[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]
Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.