Skip to content

Instantly share code, notes, and snippets.

@johnrichardrinehart
Created September 16, 2020 23:15
Show Gist options
  • Save johnrichardrinehart/e4290dd17cbd4b78df00dce0ec278f03 to your computer and use it in GitHub Desktop.
Save johnrichardrinehart/e4290dd17cbd4b78df00dce0ec278f03 to your computer and use it in GitHub Desktop.
A graphviz file outlining the LFS GCC compiler bootstrap sequence
digraph G {
// edges
subgraph cluster_degradedgcc {
style=filled;
color=lightgrey;
cc1 -> lapih -> glibc -> libstdcpp1;
label=< <b> cc1: Degraded bootstrap cross-compiler </b> >;
}
subgraph cluster_supgcc {
style=filled;
color=lightgrey;
libstdcpp1 -> "binutils2" -> cclfs;
label=< <b>cc-lfs: Fully-featured native compiler</b> >;
}
binutils1 -> cc1;
cclfs -> libstdcpp2;
libstdcpp1 -> "many (c and c++) packages using cc1 (cross-compiler)";
binutils1 -> "[1]";
lapih -> "[2]";
cclfs -> "[3]";
libstdcpp2 -> "[4]";
// nodes
cc1[label="cross-compiler (cc1), degraded = no threads and exception handling"];
binutils1[label="binutils pass 1 (assembler + linker)"];
lapih[label="linux API headers"];
glibc[label="glibc (GNU C library, not degraded)"];
libstdcpp1[label="libstdc++ (GNU C++ library, degraded = no threads and exception handling)."];
libstdcpp2[label="libstdc++ (not degraded, fully-featured)"];
"[4]"[ shape=rectangle fillcolor=yellow style=filled label="[4]: fully-featured GNU C++ standard library with threads and exceptions. Built in chroot environment to ensure use of cc-lfs"]
"[3]"[ shape=rectangle fillcolor=yellow style=filled label="[3]: given that the 2nd pass of libstdc++ is done using cc-lfs it doesn't seem necessary for building the C compiler, it's only used for building these other packages"];
cclfs[label="cc-lfs (native compiler)"];
"[1]"[label="[1]: the ./configure script for both 1) gcc and 2) glibc performs a test of binutils (as and ld) for features" shape=rectangle style=filled fillcolor=yellow];
"[2]"[label="[2]: the linux API headers are used by glibc for plugging into the linux kernel" shape=rectangle style=filled fillcolor=yellow];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment