source: BOOK/temp-system/common/coreutils.xml@ d9ed6c3

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since d9ed6c3 was 01672b8, checked in by Chris Staub <chris@…>, 12 years ago

Do not use sed -i in temp-system as the host cannot be guaranteed to have GNU sed

  • Property mode set to 100644
File size: 3.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-temp-system-coreutils" role="wrap">
9 <?dbhtml filename="coreutils.html"?>
10
11 <title>Coreutils-&coreutils-version;</title>
12
13 <indexterm zone="ch-temp-system-coreutils">
14 <primary sortas="a-Coreutils">Coreutils</primary>
15 <secondary>temporary system</secondary>
16 </indexterm>
17
18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
19 href="../../final-system/common/coreutils.xml"
20 xpointer="xpointer(//*[@role='package'])"/>
21
22 <sect2 role="installation">
23 <title>Installation of Coreutils</title>
24
25 <para os="aa">The following command updates the timestamps on the uname
26 and hostname man pages so that the Makefile does not attempt to regenerate
27 them:</para>
28
29<screen os="ab"><userinput>touch man/uname.1 man/hostname.1</userinput></screen>
30
31 <para os="ba">Configure can not properly determine how to get free space
32 when cross-compiling - as a result, the <command>df</command> program will
33 not be built. Add the following entries to <filename>config.cache</filename>
34 to correct this, and fix various cross-compiling issues:</para>
35
36<screen os="bb"><userinput>cat &gt; config.cache &lt;&lt; EOF
37fu_cv_sys_stat_statfs2_bsize=yes
38gl_cv_func_working_mkstemp=yes
39EOF</userinput></screen>
40
41 <para os="bd">Prepare Coreutils for compilation:</para>
42
43<screen os="be"><userinput>./configure --prefix=/tools \
44 --build=${CLFS_HOST} --host=${CLFS_TARGET} \
45 --enable-install-program=hostname --cache-file=config.cache</userinput></screen>
46
47<!--- Hack for coreutils to build for target executables which can't be ran with the host. -->
48 <para os="h1">Coreutils does not build make-prime-list properly and the host cannot execute it. We build it using the host compiler so it can be executed for the generation of data required for the build.</para>
49
50<screen os="h2"><userinput>cp -v Makefile{,.orig}
51sed '/src_make_prime_list/d' Makefile.orig > Makefile
52depbase=`echo src/make-prime-list.o | sed 's|[^/]*$|.deps/&amp;|;s|\.o$||'`;\
53 gcc -std=gnu99 -I. -I./lib -Ilib -I./lib -Isrc -I./src \
54 -fdiagnostics-show-option -funit-at-a-time -g -O2 -MT \
55 src/make-prime-list.o -MD -MP -MF $depbase.Tpo -c -o src/make-prime-list.o \
56 src/make-prime-list.c &amp;&amp;
57mv -f $depbase.Tpo $depbase.Po
58gcc -std=gnu99 -fdiagnostics-show-option -funit-at-a-time -g -O2 \
59 -Wl,--as-needed -o src/make-prime-list src/make-prime-list.o
60</userinput></screen>
61
62 <para os="h3">Remove the building of the hostname man page as it is affected by the previous commands.</para>
63
64<screen os="h4"><userinput>cp -v Makefile{,.bak}
65sed -e '/hostname.1/d' Makefile.bak > Makefile</userinput></screen>
66<!-- End hack -->
67
68 <para os="bf">Compile the package:</para>
69
70<screen os="bg"><userinput>make</userinput></screen>
71
72 <para os="bh">Install the package:</para>
73
74<screen os="bi"><userinput>make install</userinput></screen>
75
76 </sect2>
77
78 <sect2 role="content">
79 <title/>
80
81 <para>Details on this package are located in <xref
82 linkend="contents-coreutils" role="."/></para>
83
84 </sect2>
85
86</sect1>
Note: See TracBrowser for help on using the repository browser.