05-4-compilers-2
05-4-compilers-2
UNIX Environment
Week 05, Segment 4:
Unix Development Tools:
The Compiler Chain, Part II
Jan Schaumann
[email protected]
https://stevens.netmeister.org/631/
CS631 - Advanced Programming in the UNIX Environment
Compilers
00101001011100110101110011010101101011010
110011010110101100110010101101101101010011
#include <stdio.h>
int
main(int argc, char **argv) {
printf(“Hello, World!\n”);
}
int int
main(int argc, char **argv) { main(int argc, char **argv) {
printf(“%d\n”, NUM); printf(“%d\n”, 42);
} }
Jan Schaumann 2021-09-10
fi
fl
CS631 - Advanced Programming in the UNIX Environment
The compiler chain or driver usually performs preprocessing (e.g. via cpp(1)),
compilation (cc(1)), assembly (as(1)) and linking (ld(1)).
• use “cc -v” to see the compilers stages and the commands it executes
To be continued…