Skip to content

Commit

Permalink
slides/sysdev-toolchains-definition: C library -> C standard library
Browse files Browse the repository at this point in the history
As documented on https://en.wikipedia.org/wiki/C_standard_library
This avoid confusion with other C libraries

Signed-off-by: Michael Opdenacker <[email protected]>
Reported-by: Ivan Ivanyuk <[email protected]>
  • Loading branch information
Michael Opdenacker committed Nov 15, 2023
1 parent 6f38d55 commit f33b16b
Showing 1 changed file with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ \subsection{Definition and Components}
\begin{columns}
\column{0.7\textwidth}
\begin{itemize}
\item The C library and compiled programs needs to interact with the kernel
\item The C standard library and compiled programs needs to interact with the kernel
\begin{itemize}
\item Available system calls and their numbers
\item Constant definitions
\item Data structures, etc.
\end{itemize}
\item Therefore, compiling the C library requires kernel headers, and many
\item Therefore, compiling the C standard library requires kernel headers, and many
applications also require them.
\item Available in \code{<linux/...>} and \code{<asm/...>} and a few
other directories corresponding to the ones visible in
Expand Down Expand Up @@ -173,22 +173,23 @@ \subsection{Definition and Components}
\end{frame}

\begin{frame}
\frametitle{C library}
\frametitle{C standard library}
\begin{columns}
\column{0.6\textwidth}
\begin{itemize}
\item The C library is an essential component of a Linux system
\item The C standard library is an essential component of a Linux
system.
\begin{itemize}
\item Interface between the applications and the kernel
\item Provides the well-known standard C API to ease application
development
\end{itemize}
\item Several C libraries are available:
\item Several C standard libraries are available:
{\em glibc}, {\em uClibc}, {\em musl}, {\em klibc}, {\em
newlib}...
\item The choice of the C library must be made at
\item The choice of the C standard library must be made at
cross-compiling toolchain generation time, as the GCC compiler is
compiled against a specific C library.
compiled against a specific C standard library.
\end{itemize}
\column{0.4\textwidth}
\includegraphics[width=\textwidth]{slides/sysdev-toolchains-definition/Linux_kernel_System_Call_Interface_and_uClibc.pdf}\\
Expand All @@ -202,7 +203,7 @@ \subsection{Definition and Components}
\column{0.7\textwidth}
\begin{itemize}
\item License: LGPL
\item C library from the GNU project
\item C standard library from the GNU project
\item Designed for performance, standards compliance and portability
\item Found on all GNU / Linux host systems
\item Of course, actively maintained
Expand All @@ -226,12 +227,12 @@ \subsection{Definition and Components}
\begin{itemize}
\item \url{https://uclibc-ng.org/}
\item A continuation of the old uClibc project, license: LGPL
\item Lightweight C library for small embedded systems
\item Lightweight C standard library for small embedded systems
\begin{itemize}
\item High configurability: many features can be enabled or
disabled through a menuconfig interface.
\item Supports most embedded architectures, including MMU-less
ones (ARM Cortex-M, Blackfin, etc.). The only library
ones (ARM Cortex-M, Blackfin, etc.). The only standard library
supporting ARM noMMU.
\item No guaranteed binary compatibility. May need to
recompile applications when the library configuration changes.
Expand All @@ -246,16 +247,16 @@ \subsection{Definition and Components}
\end{frame}

\begin{frame}
\frametitle{musl C library}
\frametitle{musl C standard library}
\begin{columns}
\column{0.85\textwidth}
\url{https://www.musl-libc.org/}
\begin{itemize}
\item A lightweight, fast and simple library for embedded systems
\item A lightweight, fast and simple standard library for embedded systems
\item Created while uClibc's development was stalled
\item In particular, great at making small static executables,
which can run anywhere, even on a system built
from another C library.
from another C standard library.
\item More permissive license (MIT), making it easier to release
static executables. We will talk about the requirements
of the LGPL license (glibc, uClibc) later.
Expand Down Expand Up @@ -294,7 +295,7 @@ \subsection{Definition and Components}
\end{frame}

\begin{frame}
\frametitle{Advise for choosing the C library}
\frametitle{Advise for choosing the C standard library}
\begin{itemize}
\item Advice to start developing and debugging your applications
with {\em glibc}, which is the most standard solution
Expand All @@ -308,7 +309,7 @@ \subsection{Definition and Components}
boot time, though, typically booting on a filesystem loaded in RAM.
\end{itemize}
\item If you run into trouble, it could be because of missing
features in the C library.
features in the C standard library.
\item In case you wish to make static executables, {\em musl} will
be an easier choice in terms of licensing constraints.
\end{itemize}
Expand All @@ -318,7 +319,7 @@ \subsection{Definition and Components}
\begin{itemize}
\item A {\bf Linux toolchain}
\begin{itemize}
\item is a toolchain that includes a Linux-ready C library, which
\item is a toolchain that includes a Linux-ready C standard library, which
uses the Linux system calls to implement system services
\item can be used to build Linux user-space applications, but also
bare-metal code (firmware, bootloader, Linux kernel)
Expand All @@ -328,8 +329,8 @@ \subsection{Definition and Components}
\end{itemize}
\item A {\bf bare metal toolchain}
\begin{itemize}
\item is a toolchain that does not include a C library, or a very
minimal C library that isn't tied to a particular operating
\item is a toolchain that does not include a C standard library, or a very
minimal one that isn't tied to a particular operating
system
\item can be used to build only bare-metal code (firmware,
bootloader, Linux kernel)
Expand Down

0 comments on commit f33b16b

Please sign in to comment.