SPO600 Project : Stage 1

    Today, I will be talking about the steps I took to complete stage 1 of the course Project.  At this stage, we are tasked to build the GCC compiler on an x86_64 system and on an AArch64 system


First, I will be building the compiler on an x86_64 system using the Portugal sever. After using ssh to login to the server, I followed the following procedures:



1) I obtained the source code for the latest development version of GCC from the Git repository. 


2) To ensure that I am building with an object tree outside of the source tree, I created a build directory outside of the source directory.


3) I then proceed to configure the build for the Portugal system.

  • First I rant the code below to set the build for the compiler. I enabled the languages C and C++ for the compiler.
../configure --target=x86_64-linux-gnu --enable-languages=c,c++

  • I then ran the code below to build the compiler

make -j4

  • The -jN option allows N number of parallel jobs to run. In my case, I used make -j4. This allowed 4 simultaneous jobs to run, hence speeding up the build process. 

  • The build process took about 4 hours from running the make command

4) After the GCC has been built, I created a simple C++ program to test that the GCC Compiler is working.


5) I also ran the code below to see the current version of GCC installed

gcc --version




The build process for the AArch64 system using the Israel server was similar to the previous steps. 

1) After cloning the GCC repository and making a build directory, I ran the code below to prepare the build process and create the make file.

../configure --target=aarch64-linux-gnu --enable-languages=c,c++

2) I then ran mak -j4 to start the build process. It also took about 4 hours to complete the build.

3)I then created a C++ program to test the compiler.

    


4) I also checked the version of the GCC compiler installed on the system.



The build process for both systems was pretty straightforward. I was able to build GCC on both systems without running into errors. Reading over the resources on the wiki page sure helped me finish this stage smoothly.
















Comments

Popular Posts