[FE training-materials-updates] Further C library updates

Michael Opdenacker michael.opdenacker at free-electrons.com
Sun Nov 8 15:52:07 CET 2015

Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=4004c8987f74fc50be15e846e8bed347d13032dc


commit 4004c8987f74fc50be15e846e8bed347d13032dc
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Sun Nov 8 15:52:07 2015 +0100

    Further C library updates
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


 .../boottime-application/boottime-application.tex  |  2 +-
 slides/c-libraries/c-libraries.tex                 | 68 +++++++++-------------
 .../sysdev-embedded-linux.tex                      |  2 +-
 slides/sysdev-realtime/sysdev-realtime.tex         |  4 +-
 .../sysdev-toolchains-definition.tex               |  2 +-
 .../sysdev-toolchains-obtaining.tex                |  4 +-
 6 files changed, 36 insertions(+), 46 deletions(-)

diff --git a/slides/boottime-application/boottime-application.tex b/slides/boottime-application/boottime-application.tex
index 4ee78c2..a6908a0 100644
--- a/slides/boottime-application/boottime-application.tex
+++ b/slides/boottime-application/boottime-application.tex
@@ -232,7 +232,7 @@ you'll have to benchmark near the end of your project.
 Results may vary depending on the size/features of your root filesystem.
 Here, we mainly benchmark the kernel performance as the root filesystem
 doesn't take much time. Note: Don't compare with a Buildroot toolchain as
-these are using {\em glibc}/{\em eglibc} and not {\em uClibc} and then
+these are using {\em glibc} and not {\em uClibc} and then
 the initramfs has a quite different size. Compiling the kernel with a
 Linaro toolchain and using a Buildroot generated root filesystem yields
 the same results as compiling everything with Buildroot.
diff --git a/slides/c-libraries/c-libraries.tex b/slides/c-libraries/c-libraries.tex
index b5f3948..0dc1c79 100644
--- a/slides/c-libraries/c-libraries.tex
+++ b/slides/c-libraries/c-libraries.tex
@@ -8,8 +8,10 @@
     \item Designed for performance, standards compliance and portability
     \item Found on all GNU / Linux host systems
     \item Of course, actively maintained
-    \item Quite big for small embedded systems: approx 2.5 MB on ARM
+    \item By default, quite big for small embedded systems: approx 2.5 MB on ARM
       (version 2.9 - \code{libc}: 1.5 MB, \code{libm}: 750 KB)
+    \item But some features not needed in embedded systems can be
+          configured out (merged from the old {\em eglibc} project).
     \item \url{http://www.gnu.org/software/libc/}
@@ -18,31 +20,28 @@
-  \frametitle{uClibc}
+  \frametitle{uClibc-ng (1)}
-  \item \url{http://www.uclibc.org/}
+  \item \url{http://uclibc-ng.org/}
+  \item A continuation of the old uClibc project
   \item License: LGPL
   \item Lightweight C library for small embedded systems
     \item High configurability: many features can be enabled or
       disabled through a menuconfig interface
-    \item Works only with Linux/uClinux, works on most embedded
-      architectures
+    \item Supports most embedded architectures
     \item No guaranteed binary compatibility. May need to
       recompile applications when the library configuration changes.
     \item Focus on size rather than performance
     \item Small compile time
-  \item News: project revived by the {\em uClibc-ng} project, making
-        frequent releases again, and now supported by Buildroot
-        (see \url{http://uclibc-ng.org/}).
-  \frametitle{uClibc (2)}
+  \frametitle{uClibc-ng (2)}
-  \item Most of the applications compile with uClibc. This applies to
+  \item Most of the applications compile with uClibc-ng. This applies to
     all applications used in embedded systems.
   \item Size (arm): 4 times smaller than glibc!
@@ -51,43 +50,18 @@
     \item glibc 2.9: approx 2.5 MB
   \item Some features not available or limited: priority-inheritance
-    mutexes, NPTL support is very new, fixed Name Service Switch
+    mutexes, NPTL support is relatively recent, fixed Name Service Switch
     functionality, etc.
   \item Used on a large number of production embedded products,
     including consumer electronic devices
-  \item Supported by all commercial embedded Linux providers (proof of
-        maturity).
-  \frametitle{eglibc}
-  \begin{columns}
-    \column{0.8\textwidth}
-    \begin{itemize}
-    \item {\em Embedded glibc}, LGPL license too
-    \item Was a variant of glibc, better adapted
-      to the needs of embedded systems, because of past
-      disagreement with glibc maintainers.
-    \item eglibc's goals included reduced footprint, configurable
-      components, better support for cross-compilation and
-      cross-testing.
-    \item Could be built without support for NIS, locales, IPv6, and many
-      other features.
-    \item Fortunately for eglibc, the glibc maintainer has changed
-      and its features are now included in glibc. Version 2.19
-      (Feb. 2014) was the last release.
-    \item {\fontsize{10}{15} \url{http://en.wikipedia.org/wiki/Embedded_GLIBC}}
-    \end{itemize}
-    \column{0.2\textwidth}
-    \includegraphics[width=\textwidth]{slides/c-libraries/eglibc.png}
-  \end{columns}
   \frametitle{Honey, I shrunk the programs!}
   \item Executable size comparison on ARM, tested with {\em eglibc}
+  (now {\em glibc})
   2.15 and {\em uClibc}
   \item Plain ``hello world'' program (stripped): \\
     \begin{tabular}{| c || c | c |} \hline
@@ -107,15 +81,31 @@
+  \frametitle{musl C library}
+  \url{http://www.musl-libc.org/}
+  \begin{itemize}
+  \item A lightweight, fast and simple library for embedded systems
+  \item Created while uClibc's development was stalled
+  \item In particular, great at making small static executables
+  \item Permissive license (MIT)
+  \item Compare features with other C libraries:
+    \url{http://www.etalabs.net/compare_libcs.html}
+  \item Supported by build systems such as Buildroot
+  \end{itemize}
   \frametitle{Other smaller C libraries}
   \item Several other smaller C libraries have been developed, but
     none of them have the goal of allowing the compilation of large
     existing applications
-  \item They need specially written programs and applications
+  \item They can run only relatively simple programs,
+	typically to make very small static executables and run
+	in very small root filesystems.
   \item Choices:
-    \item Dietlibc, \url{http://www.fefe.de/dietlibc/}. Approximately
+    \item Dietlibc, \url{http://fefe.de/dietlibc/}. Approximately
       70 KB.
     \item Newlib, \url{http://sourceware.org/newlib/}
     \item Klibc, \url{http://www.kernel.org/pub/linux/libs/klibc/},
diff --git a/slides/sysdev-embedded-linux/sysdev-embedded-linux.tex b/slides/sysdev-embedded-linux/sysdev-embedded-linux.tex
index cf4e4ba..daa335f 100644
--- a/slides/sysdev-embedded-linux/sysdev-embedded-linux.tex
+++ b/slides/sysdev-embedded-linux/sysdev-embedded-linux.tex
@@ -1260,7 +1260,7 @@ Contents of \code{usr/lib} after installation of {\em libpng} and {\em
     \item Or any combination of the previous items
-  \item Supports building uClibc, glibc, eglibc and musl toolchains,
+  \item Supports building uClibc, glibc and musl toolchains,
     either built by Buildroot, or external
   \item Over 1200+ applications or libraries integrated, from basic
     utilities to more elaborate software stacks: X.org, GStreamer, Qt,
diff --git a/slides/sysdev-realtime/sysdev-realtime.tex b/slides/sysdev-realtime/sysdev-realtime.tex
index c501db9..751edbb 100644
--- a/slides/sysdev-realtime/sysdev-realtime.tex
+++ b/slides/sysdev-realtime/sysdev-realtime.tex
@@ -548,8 +548,8 @@
   \item No special library is needed, the POSIX real-time API is part
     of the standard C library
-  \item The glibc or eglibc C libraries are recommended, as support
-    for some real-time features is not available in uClibc yet
+  \item The glibc C library is recommended, as support
+    for some real-time features is not mature in other C libraries
     \item Priority inheritance mutexes or NPTL on some architectures,
       for example
diff --git a/slides/sysdev-toolchains-definition/sysdev-toolchains-definition.tex b/slides/sysdev-toolchains-definition/sysdev-toolchains-definition.tex
index d6aef4b..f6ff4c4 100644
--- a/slides/sysdev-toolchains-definition/sysdev-toolchains-definition.tex
+++ b/slides/sysdev-toolchains-definition/sysdev-toolchains-definition.tex
@@ -172,7 +172,7 @@ struct stat {
     \item Several C libraries are available:\\
-      {\em glibc}, {\em uClibc}, {\em eglibc}, {\em dietlibc}, {\em
+      {\em glibc}, {\em uClibc}, {\em musl}, {\em dietlibc}, {\em
         newlib}, etc.
     \item The choice of the C library must be made at the time of the
       cross-compiling toolchain generation, as the GCC compiler is
diff --git a/slides/sysdev-toolchains-obtaining/sysdev-toolchains-obtaining.tex b/slides/sysdev-toolchains-obtaining/sysdev-toolchains-obtaining.tex
index 62c1beb..b97ed4b 100644
--- a/slides/sysdev-toolchains-obtaining/sysdev-toolchains-obtaining.tex
+++ b/slides/sysdev-toolchains-obtaining/sysdev-toolchains-obtaining.tex
@@ -67,7 +67,7 @@
     \item Rewrite of the older Crosstool, with a menuconfig-like configuration
-    \item Feature-full: supports uClibc, glibc, eglibc, hard and soft
+    \item Feature-full: supports uClibc, glibc, musl, hard and soft
       float, many architectures
     \item Actively maintained
     \item \url{http://crosstool-ng.org/}
@@ -148,7 +148,7 @@ make install
     {\em multilib} if they have several copies of the C library for
     different configurations (for example: ARMv4T, ARMv5T, etc.)
-    \item CodeSourcery ARM toolchain are multilib, the sysroots are in
+    \item Old CodeSourcery ARM toolchains were multilib, the sysroots in:

More information about the training-materials-updates mailing list