What is the target architecture in computer science?
I am a beginner coding and want to download a good C compiler to practice coding. So I thought about GCC and started a little research. I read the Wikipedia article . The article mentioned a target architecture that I am not aware of. Can anyone tell me what this means and any source I can refer to for more information. Thanks in advance.
target architecture is the architecture that the compiler builds for binaries.
Common architectures: i386 (Intel 32-bit), x86_64 (Intel 64-bit), armv7, arm64, etc.
GCC compiles the C code (after the preprocessing step) to assembly code, and the assembly code changes depending on the CPU architecture. The assembly code is then "compiled" into a binary file.
Something to keep in mind :
The two binaries are not guaranteed to be compatible on different operating systems, even though they use the same architecture.
A program compiled on Ubuntu Linux (say with arch x86_64) will not work on Windows (with the same arch x86_64).
GCC identifies architectures with "triplets", for example:
x86_64-apple-darwin14.0.0
i386-pc-mingw32
i686-pc-linux-gnu
Format:
machine-vendor-operatingsystem (not always followed though)
They contain information on both architecture and operating system.