source: general/prog/gcc2.xml@ e05cd03f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 e05cd03f was e05cd03f, checked in by Randy McMurchy <randy@…>, 14 years ago

Replaced deprecated w3.org XInclude throughout the book

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

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