source: general/prog/gcc2.xml@ 3b5a5cc

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3b5a5cc was 07b157f4, checked in by Randy McMurchy <randy@…>, 20 years ago

Standardized 'Recommended Patch:' on various package instructions; Revised KOffice 'Additional download' section; Minor wording changes to Dillo instructions

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2400 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 5.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY gcc2-download-http "http://ftp.gnu.org/gnu/gcc/gcc-&gcc2-version;.tar.gz">
8 <!ENTITY gcc2-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc2-version;.tar.gz">
9 <!ENTITY gcc2-size "9.4 MB">
10 <!ENTITY gcc2-buildsize "150 MB">
11 <!ENTITY gcc2-time "2.60 SBU">
12]>
13
14<sect1 id="gcc2" xreflabel="GCC-&gcc2-version;">
15<?dbhtml filename="gcc2.html" ?>
16<title>GCC-&gcc2-version;</title>
17
18<sect2>
19<title>Introduction to <application><acronym>GCC</acronym></application>-&gcc2-version;</title>
20
21<para>There are two reasons for installing
22<acronym>GCC</acronym>-&gcc2-version;. The first is that the kernel
23developers have certified <acronym>GCC</acronym>-&gcc2-version; as the
24preferred compiler for compiling the kernel. The other (and more compelling
25reason) is that some commercial closed-source packages (such as Netscape
26Navigator, Yahoo Pager) and precompiled packages (such as Mozilla)
27are linked against <acronym>GCC</acronym>-&gcc2-version; libs.</para>
28
29<sect3><title>Package information</title>
30<itemizedlist spacing='compact'>
31<listitem><para>Download (HTTP): <ulink
32url="&gcc2-download-http;"/></para></listitem>
33<listitem><para>Download (FTP): <ulink
34url="&gcc2-download-ftp;"/></para></listitem>
35<listitem><para>Download size: &gcc2-size;</para></listitem>
36<listitem><para>Estimated Disk space required:
37&gcc2-buildsize;</para></listitem>
38<listitem><para>Estimated build time:
39&gcc2-time;</para></listitem></itemizedlist>
40</sect3>
41
42<sect3><title>Additional downloads</title>
43<itemizedlist spacing='compact'>
44<listitem><para>Required Patch: <ulink
45url="&patch-root;/gcc-&gcc2-version;-2.patch"/></para></listitem>
46<listitem><para>Required Patch: <ulink
47url="&patch-root;/gcc-&gcc2-version;-no_fixinc-1.patch"/></para></listitem>
48<listitem><para>Required Patch: <ulink
49url="&patch-root;/gcc-&gcc2-version;-returntype_fix-1.patch"/></para></listitem>
50</itemizedlist>
51</sect3>
52
53</sect2>
54
55<sect2>
56<title>Installation of <application><acronym>GCC</acronym></application></title>
57
58<para>Apply the patches:</para>
59
60<screen><userinput><command>patch -Np1 -i ../gcc-&gcc2-version;-2.patch &amp;&amp;
61patch -Np1 -i ../gcc-&gcc2-version;-no_fixinc-1.patch &amp;&amp;
62patch -Np1 -i ../gcc-&gcc2-version;-returntype_fix-1.patch</command></userinput></screen>
63
64<para>The <acronym>GCC</acronym> development team recommends building in a
65separate directory.</para>
66
67<screen><userinput><command>mkdir ../gcc-build &amp;&amp;
68cd ../gcc-build</command></userinput></screen>
69
70<para>Configure <acronym>GCC</acronym> to build the
71<application>C</application> and <application>C++</application> compilers and
72enable the related <application>C++</application> options.</para>
73
74<screen><userinput><command>../gcc-&gcc2-version;/configure \
75 --prefix=/opt/gcc-&gcc2-version; \
76 --enable-shared --enable-languages=c,c++ \
77 --enable-threads=posix</command></userinput></screen>
78
79<para>Compile and install <acronym>GCC</acronym>:</para>
80
81<screen><userinput><command>make bootstrap &amp;&amp;
82make install</command></userinput></screen>
83
84<para>Make note of the library that is installed.</para>
85
86<screen><userinput><command>L=`find /opt/gcc-&gcc2-version;/lib -name "*libstdc++*.so" -type f` &amp;&amp;
87IL=`basename $L`</command></userinput></screen>
88
89<para>Move the <application>C++</application> libraries to the standard lib
90directory to avoid having to add <userinput>/opt/gcc-&gcc2-version;/lib
91</userinput> to <filename>/etc/ld.so.conf</filename>.</para>
92
93<screen><userinput><command>for i in /opt/gcc-&gcc2-version;/lib/*.so*; do mv -f $i /usr/lib;
94ln -sf /usr/lib/`basename $i` /opt/gcc-&gcc2-version;/lib; done</command></userinput></screen>
95
96<para>Create symlinks required by commercial and precompiled packages.</para>
97
98<screen><userinput><command>ln -sf $IL /usr/lib/libstdc++-libc6.1-1.so.2 &amp;&amp;
99ln -sf $IL /usr/lib/libstdc++-libc6.2-2.so.3 &amp;&amp;
100ln -sf $IL /usr/lib/libstdc++-libc6.3-2.so.3</command></userinput></screen>
101
102</sect2>
103
104<sect2>
105<title>Configuring <application><acronym>GCC</acronym></application></title>
106
107<sect3><title>Configuration Information</title>
108
109<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../../lib-config.xml"/>
110
111<para>The instructions given above make compatibility symlinks that pre-compiled
112packages in <acronym>BLFS</acronym> require. You may create additional
113compatibility links based on your requirements.</para>
114
115<para>If you only need the GCC-&gcc2-version; libraries, you may delete
116<filename>/opt/gcc-&gcc2-version;</filename>.</para>
117
118<para>Whenever you need to use GCC-&gcc2-version; instead of your system
119installed compiler, add
120<filename class="directory">/opt/gcc-&gcc2-version;/bin</filename> to the
121front of your <envar>PATH</envar> or (preferably) set the <envar>CC</envar>
122environment variable before compiling the concerned package.</para>
123
124</sect3>
125
126</sect2>
127
128<sect2>
129<title>Contents</title>
130
131<para>The GCC-&gcc2-version; package contains the
132<command>gcc</command>-&gcc2-version; <application>C</application> and
133<application>C++</application> compilers and GCC-&gcc2-version;
134<filename>libstdc++.so</filename> that is required by some commercial and
135pre-compiled packages.</para>
136
137</sect2>
138
139</sect1>
140
Note: See TracBrowser for help on using the repository browser.