source: general/prog/gcc2.xml@ c03da74e

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 c03da74e was 4f6275fd, checked in by Randy McMurchy <randy@…>, 20 years ago

Change hardcoded version numbers to entities in various packages

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2395 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><ulink url="&patch-root;/gcc-&gcc2-version;-2.patch"/></para></listitem>
45<listitem><para><ulink url="&patch-root;/gcc-&gcc2-version;-no_fixinc-1.patch"/></para></listitem>
46<listitem><para><ulink url="&patch-root;/gcc-&gcc2-version;-returntype_fix-1.patch"/></para></listitem>
47</itemizedlist>
48</sect3>
49
50</sect2>
51
52<sect2>
53<title>Installation of <application><acronym>GCC</acronym></application></title>
54
55<para>Apply the patches:</para>
56
57<screen><userinput><command>patch -Np1 -i ../gcc-&gcc2-version;-2.patch &amp;&amp;
58patch -Np1 -i ../gcc-&gcc2-version;-no_fixinc-1.patch &amp;&amp;
59patch -Np1 -i ../gcc-&gcc2-version;-returntype_fix-1.patch</command></userinput></screen>
60
61<para>The <acronym>GCC</acronym> development team recommends building in a
62separate directory.</para>
63
64<screen><userinput><command>mkdir ../gcc-build &amp;&amp;
65cd ../gcc-build</command></userinput></screen>
66
67<para>Configure <acronym>GCC</acronym> to build the
68<application>C</application> and <application>C++</application> compilers and
69enable the related <application>C++</application> options.</para>
70
71<screen><userinput><command>../gcc-&gcc2-version;/configure \
72 --prefix=/opt/gcc-&gcc2-version; \
73 --enable-shared --enable-languages=c,c++ \
74 --enable-threads=posix</command></userinput></screen>
75
76<para>Compile and install <acronym>GCC</acronym>:</para>
77
78<screen><userinput><command>make bootstrap &amp;&amp;
79make install</command></userinput></screen>
80
81<para>Make note of the library that is installed.</para>
82
83<screen><userinput><command>L=`find /opt/gcc-&gcc2-version;/lib -name "*libstdc++*.so" -type f` &amp;&amp;
84IL=`basename $L`</command></userinput></screen>
85
86<para>Move the <application>C++</application> libraries to the standard lib
87directory to avoid having to add <userinput>/opt/gcc-&gcc2-version;/lib
88</userinput> to <filename>/etc/ld.so.conf</filename>.</para>
89
90<screen><userinput><command>for i in /opt/gcc-&gcc2-version;/lib/*.so*; do mv -f $i /usr/lib;
91ln -sf /usr/lib/`basename $i` /opt/gcc-&gcc2-version;/lib; done</command></userinput></screen>
92
93<para>Create symlinks required by commercial and precompiled packages.</para>
94
95<screen><userinput><command>ln -sf $IL /usr/lib/libstdc++-libc6.1-1.so.2 &amp;&amp;
96ln -sf $IL /usr/lib/libstdc++-libc6.2-2.so.3 &amp;&amp;
97ln -sf $IL /usr/lib/libstdc++-libc6.3-2.so.3</command></userinput></screen>
98
99</sect2>
100
101<sect2>
102<title>Configuring <application><acronym>GCC</acronym></application></title>
103
104<sect3><title>Configuration Information</title>
105
106<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../../lib-config.xml"/>
107
108<para>The instructions given above make compatibility symlinks that pre-compiled
109packages in <acronym>BLFS</acronym> require. You may create additional
110compatibility links based on your requirements.</para>
111
112<para>If you only need the GCC-&gcc2-version; libraries, you may delete
113<filename>/opt/gcc-&gcc2-version;</filename>.</para>
114
115<para>Whenever you need to use GCC-&gcc2-version; instead of your system
116installed compiler, add
117<filename class="directory">/opt/gcc-&gcc2-version;/bin</filename> to the
118front of your <envar>PATH</envar> or (preferably) set the <envar>CC</envar>
119environment variable before compiling the concerned package.</para>
120
121</sect3>
122
123</sect2>
124
125<sect2>
126<title>Contents</title>
127
128<para>The GCC-&gcc2-version; package contains the
129<command>gcc</command>-&gcc2-version; <application>C</application> and
130<application>C++</application> compilers and GCC-&gcc2-version;
131<filename>libstdc++.so</filename> that is required by some commercial and
132pre-compiled packages.</para>
133
134</sect2>
135
136</sect1>
137
Note: See TracBrowser for help on using the repository browser.