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 OS) |
No |
operating system assembler, as (Linux OS and Mac OS X) |
No |
|
Assembler for IA-64 architecture-based applications |
ias |
Yes |
Linker |
Microsoft* linker (Windows OS) |
No |
System linker, ld(1) (Linux OS and Mac OS X) |
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.
For Windows systems, use the MASM provided on the Microsoft SDK. For Linux OS and Mac OS X systems, use the operating system assembler, as.
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 command line on Linux OS and Mac OS X generates the assembly code file, file.s:
ifort -S -c file.f
The following command line on Windows OS 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 OS command line:
ias -Nso -p32 -o file.o file.s
The following is the Windows OS 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 OS and Mac OS X, the compiler calls the system linker, ld(1), to produce an executable file from the object file.
On Windows OS, 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.