Changeset 034eda7 for general/prog/gcc.xml
- Timestamp:
- 02/10/2013 08:46:59 PM (11 years ago)
- Branches:
- 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
- Children:
- 49f0ce04
- Parents:
- dc6bfb82
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/prog/gcc.xml
rdc6bfb82 r034eda7 9 9 <!ENTITY gcc-md5sum "cc308a0891e778cfda7a151ab8a6e762"> 10 10 <!ENTITY gcc-size "80 MB"> 11 <!ENTITY gcc-buildsize "~ 3.5GB (build, test and install all compilers)">12 <!ENTITY gcc-time "1 26SBU (build, test and install all compilers)">11 <!ENTITY gcc-buildsize "~6.1 GB (build, test and install all compilers)"> 12 <!ENTITY gcc-time "150 SBU (build, test and install all compilers)"> 13 13 14 14 <!ENTITY gnat-download-http "https://libre.adacore.com/download/"> … … 37 37 <para>The <application>GCC</application> package contains GNU compilers. 38 38 This package is useful for compiling programs written in C, C++, Fortran, 39 Java, Objective C, and Objective C++. You should ensure you actually40 need one of these additional compilers (C and C++ are installed in LFS)41 before you install them. Additionally, there are instructions in the BLFS42 book to install <xref linkend="openjdk"/>, which can be used instead of43 the Java provided by the <application>GCC</application> package. Many44 consider the Iced Tea version to be a more robust Java environment than the45 one provided by <application>GCC</application>.</para>39 Java, Objective C, Objective C++, Ada, and Go. You should ensure you 40 actually need one of these additional compilers (C and C++ are installed 41 in LFS) before you install them. Additionally, there are instructions in 42 the BLFS book to install <xref linkend="openjdk"/>, which can be used 43 instead of the Java provided by the <application>GCC</application> package. 44 Many consider the Iced Tea version to be a more robust Java environment 45 than the one provided by <application>GCC</application>.</para> 46 46 47 47 &lfs72_checked; … … 89 89 <para role="recommended"><xref linkend="dejagnu"/></para> 90 90 91 <bridgehead renderas="sect4">Required if building java</bridgehead> 92 <para role="required"> 93 <xref linkend="zip"/>, 94 <xref linkend="unzip"/>, and 95 <xref linkend="which"/> 96 </para> 97 91 98 <note> 92 <para>Building Ada from source is no longer supported by BLFS. The 93 upstream binary package is based on gcc-4.5.4 and is not suitable 94 for building Ada from the current <application>GCC</application> 95 package.</para> 99 <para>If you plan to compile Ada, you will need to install 100 <application>GNAT</application> temporarily to satisfy the circular 101 dependency when you recompile <application>GCC</application> 102 to include Ada. At the AdaCore download page, choose your platform and 103 2011, then select the file to download. You probably want the x86-linux 104 or x86_64-linux file.</para> 96 105 </note> 97 <!-- 98 <bridgehead renderas="sect3">GNAT GPL 201 2Package Information</bridgehead>106 <!-- Using 2011, because 2012 does not compile GCC-4.7.2 --> 107 <bridgehead renderas="sect3">GNAT GPL 2011 Package Information</bridgehead> 99 108 <itemizedlist spacing="compact"> 100 109 <listitem> … … 102 111 </listitem> 103 112 </itemizedlist> 104 --> 113 105 114 <para condition="html" role="usernotes">User Notes: 106 115 <ulink url="&blfs-wiki;/gcc"/></para> 107 116 108 117 </sect2> 109 <!-- 118 110 119 <sect2 role="installation"> 111 120 <title>Installation of GNAT</title> 112 121 113 <para>Before unpacking and changing into the GCC builddirectory, first122 <para>Before unpacking and changing into the GCC source directory, first 114 123 unpack the <application>GNAT</application> tarball and change into the 115 124 newly created directory and install <application>GNAT</application> by … … 127 136 128 137 <screen><userinput>cd .. && 129 rm -rf gnat-201 0-i686-gnu-linux-libc2.3-bin</userinput></screen>138 rm -rf gnat-2011-*</userinput></screen> 130 139 131 140 <para>Prepare to compile <application>GCC</application> by placing the … … 137 146 export PATH=<replaceable><Your build directory></replaceable>/gnat/bin:$PATH_HOLD</userinput></screen> 138 147 148 <para>Doing so has the drawback that the <application>GCC</application> 149 and <application>Binutils</application> executables are taken 150 from the just installed <application>GNAT</application> package, but the 151 versions of those executables are outdated compared to those installed in 152 LFS. This is not important for the <application>GCC</application> compilers, 153 since they recompile themselves during the bootstrap process. On the other 154 hand, the outdated <command>ld</command> and <command>as</command> tools 155 are used all along. In order to use the LFS tools, issue:</para> 156 157 <screen><userinput>find <replaceable><Your build directory></replaceable>/gnat -name ld -exec mv -v \{\} \{\}.old \; 158 find <replaceable><Your build directory></replaceable>/gnat -name as -exec mv -v \{\} \{\}.old \;</userinput></screen> 159 139 160 </sect2> 140 --> 161 141 162 <sect2 role="installation"> 142 163 <title>Installation of GCC</title> … … 149 170 <para>The installation process may overwrite your existing 150 171 <application>GCC</application> <command>gcc</command> and 151 <command>c++</command> compilers and libraries. Having the the172 <command>c++</command> compilers and libraries. Having the 152 173 <application>Tcl</application>, <application>Expect</application> and 153 174 <application>DejaGnu</application> packages installed before beginning … … 165 186 </important> 166 187 167 <para>The instructions below perform a <quote><command>make 168 bootstrap</command></quote> instead of just a plain 169 <quote><command>make</command></quote> intentionally. Even though it is 170 assumed that the current version of <application>GCC</application> is 171 installed in LFS, a bootstrap is recommended for robustness. </para> 172 173 <screen><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in && 188 <para>The instructions below let the build machinery perform a 189 <quote>bootstrap</quote> intentionally. This is necessary if you 190 install the <application>ADA</application> compiler anyway. Even 191 if you don't, a bootstrap is recommended for robustness.</para> 192 193 <screen><userinput>sed -i 's/\(install.*:\) install-.*recursive/\1/' libffi/Makefile.in && 194 sed -i 's/\(install-data-am:\).*/\1/' libffi/include/Makefile.in && 195 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in && 174 196 sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in && 175 197 … … 183 205 ../gcc-&gcc-version;/configure \ 184 206 --prefix=/usr \ 207 --libdir=/usr/lib \ 185 208 --libexecdir=/usr/lib \ 186 209 --with-system-zlib \ … … 189 212 --enable-__cxa_atexit \ 190 213 --disable-multilib \ 191 --enable-bootstrap \192 214 --enable-clocale=gnu \ 193 --enable-languages=c,c++,fortran,java,objc,obj-c++ && 194 195 make bootstrap && 215 --enable-lto \ 216 --enable-languages=c,c++,fortran,ada,go,java,objc,obj-c++ && 217 218 make && 196 219 make -k check && 197 220 … … 203 226 204 227 ln -v -sf ../usr/bin/cpp /lib && 205 ln -v -sf gcc /usr/bin/cc </userinput></screen> 206 207 <!-- 228 ln -v -sf gcc /usr/bin/cc && 229 208 230 chown -v -R root:root \ 209 /usr/lib/gcc/ i686-pc-linux-gnu/&gcc-version;/include\210 /usr/lib/gcc/ i686-pc-linux-gnu/&gcc-version;/ada{lib,include}</userinput></screen>211 --> 231 /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed} \ 232 /usr/lib/gcc/*linux-gnu/&gcc-version;/ada{lib,include}</userinput></screen> 233 <!-- Not needed since we do not install libffi 212 234 <para>The <filename class='libraryfile'>libffi</filename> interface header 213 235 is installed in a location where other packages will not be able to find … … 216 238 remedy this:</para> 217 239 218 <screen role="root"><userinput>ln -v -sf `find /usr/lib/gcc -name ffitarget.h` /usr/include</userinput></screen> 219 220 <!-- 240 <screen role="root"><userinput>ln -v -sf `find /usr/lib/gcc -name ffitarget.h` /usr/include</userinput></screen>--> 241 221 242 <para>You should now become the unprivileged user and remove the 222 243 <application>GNAT</application> installation and perform other 223 244 cleanups:</para> 224 245 225 <screen><userinput>rm -rf <replaceable><Your build directory></replaceable>/gnat</userinput></screen> 226 227 <screen><userinput>export PATH=$PATH_HOLD && 246 <screen><userinput>rm -rf <replaceable><Your build directory></replaceable>/gnat && 247 export PATH=$PATH_HOLD && 228 248 unset PATH_HOLD</userinput></screen> 229 --> 249 230 250 </sect2> 231 251 … … 233 253 <title>Command Explanations</title> 234 254 235 <para>The three <command>sed</command> commands are the same ones used 236 during the build of LFS.</para> 255 <para>The first two <command>sed</command> commands prevent the 256 installation of the <application>libffi</application> library bundled 257 with <application>GCC</application>, since it is outdated compared to 258 <xref linkend="libffi"/>. The three other <command>sed</command> commands 259 are the same ones used during the build of LFS.</para> 237 260 238 261 <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The … … 247 270 that files are created for the specific architecture of your computer.</para> 248 271 249 <para><parameter>--enable-bootstrap</parameter>: This parameter is used 272 <!-- Double dashes are forbidden in comments, so use "- -". Change it to 273 double dash if you ever remove this comment! 274 <para><parameter>- -enable-bootstrap</parameter>: This parameter is used 250 275 so that a bootstrap installation is performed.</para> 251 276 --> 252 277 <para><parameter>--enable-clocale=gnu</parameter>: This parameter is a 253 278 failsafe for incomplete locale data.</para> 254 279 280 <para><parameter>--enable-lto</parameter>: Setting this parameter allows 281 to build a compiler which is able to perform <quote>link time 282 optimization (lto)</quote>.</para> 283 255 284 <para> 256 <parameter>--enable-languages=c,c++,fortran,java,objc,obj-c++ </parameter>:257 This command identifies which languages to build. You may modify this command258 t o remove undesired languages.</para>285 <parameter>--enable-languages=c,c++,fortran,java,objc,obj-c++,ada,go</parameter>: 286 This command identifies which languages to build. You may modify 287 this command to remove undesired languages.</para> 259 288 260 289 <para><command>make -k check</command>: This command runs the test suite … … 274 303 <para><command>ln -v -sf gcc /usr/bin/cc</command>: This link is created as 275 304 some packages refer to the C compiler using an alternate name.</para> 276 <!-- 305 277 306 <para><command>chown -v -R root:root 278 /usr/lib/gcc/ i686-pc-linux-gnu/...</command>:307 /usr/lib/gcc/*linux-gnu/...</command>: 279 308 If the package is built by a user other than root, the ownership of the 280 309 installed <filename class='directory'>include</filename> and … … 284 313 command changing the Ada directories if you did not include Ada as one of 285 314 the installed languages.</para> 286 --> 315 287 316 </sect2> 288 317 … … 296 325 297 326 <seglistitem> 298 <seg>addr2name.awk, fastjar, gcj, gcj-dbtool,gcjh, gfortran, gij, 299 gjnih, gprmake, 300 grepjar, grmic, grmiregistry, gtreelang, jcf-dump, jv-convert, jv-scan 301 and architecture specific names for gcj and gcjh</seg> 302 <seg>libffi.{so,a}, libgcj.{so,a}, libgfortran.{so,a}, 303 libgfortranbegin.a, libgij.{so,a}, libobjc.{so,a} and numerous other 327 <seg>aot-compile, gappletviewer, gc-analyze, gccgo, gcj, gcj-dbtool, 328 gcjh, gfortran, gij, gjar, gjarsigner, gjavah, gkeytool, 329 gnat, gnatbind, gnatchop, gnatclean, gnatfind, gnative2ascii, gnatkr, 330 gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref, gorbd, 331 grmic, grmid, grmiregistry, gserialver, gtnameserv, jcf-dump, 332 jv-convert, rebuild-gcj-db, and architecture specific names</seg> 333 <seg>libgcj_bc.so, libgcj.so, libgcj-tools.so, libgfortran.{so,a}, 334 libgij.so, libgo.{so,a}, libgobegin.a, libobjc.{so,a} and numerous other 304 335 run-time libraries and executables in /usr/lib/gcc</seg> 305 <seg>/usr/include/c++/&gcc-version;/{gcj,gnu,java,javax,org}, 306 /usr/lib/gcj-&gcc-version;, 336 <seg>/usr/include/c++/&gcc-version;/{gcj,gnu,java,javax,org,sun}, 337 /usr/lib/gcc/<arch-model>-linux-gnu/&gcc-version;/ada{include,lib}, 338 /usr/lib/gcj-&gcc-version;-13, 339 /usr/lib/go, 307 340 /usr/lib/security, 308 341 and /usr/share/java</seg> … … 320 353 <?dbhtml list-presentation="table"?> 321 354 322 <varlistentry id="addr2name.awk"> 323 <term><command>addr2name.awk</command></term> 324 <listitem> 325 <para> emulates some of the functionality of addr2line.</para> 326 <indexterm zone="gcc addr2name.awk"> 327 <primary sortas="b-addr2name.awk">addr2name.awk</primary> 328 </indexterm> 329 </listitem> 330 </varlistentry> 331 332 <varlistentry id="fastjar-gcc"> 333 <term><command>fastjar</command></term> 334 <listitem> 335 <para>is an archive tool for <application>Java</application> archives.</para> 336 <indexterm zone="gcc fastjar-gcc"> 337 <primary sortas="b-fastjar">fastjar</primary> 355 <varlistentry id="aot-compile"> 356 <term><command>aot-compile</command></term> 357 <listitem> 358 <para>searches a directory for Java bytecode and uses 359 <command>gcj</command> to compile it to native code.</para> 360 <indexterm zone="gcc aot-compile"> 361 <primary sortas="b-aot-compile">aot-compile</primary> 362 </indexterm> 363 </listitem> 364 </varlistentry> 365 366 <varlistentry id="gappletviewer"> 367 <term><command>gappletviewer</command></term> 368 <listitem> 369 <para>loads and run a <application>Java</application> applet.</para> 370 <indexterm zone="gcc gappletviewer"> 371 <primary sortas="b-gappletviewer">gappletviewer</primary> 372 </indexterm> 373 </listitem> 374 </varlistentry> 375 376 <varlistentry id="gc-analyze"> 377 <term><command>gc-analyze</command></term> 378 <listitem> 379 <para>analyzes garbage collector (GC) memory dumps from 380 <application>Java</application> code.</para> 381 <indexterm zone="gcc gc-analyze"> 382 <primary sortas="b-gc-analyze">gc-analyze</primary> 383 </indexterm> 384 </listitem> 385 </varlistentry> 386 387 <varlistentry id="gccgo"> 388 <term><command>gccgo</command></term> 389 <listitem> 390 <para>is a GCC-based compiler for the 391 <application>Go</application> language.</para> 392 <indexterm zone="gcc gccgo"> 393 <primary sortas="b-gccgo">gccgo</primary> 338 394 </indexterm> 339 395 </listitem> … … 395 451 </varlistentry> 396 452 397 <varlistentry id="gjnih"> 398 <term><command>gjnij</command></term> 399 <listitem> 400 <para>is used to generate JNI header files from class files. Running 401 it is equivalent to running <command>gcjh -jni</command>.</para> 402 <indexterm zone="gcc gjnih"> 403 <primary sortas="b-gjnih">gjnih</primary> 404 </indexterm> 405 </listitem> 406 </varlistentry> 407 <!-- 453 <varlistentry id="gjar"> 454 <term><command>gjar</command></term> 455 <listitem> 456 <para>is an (partial) implementation of the <command>jar</command> 457 utility that comes with Sun's JDK.</para> 458 <indexterm zone="gcc gjar"> 459 <primary sortas="b-gjar">gjar</primary> 460 </indexterm> 461 </listitem> 462 </varlistentry> 463 464 <varlistentry id="gjarsigner"> 465 <term><command>gjarsigner</command></term> 466 <listitem> 467 <para>is a Java ARchive (JAR) file signing and verification 468 tool.</para> 469 <indexterm zone="gcc gjarsigner"> 470 <primary sortas="b-gjarsigner">gjarsigner</primary> 471 </indexterm> 472 </listitem> 473 </varlistentry> 474 475 <varlistentry id="gjavah"> 476 <term><command>gjavah</command></term> 477 <listitem> 478 <para>generates header files from Java class files.</para> 479 <indexterm zone="gcc gjavah"> 480 <primary sortas="b-gjavah">gjavah</primary> 481 </indexterm> 482 </listitem> 483 </varlistentry> 484 485 <varlistentry id="gkeytool"> 486 <term><command>gkeytool</command></term> 487 <listitem> 488 <para>manages private keys and public certificates in a 489 <application>Java</application> environment.</para> 490 <indexterm zone="gcc gkeytool"> 491 <primary sortas="b-gkeytool">gkeytool</primary> 492 </indexterm> 493 </listitem> 494 </varlistentry> 495 408 496 <varlistentry id="gnat"> 409 497 <term><command>gnat</command></term> … … 427 515 </varlistentry> 428 516 429 <varlistentry id="gnatbl">430 <term><command>gnatbl</command></term>431 <listitem>432 <para>is the <application>Ada</application> linker.</para>433 <indexterm zone="gcc gnatbl">434 <primary sortas="b-gnatbl">gnatbl</primary>435 </indexterm>436 </listitem>437 </varlistentry>438 439 517 <varlistentry id="gnatchop"> 440 518 <term><command>gnatchop</command></term> … … 469 547 </varlistentry> 470 548 549 <varlistentry id="gnative2ascii"> 550 <term><command>gnative2ascii</command></term> 551 <listitem> 552 <para>is an encoding converter for <application>Java</application>.</para> 553 <indexterm zone="gcc gnative2ascii"> 554 <primary sortas="b-gnative2ascii">gnative2ascii</primary> 555 </indexterm> 556 </listitem> 557 </varlistentry> 558 471 559 <varlistentry id="gnatkr"> 472 560 <term><command>gnatkr</command></term> … … 540 628 </listitem> 541 629 </varlistentry> 542 --> 543 <varlistentry id="gprmake"> 544 <term><command>gprmake</command></term> 545 <listitem> 546 <para>is a tool used to create <filename>Makefile</filename>s that 547 support compilation by multiple languages.</para> 548 <indexterm zone="gcc gprmake"> 549 <primary sortas="b-gprmake">gprmake</primary> 550 </indexterm> 551 </listitem> 552 </varlistentry> 553 554 <varlistentry id="grepjar"> 555 <term><command>grepjar</command></term> 556 <listitem> 557 <para>searches <filename>jar</filename> files for a pattern.</para> 558 <indexterm zone="gcc grepjar"> 559 <primary sortas="b-grepjar">grepjar</primary> 630 631 <varlistentry id="gorbd"> 632 <term><command>gorbd</command></term> 633 <listitem> 634 <para>is an object request broker daemon.</para> 635 <indexterm zone="gcc gorbd"> 636 <primary sortas="b-gorbd">gorbd</primary> 560 637 </indexterm> 561 638 </listitem> … … 572 649 </varlistentry> 573 650 651 <varlistentry id="grmid-gcc"> 652 <term><command>grmid</command></term> 653 <listitem> 654 <para>RMI activation system daemon.</para> 655 <indexterm zone="gcc grmid-gcc"> 656 <primary sortas="b-grmid">grmid</primary> 657 </indexterm> 658 </listitem> 659 </varlistentry> 660 574 661 <varlistentry id="grmiregistry-gcc"> 575 662 <term><command>grmiregistry</command></term> … … 582 669 </varlistentry> 583 670 584 <varlistentry id="gtreelang"> 585 <term><command>gtreelang</command></term> 586 <listitem> 587 <para>is largely a cut down version of C, designed to showcase the 588 features of the <application>GCC</application> code generation back 589 end. Only those features that are directly supported by the 590 <application>GCC</application> code generation back end are 591 implemented. Features are implemented in a manner which is easiest 592 and clearest to implement. Not all or even most code generation back 593 end features are implemented. The intention is to add features 594 incrementally until most features of the 595 <application>GCC</application> back end are implemented in 596 Treelang.</para> 597 <indexterm zone="gcc gtreelang"> 598 <primary sortas="b-gtreelang">gtreelang</primary> 671 <varlistentry id="gserialver"> 672 <term><command>gserialver</command></term> 673 <listitem> 674 <para> prints the serialVersionUID of the specified class.</para> 675 <indexterm zone="gcc gserialver"> 676 <primary sortas="b-gserialver">gserialver</primary> 677 </indexterm> 678 </listitem> 679 </varlistentry> 680 681 <varlistentry id="gtnameserv"> 682 <term><command>gtnameserv</command></term> 683 <listitem> 684 <para> starts a naming service.</para> 685 <indexterm zone="gcc gtnameserv"> 686 <primary sortas="b-gtnameserv">gtnameserv</primary> 599 687 </indexterm> 600 688 </listitem> … … 622 710 </varlistentry> 623 711 624 <varlistentry id="jv-scan"> 625 <term><command>jv-scan</command></term> 626 <listitem> 627 <para>prints information about <application>Java</application> 628 source files.</para> 629 <indexterm zone="gcc jv-scan"> 630 <primary sortas="b-jv-scan">jv-scan</primary> 712 <varlistentry id="rebuild-gcj-db"> 713 <term><command>rebuild-gcj-db</command></term> 714 <listitem> 715 <para>Merge the per-solib databases made by 716 <application>aot-compile</application> into one system-wide 717 database.</para> 718 <indexterm zone="gcc rebuild-gcj-db"> 719 <primary sortas="b-rebuild-gcj-db">rebuild-gcj-db</primary> 631 720 </indexterm> 632 721 </listitem>
Note:
See TracChangeset
for help on using the changeset viewer.