Trying to compile Boost with icc (from composer XE 2013 SP 1.2.139) using the -x assembler-with-cpp flag and getting the following error...
$ "icc" -x assembler-with-cpp -O3 -xHost -inline-level=2 -vec-report0 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "osx-build/boost/bin.v2/libs/context/build/intel-darwin-linux/release/link-static/threading-multi/asm/jump_x86_64_sysv_macho_gas.o" "libs/context/src/asm/jump_x86_64_sysv_macho_gas.S"
<built-in>:167:9: warning: '__PIC__' macro redefined
#define __PIC__ 1
<built-in>:126:9: note: previous definition is here
#define __PIC__ 2
1 warning generated.
FATAL:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
Seems like icc is calling the assembler incorrectly.
This happens due to old version of GNU assembler supplied with MacOS/XCode -- that doesn't understand "-msse2avx" flag (modern GNU assembler versions does recognize and require this flag for code that might contain sse2 instructions).
Still, we consider this as a compiler bug and plan to fix it in next compiler update -- by invoking clang's built-in assembler (that supports modern x86 instructions and donesn't need -msse2avx flag).
In the meantime, you can use one of the following workarounds:
1) Specify that clang should be invoked: -Qlocation,as,clang (clang prints a warning on -msse2avx being unsupported option, but otherwise works fine)
2) Drop -xHost (as this options enables generation of sse2 instructions)
3) Install newer gcc version from macports and tell the compiler to use "as" from this installation: -Qlocation,as,/path/to/new/gcc/bin/as
Either of the workarounds suffice; 1) is probably the easiest.
Sorry for the inconvinience -- as I said, this will be fixed in a future update.