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

icc: command line warning #10159: invalid argument for option '-m'

chao_z_2
Beginner
1,894 Views

Hi, all,

I was try to use Intel compiler to compile my project which use to use GCC, but Intel compiler reported a warning: `icc: command line warning #10159: invalid argument for option '-m'`. This waringing may releated to i use gcc options: `-mthreads` and `-march=x86-64`. I am wonder if there are any way i can achieve these two options' function in ICC?

Thanks,

Chao

0 Kudos
1 Solution
TimP
Honored Contributor III
1,894 Views

According to 'info gcc' -mthreads is a Windows (specifically MinGW) exception handling option, so it would have no direct counterpart in linux, even for gcc.

I can't find any indication that -march=x86-64 is a valid gcc option; perhaps you meant -m64.  If you have set up icc environment in accordance with source <iccpath>/compilervars.sh intel64, that is the default.

If you meant that you are running on Windows, the exception handling options for ICL are meant to be the same as for Microsoft compilers, not gcc.  The selection of X64 mode is done with a VS project setting, or by selection of the cmd shortcut syntax, while the equivalents of -march= are in the /arch: and /Qx options.

Perhaps, if the compiler documentation doesn't clarify this for you, you could tell us what you mean to accomplish by these options, and on what platform.

View solution in original post

0 Kudos
2 Replies
TimP
Honored Contributor III
1,895 Views

According to 'info gcc' -mthreads is a Windows (specifically MinGW) exception handling option, so it would have no direct counterpart in linux, even for gcc.

I can't find any indication that -march=x86-64 is a valid gcc option; perhaps you meant -m64.  If you have set up icc environment in accordance with source <iccpath>/compilervars.sh intel64, that is the default.

If you meant that you are running on Windows, the exception handling options for ICL are meant to be the same as for Microsoft compilers, not gcc.  The selection of X64 mode is done with a VS project setting, or by selection of the cmd shortcut syntax, while the equivalents of -march= are in the /arch: and /Qx options.

Perhaps, if the compiler documentation doesn't clarify this for you, you could tell us what you mean to accomplish by these options, and on what platform.

0 Kudos
chao_z_2
Beginner
1,894 Views

Thanks a lot for your help, Tim. I have check '-mthreads' and it is true that this option used in MinGW flow of my project. For  '-march=x86-64', i used it to compile a demo, and gcc don't report any error or warning, and i have search for a while and found some people used it although i also can't  find any indication that -march=x86-64 is a valid gcc option. I would try to find the reason why use it.

Thanks again, Tim

Tim P. wrote:

According to 'info gcc' -mthreads is a Windows (specifically MinGW) exception handling option, so it would have no direct counterpart in linux, even for gcc.

I can't find any indication that -march=x86-64 is a valid gcc option; perhaps you meant -m64.  If you have set up icc environment in accordance with source <iccpath>/compilervars.sh intel64, that is the default.

If you meant that you are running on Windows, the exception handling options for ICL are meant to be the same as for Microsoft compilers, not gcc.  The selection of X64 mode is done with a VS project setting, or by selection of the cmd shortcut syntax, while the equivalents of -march= are in the /arch: and /Qx options.

Perhaps, if the compiler documentation doesn't clarify this for you, you could tell us what you mean to accomplish by these options, and on what platform.

0 Kudos
Reply