I'm trying to compile some code using icc 12.1.4 under linux. I have a simple script that compiles each file and a line to link all the files using a custom linker definition file. The build script works for gcc and the linker definition file works for gcc. When I use it with icc, I get a syntax error on this line:
. = ALIGN (., 0x20);
I'm not sure what is causing this error since it works with gcc and other compilers. ALIGN should be a builtin function in the linker (which I'm assuming is ld). I've noticed this same error in icc with other builtin functions (like REGION_ALIAS).
I use the following line to link:
icc -m32 -march=i586 -nostdlib -Wall -W -pedantic -o coremark_icc_i586.elf -Wl,-static,-lm,-Map=coremark_icc_i586.map,--cref -Ticc_i586_hw.ld core_portme.o ee_printf.o core_list_join.o core_main.o core_matrix.o core_state.o core_util.o startup.o
I'm stumped as to what the problem could be or how to debug it. Does anyone have any ideas on how to solve this? Am I doing something wrong (like passing something that icc doesn't like)?