aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06
diff options
context:
space:
mode:
authorDJ Lucas <dj@linuxfromscratch.org>2016-12-17 06:46:18 +0000
committerDJ Lucas <dj@linuxfromscratch.org>2016-12-17 06:46:18 +0000
commitbe3d9f313a25000d1cbaa631852be62330828f2c (patch)
tree87d04399c46fe7a8612b0f3247011dc1c55adb46 /chapter06
parent9f3c264e7c4b780161c70e899c09084bc1c400bd (diff)
Merge nosym branch.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11154 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r--chapter06/creatingdirs.xml4
-rw-r--r--chapter06/gcc.xml16
-rw-r--r--chapter06/glibc.xml15
-rw-r--r--chapter06/libcap.xml12
4 files changed, 38 insertions, 9 deletions
diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml
index 80e5dc474..1a1de7f1a 100644
--- a/chapter06/creatingdirs.xml
+++ b/chapter06/creatingdirs.xml
@@ -24,9 +24,7 @@ mkdir -v /usr/libexec
mkdir -pv /usr/{,local/}share/man/man{1..8}
case $(uname -m) in
- x86_64) ln -sv lib /lib64
- ln -sv lib /usr/lib64
- ln -sv lib /usr/local/lib64 ;;
+ x86_64) mkdir -v /lib64 ;;
esac
mkdir -v /var/{log,mail,spool}
diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml
index fe997becf..6a75fb287 100644
--- a/chapter06/gcc.xml
+++ b/chapter06/gcc.xml
@@ -45,6 +45,16 @@
<screen><userinput remap="pre">patch -Np1 -i ../gcc-6.1.0-asan-1.patch</userinput></screen>
-->
+ <para>If building on x86_64, change the default direcotory name for 64-bit
+ libraries to <quote>lib</quote>:</para>
+
+<screen><userinput remap="pre">case $(uname -m) in
+ x86_64)
+ sed -e '/m64=/s/lib64/lib/' \
+ -i.orig gcc/config/i386/t-linux64
+ ;;
+esac</userinput></screen>
+
<para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
<screen><userinput remap="pre">mkdir -v build
@@ -175,10 +185,8 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \
<para>Depending on your machine architecture, the above may differ slightly,
the difference usually being the name of the directory
- after <filename class="directory">/usr/lib/gcc</filename>. If your machine is
- a 64-bit system, you may also see a directory named <filename class="directory">lib64</filename>
- towards the end of the string. The important thing to
- look for here is that <command>gcc</command> has found all three
+ after <filename class="directory">/usr/lib/gcc</filename>. The important
+ thing to look for here is that <command>gcc</command> has found all three
<filename>crt*.o</filename> files under the
<filename class="directory">/usr/lib</filename> directory.</para>
diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml
index 1a908a822..2c8718932 100644
--- a/chapter06/glibc.xml
+++ b/chapter06/glibc.xml
@@ -57,6 +57,18 @@
<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
+ <para>Create a symlink for LSB compliance and, for x86_64, a
+ compatibility symlink required for the dynamic loader to function
+ correctly:</para>
+
+<screen><userinput remap="pre">case $(uname -m) in
+ x86) ln -s ld-linux.so.2 /lib/ld-lsb.so.3
+ ;;
+ x86_64) ln -s ../lib/ld-linux-x86-64.so.2 /lib64
+ ln -s ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
+ ;;
+esac</userinput></screen>
+
<para>The Glibc documentation recommends building Glibc
in a dedicated build directory:</para>
@@ -67,7 +79,8 @@ cd build</userinput></screen>
<screen><userinput remap="configure">../configure --prefix=/usr \
--enable-kernel=&min-kernel; \
- --enable-obsolete-rpc</userinput></screen>
+ --enable-obsolete-rpc \
+ libc_cv_slibdir=/lib</userinput></screen>
<para>Compile the package:</para>
diff --git a/chapter06/libcap.xml b/chapter06/libcap.xml
index 76d855263..cabcb1774 100644
--- a/chapter06/libcap.xml
+++ b/chapter06/libcap.xml
@@ -55,7 +55,7 @@
<para>Install the package:</para>
-<screen><userinput remap="install">make RAISE_SETFCAP=no prefix=/usr install
+<screen><userinput remap="install">make RAISE_SETFCAP=no lib=lib prefix=/usr install
chmod -v 755 /usr/lib/libcap.so</userinput></screen>
<variablelist>
@@ -70,6 +70,16 @@ chmod -v 755 /usr/lib/libcap.so</userinput></screen>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>lib=lib</parameter></term>
+ <listitem>
+ <para>This parameter installs the library in
+ <filename>$prefix/lib</filename> rather than
+ <filename>$prefix/lib64</filename> on x86_64. It has no effect on
+ x86.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
<para>The shared library needs to be moved to