The default tools are summarized in the table below.
Tool | Default | Provided with Intel® Fortran Compiler? |
---|---|---|
Assembler for IA-32 architecture-based applications and Intel® 64 architecture-based applications |
MASM* (Windows) |
No |
operating system assembler, as (Linux and Mac OS) |
No | |
Assembler for IA-64 architecture-based applications |
ias |
Yes |
Linker |
Microsoft* linker (Windows) |
No |
System linker, ld(1) (Linux and Mac OS) |
No |
You can specify alternative tools and locations for preprocessing, compilation, assembly, and linking.
By default, the compiler generates an object file directly without calling the assembler. However, if you need to use specific assembly input files and then link them with the rest of your project, you can use an assembler for these files.
Use any 32-bit assembler. For Windows, you can use the Microsoft Macro Assembler* (MASM), version 6.15 or higher, to link assembly language files with the object files generated by the compiler.
Use the MASM provided on the Microsoft SDK.
Use the assembler, ias. The following example compiles a Fortran file to an assembly language file, which you can modify as desired. The assembler is then used to create an object file.
Use the -S (Linux) or /asmfile:file.asm (Windows) option to generate an assembly code file.
The following Linux and Mac OS command line generates
the assembly code file, file.s:
ifort -S -c file.f
The following Windows command line generates the
assembly code for file.asm:
ifort /asmfile:file /c file.f
To assemble the file just produced, call the IA-64 architecture assembler.
The following is the Linux command line:
ias -Nso -p32 -o file.o file.s
The following is the Windows command line:
ias /Nso /p32 /ofile.obj file.asm
where the following assembler options are used:
Nso suppresses the sign-on message
p32 enables defining 32-bit elements as relocatable data elements; kept for backward compatibility
The file specified by the o option indicates the output object file name
The above ias command generates an object file, which you can link with the object file of the project.
On Linux and Mac OS systems, the compiler calls the system linker, ld(1), to produce an executable file from the object file.
On Windows systems, the compiler calls the Microsoft linker, link, to produce an executable file from the object files. The linker searches the path specified in the environment variable LIB to find any library files.