<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://cblfs.nicewhileitlasted.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=134.53.26.201</id>
	<title>CBLFS - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://cblfs.nicewhileitlasted.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=134.53.26.201"/>
	<link rel="alternate" type="text/html" href="https://cblfs.nicewhileitlasted.com/Special:Contributions/134.53.26.201"/>
	<updated>2026-05-21T01:43:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>?title=GCC&amp;diff=8368</id>
		<title>GCC</title>
		<link rel="alternate" type="text/html" href="?title=GCC&amp;diff=8368"/>
		<updated>2007-03-20T13:00:55Z</updated>

		<summary type="html">&lt;p&gt;134.53.26.201: /* Multilib */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;font-size: 5em; color: red;&amp;quot;&amp;gt;BIG FAT WARNING!&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;You are about to over-write your currently installed &#039;&#039;GCC&#039;&#039;. If you have &#039;&#039;ANY&#039;&#039; doubts that this may fail. Do not continue. Also, Do not continue with &#039;&#039;make install&#039;&#039; unless you are &#039;&#039;100% confident&#039;&#039; that your build was successful!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Downcload Source:&lt;br /&gt;
| http://ftp.gnu.org/gnu/gcc/gcc-{{GCC-Version}}/gcc-{{GCC-Version}}.tar.bz2&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Download Patch:&lt;br /&gt;
| http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/gcc-{{GCC-Version}}-PR20425-1.patch&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Ada compiler is not built on this page.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction to GCC ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Package Description Needed&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Recommended ===&lt;br /&gt;
* [[DejaGnu]]&lt;br /&gt;
=== Optional (Required to Build the Fortran Compiler) ===&lt;br /&gt;
* [[GMP]]&lt;br /&gt;
* [[MPFR]]&lt;br /&gt;
=== Optional (Java&#039;s Classpath Library Can Use) ===&lt;br /&gt;
* [[LibXML2]]&lt;br /&gt;
* [[LibXSLT]]&lt;br /&gt;
* [[Gtk2]]&lt;br /&gt;
* [[cairo]]&lt;br /&gt;
* [[Pango]]&lt;br /&gt;
* [[Qt3]]&lt;br /&gt;
* [[Qt4]]&lt;br /&gt;
* [[ALSA]]&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
The following patch fixes the searching of multilib dirs for specs file. The patch standardizes the gcc drivers path iteration functions, ensuring multilib directories are searched in the correct order. This fixes various issues, most noticably with libtool on multilib systems:&lt;br /&gt;
&lt;br /&gt;
  patch -Np1 -i ../gcc-{{GCC-Version}}-PR20425-1.patch&lt;br /&gt;
&lt;br /&gt;
On a &#039;&#039;&#039;Pure64&#039;&#039;&#039; system, apply the following patch:&lt;br /&gt;
&lt;br /&gt;
  patch -Np1 -i ../gcc-{{GCC-Version}}-pure64-1.patch&lt;br /&gt;
&lt;br /&gt;
Apply a sed  substitution that will suppress the installation of libiberty.a. The version of libiberty.a that was provided by Binutils during the initial CLFS build will be retained:&lt;br /&gt;
&lt;br /&gt;
  sed -i &#039;s/install_to_$(INSTALL_DEST) //&#039; libiberty/Makefile.in&lt;br /&gt;
&lt;br /&gt;
The GCC documentation recommends building GCC outside of the source directory in a dedicated build directory:&lt;br /&gt;
&lt;br /&gt;
  mkdir -v ../gcc-build &amp;amp;&amp;amp;&lt;br /&gt;
  cd ../gcc-build&lt;br /&gt;
&lt;br /&gt;
Configure gcc, adding the additional language support you require to the --enable-languages= switch.  &#039;&#039;&#039;Note:&#039;&#039;&#039;  This configuration does not include all supported languages.&lt;br /&gt;
&lt;br /&gt;
  ../gcc-{{GCC-Version}}/configure --prefix=/usr --libdir=/usr/lib \&lt;br /&gt;
    --libexecdir=/usr/lib --enable-shared --enable-threads=posix \&lt;br /&gt;
    --enable-__cxa_atexit --enable-c99 --enable-long-long \&lt;br /&gt;
    --enable-clocale=gnu --disable-libstdcxx-pch --disable-multilib \&lt;br /&gt;
    --enable-languages=c,c++,objc,f95,java&lt;br /&gt;
&lt;br /&gt;
Compile gcc:&lt;br /&gt;
&lt;br /&gt;
  make bootstrap&lt;br /&gt;
&lt;br /&gt;
The gcc test suite is vitally, critically important.  Do not skip it under any circumstances.  The GCC test suite is very comprehensive and is almost guaranteed to generate a few failures.  Test the results, but don&#039;t stop at errors:&lt;br /&gt;
&lt;br /&gt;
  make -k check&lt;br /&gt;
&lt;br /&gt;
To see the results of the the test suite, issue the following command:&lt;br /&gt;
&lt;br /&gt;
  ../gcc-{{GCC-Version}}/contrib/test_summary&lt;br /&gt;
&lt;br /&gt;
* For only the summaries, pipe the output through grep -A7 Summ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;At this time only proceed if you are 100% positive that you have built a sane compiler.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As the root user, install the collection of compilers:&lt;br /&gt;
&lt;br /&gt;
  make install &amp;amp;&amp;amp;&lt;br /&gt;
  ln -sfv ../usr/bin/cpp /lib &amp;amp;&amp;amp;&lt;br /&gt;
  ln -sfv gcc /usr/bin/cc &amp;amp;&amp;amp;&lt;br /&gt;
  chown -Rv root:root /usr/lib/gcc/$(gcc -dumpmachine)/{{GCC-Version}}/include &amp;amp;&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you included Java as one of the languages, create the following symlink:&lt;br /&gt;
&lt;br /&gt;
  ln -sfv `find /usr/lib/gcc -name ffitarget.h` /usr/include&lt;br /&gt;
&lt;br /&gt;
=== Command Explanations ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--enable-shared&#039;&#039;: Build shared versions of libraries, if shared libraries are supported on the target platform. Shared libraries are enabled by default on all platforms that support shared libraries. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--enable-threads=posix&#039;&#039;: This enables C++ exception handling for multi-threaded code according to the POSIX/Unix98 standard.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--enable-__cxa_atexit&#039;&#039;: This option allows use of __cxa_atexit, rather than atexit, to register C++ destructors for local statics and global objects and is essential for fully standards-compliant handling of destructors. It also affects the C++ ABI and therefore results in C++ shared libraries and C++ programs that are interoperable with other Linux distributions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--enable-c99&#039;&#039;: Enable C99 support for C programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--enable-long-long&#039;&#039;: Enables long long support in the compiler.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--enable-clocale=gnu&#039;&#039;: This is a failsafe for incomplete locale data.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--enable-languages=c,c++,objc,f95,java&#039;&#039;: This command tells configure which languages you wish to build compilers for. You can modify this command to add or removed the various languages that GCC supports.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--disable-multilib&#039;&#039;: Specify that multiple target libraries to support different target variants, calling conventions, etc should not be built. The default is to build a predefined set of them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;--disable-libstdcxx-pch&#039;&#039;: Do not build the pre-compiled header (PCH) for libstdc++. It takes up a lot of space, and we have no use for it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ln -v -sf ../usr/bin/cpp /lib&#039;&#039;&#039;: This creates a link in /lib to the C PreProcessor. There are packages that expect it to be installed in the /lib directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ln -v -sf gcc /usr/bin/cc&#039;&#039;&#039;: Some packages use the more generic &#039;&#039;&#039;cc&#039;&#039;&#039; command instead of &#039;&#039;&#039;gcc&#039;&#039;&#039;, so we need a symlink to &#039;&#039;&#039;gcc&#039;&#039;&#039; allowing them to call &#039;&#039;&#039;gcc&#039;&#039;&#039; in that manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;chown -Rv root:root /usr/lib/gcc/$(gcc -dumpmachine)/4.1.1/include&#039;&#039;&#039;: If you build the package as a user other than root, then root won&#039;t own the files. In order to correct this, we chown them to root (both user and group).&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
The following patch fixes the searching of multilib dirs for specs file. The patch standardizes the gcc drivers path iteration functions, ensuring multilib directories are searched in the correct order. This fixes various issues, most noticably with libtool on multilib systems:&lt;br /&gt;
&lt;br /&gt;
 patch -Np1 -i ../gcc-{{GCC-Version}}-PR20425-1.patch&lt;br /&gt;
&lt;br /&gt;
Suppress the installation of libiberty.a. The version of libiberty.a provided by Binutils will be used instead:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s/install_to_$(INSTALL_DEST) //&#039; libiberty/Makefile.in&lt;br /&gt;
&lt;br /&gt;
Create the Build Directory:&lt;br /&gt;
&lt;br /&gt;
 mkdir -v ../gcc-build &amp;amp;&amp;amp;&lt;br /&gt;
 cd ../gcc-build&lt;br /&gt;
&lt;br /&gt;
Configure GCC:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=&amp;quot;${PKG_CONFIG_PATH64}&amp;quot; &amp;amp;&amp;amp;&lt;br /&gt;
 ../gcc-{{GCC-Version}}/configure --prefix=/usr --libdir=/usr/lib64 \&lt;br /&gt;
     --libexecdir=/usr/lib64 --enable-shared --enable-threads=posix \&lt;br /&gt;
     --enable-__cxa_atexit --enable-c99 --enable-long-long \&lt;br /&gt;
     --enable-clocale=gnu --disable-libstdcxx-pch --enable-multilib \&lt;br /&gt;
     --enable-languages=c,c++,objc,f95,java,treelang&lt;br /&gt;
&lt;br /&gt;
Compile GCC:&lt;br /&gt;
&lt;br /&gt;
 make bootstrap &amp;amp;&amp;amp;&lt;br /&gt;
 unset PKG_CONFIG_PATH&lt;br /&gt;
&lt;br /&gt;
Test the results, but do not stop at errors:&lt;br /&gt;
&lt;br /&gt;
 make -k check&lt;br /&gt;
&lt;br /&gt;
The -k flag is used to make the test suite run through to completion and not stop at the first failure. The GCC test suite is very comprehensive and is almost guaranteed to generate a few failures. To receive a summary of the test suite results, run:&lt;br /&gt;
&lt;br /&gt;
 ../gcc-{{GCC-Version}}/contrib/test_summary&lt;br /&gt;
&lt;br /&gt;
* For only the summaries, pipe the output through grep -A7 Summ.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;At this time only proceed if you are 100% positive that you have built a sane compiler.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install GCC:&lt;br /&gt;
&lt;br /&gt;
 make install &amp;amp;&amp;amp;&lt;br /&gt;
 ln -sfv ../usr/bin/cpp /lib &amp;amp;&amp;amp;&lt;br /&gt;
 ln -sfv gcc /usr/bin/cc &amp;amp;&amp;amp;&lt;br /&gt;
 chown -Rv root:root /usr/lib64/gcc/$(gcc -dumpmachine)/{{GCC-Version}}/include &amp;amp;&amp;amp;&lt;br /&gt;
 chown -Rv root:root /usr/lib64/gcc/$(gcc -dumpmachine)/{{GCC-Version}}/ada{lib,include}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;libffi&#039;&#039;&#039; interface header is installed in a location where other packages will not be able to find it. If you included Java as one of the installed languages, create a symbolic link in &#039;&#039;&#039;/usr/include&#039;&#039;&#039; to remedy this:&lt;br /&gt;
&lt;br /&gt;
 ln -sfv `find /usr/lib64/gcc -name ffitarget.h` /usr/include&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! Installed Programs:&lt;br /&gt;
| addr2name.awk, fastjar, gcj, gcj-dbtool,gcjh, gfortran, gij, gjnih, grepjar, grmic, grmiregistry, gtreelang, jcf-dump, jv-convert, jv-scan and architecture specific names for gcj and gcjh&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! Installed Libraries:&lt;br /&gt;
| libffi.{so,a}, libgcj.{so,a}, libgfortran.{so,a}, libgfortranbegin.a, libgij.{so,a}, libobjc.{so,a} and numerous other run-time libraries and executables in /usr/lib/gcc&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! Installed Directories:&lt;br /&gt;
| /usr/include/c++/4.0.3/{gcj,gnu,java,javax,org}, /usr/lib/gcj-4.0.3, /usr/lib/security and /usr/share/java&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Short Descriptions ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! addr2name.awk&lt;br /&gt;
| emulates some of the functionality of addr2line for those systems that don&#039;t have it.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! fastjar&lt;br /&gt;
| an attempt at creating a feature-for-feature copy of Sun&#039;s JDK&#039;s &#039;&#039;&#039;jar&#039;&#039;&#039; command . It&#039;s 50-100 times faster than &#039;&#039;&#039;jar&#039;&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! gcj&lt;br /&gt;
| is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode (class files) or directly to native machine code, and Java bytecode to native machine code.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! gcj-dbtool&lt;br /&gt;
| is a tool for creating and manipulating class file mapping databases.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! gcjh&lt;br /&gt;
| generates header files from Java class files.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! gfortran&lt;br /&gt;
| is a Fortran 95 front end to GCC.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! gij&lt;br /&gt;
| is the GNU interpreter for Java bytecode.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! gjnij&lt;br /&gt;
| is used to generate JNI header files from class files. Running it is equivalent to running gcjh -jni.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! grepjar&lt;br /&gt;
| searches jar files for a pattern.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! grmic&lt;br /&gt;
| is a utility included with libgcj which generates stubs for remote objects.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! grmiregistry&lt;br /&gt;
| starts a remote object registry on the current host.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! gtreelang&lt;br /&gt;
| is Treelang front end for GCC. Treelang is a sample language, useful only to help people understand how to implement a new language front end to GCC. It is not a useful language in itself other than as an example or basis for building a new language. Therefore only language developers are likely to have an interest in it.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! jcf-dump&lt;br /&gt;
| is a class file examiner, similar to &#039;&#039;&#039;javap.&#039;&#039;&#039; It will print information about a number of classes, which are specified by class name or file name.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! jv-convert&lt;br /&gt;
| is a utility included with &amp;quot;libgcj&amp;quot; which converts a file from one encoding to another.  It is similar to the Unix iconv utility.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
! jv-scan&lt;br /&gt;
| can be used to print information about a Java source file.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>134.53.26.201</name></author>
	</entry>
</feed>