User Tools

Site Tools


spo600:gcc_build_lab

GCC Build Lab

The purpose of this lab is to become familiar with the process of building large software projects, utilizing tools such as make and automake/autotools. This is useful because we will be working on the GCC compiler for the course project.

Resources

Wiki Pages

External Sites

Lab 4

On each of the SPO600 Servers x86-001 and aarch64-002:

1. Obtain, build, and install the source code for the current development version of the GCC compiler, following the instructions on the Building GCC page. Record all of the commands used.

2. Record the build time.

3. Prove that the GCC compiler you have built…

  • …is different from the system's C compiler
  • …is the current development version
  • …can successfully build a C program.

4. Update the timestamp on the file “passes.cc” (which will be in the gcc subdirectory of the source tree) either by editing the file and saving it, or by using the touch command.

5. Rebuild the software in your build directory by re-issuing the make command. Because only one source file changed, the build time should be a tiny fraction of the time required for the initial build. Record the build time and any observations you make.

6. Rebuild the software again, with no changes to the source code. This is a “null rebuild”, which will give you an idea of the amount of time it takes make to simply traverse the directory trees and determine that no changes are required. Record the build time and any observations you make.

Write-Up

Post an entry on your blog describing your experiments in this lab. Follow the Blog Guidelines.

Include in your blog post:

  1. An introduction, so that someone who happens across your blog will understand the context of what you're writing about.
  2. The results from the lab, including the command used, the build time, and the proof that your build was successful.
  3. Your experiences with this lab and your reflection on the process.

Remember to include results from both of the SPO600 servers.

Present the data in a useful way for comparison (consider using tables, graphs, change factors (% differences), or other formats to make your point). Include any useful or interesting observations encountered during the lab.

Remember that labs are marked on a scale of 0-3:

  • 0 - Lab not completed, or significant errors.
  • 1 - Very basic completion, or some small errors.
  • 2 - Satisfactory completion of the lab. (This is the default mark for lab completion).
  • 3 - Lab completed with additional experiments, investigation, research, or explanation.

Remember to follow the Blog Guidelines as you write.

The labs in SPO600 do not have specific due dates, but:

  1. All labs must be completed to pass the course, and
  2. Completing each lab will help you to understand the following topics in the course

Therefore it is strongly recommended that you keep up with the labs. If you have partially or mostly completed the lab, write a blog post about what you've done, and you can supplement this with an additional blog post at a late date when you complete the lab – multiple blog posts about one lab are completely acceptable.

spo600/gcc_build_lab.txt · Last modified: 2025/01/31 17:05 by chris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki