source: clfs-embedded/BOOK/cross-tools/common/libc.xml@ 3f4c1c5

Last change on this file since 3f4c1c5 was b608a6d, checked in by Andrew Bradford <andrew@…>, 11 years ago

libc: Create symlinks for musl ld

Just create one for each arch, that's the easy way out :)

Making this more elegant would be nice, but also doing what musl
recommends in their INSTALL file of creating an /etc/ld-musl-$ARCH.path
file with the proper shared library search path.

  • Property mode set to 100644
File size: 4.9 KB
RevLine 
[a9e389d]1<?xml version="1.0" encoding="ISO-8859-1"?>
[bd48e48]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[a9e389d]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
[75a0379]8<sect1 id="ch-cross-tools-libc" role="wrap">
9 <?dbhtml filename="libc.html"?>
[f9de3a9]10
[75a0379]11 <title>musl-libc-&musl-libc-version;</title>
[a9e389d]12
[75a0379]13 <indexterm zone="ch-cross-tools-libc">
14 <primary sortas="a-libc">musl-libc</primary>
[a9e389d]15 <secondary>cross tools</secondary>
16 </indexterm>
17
18 <sect2 role="package">
19 <title/>
20
[75a0379]21 <para>The musl-libc package contains the main C library. This library provides
[a9e389d]22 the basic routines for allocating memory, searching directories, opening and
23 closing files, reading and writing files, string handling, pattern matching,
24 arithmetic, and so on.</para>
25
26 </sect2>
27
28 <sect2 role="installation">
[75a0379]29 <title>Installation of musl-libc</title>
[e666df1]30
[466a568]31 <para os="h">Configure the package:</para>
[f23b5ee]32
[466a568]33<screen os="i"><userinput>CC=${CLFS_TARGET}-gcc ./configure \
34 --prefix=${CLFS}/cross-tools/${CLFS_TARGET} \
35 --target=${CLFS_TARGET} \
[75a0379]36 --enable-debug</userinput></screen>
[f23b5ee]37
[466a568]38 <para os="h">Compile the package:</para>
39
40<screen os="i"><userinput>CC=${CLFS_TARGET}-gcc make</userinput></screen>
41
[0dad5b9]42 <para os="l">Install the package:</para>
[a9e389d]43
[466a568]44<screen os="j"><userinput>make install</userinput></screen>
[a9e389d]45
[b608a6d]46 <para os="k">Make the proper symlinks for the dynamic loader such that
47 dynamically linked executables properly find the musl ld:</para>
48
49<screen os="m"><userinput>ln -s libc.so ${CLFS}/cross-tools/${CLFS_TARGET}/ld-musl-arm.so.1
50ln -s libc.so ${CLFS}/cross-tools/${CLFS_TARGET}/ld-musl-armhf.so.1
51ln -s libc.so ${CLFS}/cross-tools/${CLFS_TARGET}/ld-musl-i386.so.1
52ln -s libc.so ${CLFS}/cross-tools/${CLFS_TARGET}/ld-musl-mips.so.1</userinput></screen>
53
[a9e389d]54 </sect2>
55
[75a0379]56 <sect2 id="contents-musl-libc" role="content">
57 <title>Contents of musl-libc</title>
[a9e389d]58
59 <segmentedlist>
[b85507d]60 <segtitle>Installed Programs</segtitle>
61 <segtitle>Installed Libraries</segtitle>
62 <segtitle>Installed Headers</segtitle>
[a9e389d]63 <seglistitem>
[75a0379]64 <seg>ld-musl-libc.so.0</seg>
[b85507d]65 <seg> libc.so.0, libcrypt.so.0, libdl.so.0, libm.so.0, libpthread.so.0,
66 librt.so.0</seg>
67 <seg>To be written...</seg>
[a9e389d]68 </seglistitem>
69 </segmentedlist>
[b85507d]70
[a9e389d]71 <variablelist>
72 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
73 <?dbfo list-presentation="list"?>
74 <?dbhtml list-presentation="table"?>
75
[75a0379]76 <varlistentry id="ld-musl-libc">
77 <term><command>ld-musl-libc</command></term>
[a9e389d]78 <listitem>
[75a0379]79 <para>The musl-libc dynamic linker / loader</para>
80 <indexterm zone="ch-cross-tools-libc ld-musl-libc">
81 <primary sortas="b-ld-musl-libc">ld-musl-libc</primary>
[b85507d]82 </indexterm>
83 </listitem>
84 </varlistentry>
85
86 <varlistentry id="libc">
87 <term><filename class="libraryfile">libc</filename></term>
88 <listitem>
89 <para>The C library</para>
[75a0379]90 <indexterm zone="ch-cross-tools-libc libc">
[b85507d]91 <primary sortas="c-libc">libc</primary>
92 </indexterm>
93 </listitem>
94 </varlistentry>
95
96 <varlistentry id="libcrypt">
97 <term><filename class="libraryfile">libcrypt</filename></term>
98 <listitem>
99 <para>The cryptographic library</para>
[75a0379]100 <indexterm zone="ch-cross-tools-libc libcrypt">
[b85507d]101 <primary sortas="c-libcrypt">libcrypt</primary>
102 </indexterm>
103 </listitem>
104 </varlistentry>
105
106 <varlistentry id="libdl">
107 <term><filename class="libraryfile">libdl</filename></term>
108 <listitem>
[75a0379]109 <para>The musl-libc dynamic linker / loader library</para>
110 <indexterm zone="ch-cross-tools-libc libdl">
[b85507d]111 <primary sortas="c-libdl">libdl</primary>
[a9e389d]112 </indexterm>
113 </listitem>
114 </varlistentry>
115
[b85507d]116 <varlistentry id="libm">
117 <term><filename class="libraryfile">libm</filename></term>
118 <listitem>
119 <para>The math library</para>
[75a0379]120 <indexterm zone="ch-cross-tools-libc libm">
[b85507d]121 <primary sortas="c-libm">libm</primary>
122 </indexterm>
123 </listitem>
124 </varlistentry>
125
126 <varlistentry id="libpthread">
127 <term><filename class="libraryfile">libpthread</filename></term>
128 <listitem>
129 <para>The POSIX thread library</para>
[75a0379]130 <indexterm zone="ch-cross-tools-libc libpthread">
[b85507d]131 <primary sortas="c-libpthread">libpthread</primary>
132 </indexterm>
133 </listitem>
134 </varlistentry>
135
136 <varlistentry id="librt">
137 <term><filename class="libraryfile">librt</filename></term>
138 <listitem>
139 <para>The clock and timer library</para>
[75a0379]140 <indexterm zone="ch-cross-tools-libc librt">
[b85507d]141 <primary sortas="c-librt">librt</primary>
142 </indexterm>
143 </listitem>
144 </varlistentry>
145
146 </variablelist>
[a9e389d]147 </sect2>
148</sect1>
Note: See TracBrowser for help on using the repository browser.