Changeset ae0673a
- Timestamp:
- 05/24/2015 05:43:45 PM (9 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 64eb9189
- Parents:
- b39a80c
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
general/prog/gcc-ada.xml
rb39a80c rae0673a 5 5 %general-entities; 6 6 7 <!ENTITY gcc-download-http "http ://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">7 <!ENTITY gcc-download-http "https://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2"> 8 8 <!ENTITY gcc-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2"> 9 <!ENTITY gcc-md5sum " 4df8ee253b7f3863ad0b86359cd39c43">10 <!ENTITY gcc-size " 86MB">11 <!ENTITY gcc-ada-buildsize " 5.1GB (0.7 GB added if GNAT install dir is not removed)">12 <!ENTITY gcc-ada-time "1 14 SBU (including 72SBU for tests)">9 <!ENTITY gcc-md5sum "d5525b1127d07d215960e6051c5da35e"> 10 <!ENTITY gcc-size "91 MB"> 11 <!ENTITY gcc-ada-buildsize "6.4 GB (0.7 GB added if GNAT install dir is not removed)"> 12 <!ENTITY gcc-ada-time "125 SBU (including 73 SBU for tests)"> 13 13 14 14 <!ENTITY gnat-download-http "https://libre.adacore.com/download/"> … … 38 38 <title>Introduction to the GCC Ada compiler</title> 39 39 40 <para>Ada is a modern programming language designed for large, long-lived 41 applications — and embedded systems in particular — where 42 reliability and efficiency are essential. It has a set of unique technical 43 features that make it highly effective for use in large, complex and 44 safety-critical projects.</para> 45 46 <para>The compiler and associated tools on this page are known as the 47 <application>GNAT</application> technology, developed by the Adacore 48 company, using the <application>GCC</application> backend. Since 49 parts of the Ada compiler are written in Ada, there is a circular 50 dependency on an Ada compiler. The instructions below first install 51 a binary compiler.</para> 40 <para> 41 Ada is a modern programming language designed for large, long-lived 42 applications — and embedded systems in particular — where 43 reliability and efficiency are essential. It has a set of unique technical 44 features that make it highly effective for use in large, complex and 45 safety-critical projects. 46 </para> 47 48 <para> 49 The compiler and associated tools on this page are known as the 50 <application>GNAT</application> technology, developed by the Adacore 51 company, using the <application>GCC</application> backend. Since 52 parts of the Ada compiler are written in Ada, there is a circular 53 dependency on an Ada compiler. The instructions below first install 54 a binary compiler. You do not need to do that if you already have built 55 <application>GNAT</application> tools. 56 </para> 52 57 53 58 &lfs77_checked; 54 59 55 60 <caution> 56 <para>Using the instructions on this page will have the effect that 57 the C and C++ compiler and libraries will be reinstalled, overwriting 58 the ones on your system. This may lead to some issues. Please read the 59 notes and caution on the <xref linkend="gcc"/> page.</para> 61 <para> 62 Using the instructions on this page will have the effect that 63 the C and C++ compiler and libraries will be reinstalled, overwriting 64 the ones on your system. This may lead to some issues. Please read the 65 notes and caution on the <xref linkend="gcc"/> page. 66 </para> 60 67 </caution> 68 69 <note> 70 <para> 71 If you want to install other compilers in the <application>GCC 72 </application> collection, do that first, or specify ada in the 73 <parameter>--enable-languages</parameter> switch to <command> 74 configure</command>. If you rebuild <application>GCC</application> 75 without enabling ada after running the instructions on this page, 76 the new compiler will not be able to compile ADA anymore. 77 </para> 78 </note> 61 79 62 80 <bridgehead renderas="sect3">Package Information</bridgehead> 63 81 <itemizedlist spacing="compact"> 64 82 <listitem> 65 <para>Download (HTTP): <ulink url="&gcc-download-http;"/></para> 66 </listitem> 67 <listitem> 68 <para>Download (FTP): <ulink url="&gcc-download-ftp;"/></para> 69 </listitem> 70 <listitem> 71 <para>Download MD5 sum: &gcc-md5sum;</para> 72 </listitem> 73 <listitem> 74 <para>Download size: &gcc-size;</para> 75 </listitem> 76 <listitem> 77 <para>Estimated disk space required: &gcc-ada-buildsize;</para> 78 </listitem> 79 <listitem> 80 <para>Estimated build time: &gcc-ada-time;</para> 83 <para> 84 Download (HTTP): <ulink url="&gcc-download-http;"/> 85 </para> 86 </listitem> 87 <listitem> 88 <para> 89 Download (FTP): <ulink url="&gcc-download-ftp;"/> 90 </para> 91 </listitem> 92 <listitem> 93 <para> 94 Download MD5 sum: &gcc-md5sum; 95 </para> 96 </listitem> 97 <listitem> 98 <para> 99 Download size: &gcc-size; 100 </para> 101 </listitem> 102 <listitem> 103 <para> 104 Estimated disk space required: &gcc-ada-buildsize; 105 </para> 106 </listitem> 107 <listitem> 108 <para> 109 Estimated build time: &gcc-ada-time; 110 </para> 81 111 </listitem> 82 112 </itemizedlist> … … 84 114 <bridgehead renderas="sect3">Additional Downloads</bridgehead> 85 115 <note> 86 <para>You will need to install <application>GNAT</application> 87 temporarily to satisfy the circular dependency. You may point your 88 browser to the <ulink url="&gnat-download-http;">AdaCore download 89 page</ulink>, choose your platform and 2014, then select the file 90 to download. Alternatively, direct links to the 64 bit and 32 bit 91 linux versions are given below.</para> 116 <para> 117 You will need to install <application>GNAT</application> 118 temporarily to satisfy the circular dependency. You may point your 119 browser to the <ulink url="&gnat-download-http;">AdaCore download 120 page</ulink>, choose your platform and 2014, then select the file 121 to download. Alternatively, direct links to the 64 bit and 32 bit 122 linux versions are given below. 123 </para> 92 124 </note> 93 125 … … 123 155 </para> 124 156 </listitem> 125 <!--<listitem>157 <listitem> 126 158 <para> 127 159 Required patch: 128 <ulink url="&patch-root;/gcc-&gcc-version;-upstream_ fixes-1.patch"/>129 </para> 130 </listitem> -->160 <ulink url="&patch-root;/gcc-&gcc-version;-upstream_libgomp_fix-1.patch"/> 161 </para> 162 </listitem> 131 163 </itemizedlist> 132 164 … … 146 178 <title>Installation of the GNAT binary</title> 147 179 148 <para>Before unpacking and changing into the GCC source directory, first 149 unpack the <application>GNAT</application> tarball, and change to the 150 GNAT directory. Then, install the <application>GNAT</application> binary 151 by running the following command as the 152 <systemitem class="username">root</systemitem> user:</para> 180 <para> 181 Before unpacking and changing into the GCC source directory, first 182 unpack the <application>GNAT</application> tarball, and change to the 183 GNAT directory. Then, install the <application>GNAT</application> binary 184 by running the following command as the 185 <systemitem class="username">root</systemitem> user: 186 </para> 153 187 154 188 <screen role="root"><userinput>make ins-all prefix=/opt/gnat</userinput></screen> 155 189 156 <para>The <application>GNAT</application> compiler can be invoked by 157 executing the <command>gcc</command> binary installed in <filename 158 class="directory">/opt/gnat/bin</filename>.</para> 159 160 <para>You may now remove the <application>GNAT</application> 161 source directory if desired.</para> 162 163 <para>Prepare to compile <application>GCC</application> by placing the 164 <application>GNAT</application> version of <command>gcc</command> at the 165 beginning of the <envar>PATH</envar> variable by using the following 166 commands:</para> 190 <para> 191 The <application>GNAT</application> compiler can be invoked by 192 executing the <command>gcc</command> binary installed in <filename 193 class="directory">/opt/gnat/bin</filename>. 194 </para> 195 196 <para> 197 You may now remove the <application>GNAT</application> 198 source directory if desired. 199 </para> 200 201 <para> 202 Prepare to compile <application>GCC</application> by placing the 203 <application>GNAT</application> version of <command>gcc</command> at the 204 beginning of the <envar>PATH</envar> variable by using the following 205 commands: 206 </para> 167 207 168 208 <screen><userinput>PATH_HOLD=$PATH && 169 209 export PATH=/opt/gnat/bin:$PATH_HOLD</userinput></screen> 170 210 171 <para>Doing so has the drawback that the <application>GCC</application> 172 and <application>Binutils</application> executables are taken 173 from the just installed <application>GNAT</application> package, but the 174 versions of those executables are outdated compared to those installed in 175 LFS. This is not important for the <application>GCC</application> compilers, 176 since they recompile themselves during the bootstrap process. On the other 177 hand, the outdated <command>ld</command> and <command>as</command> tools 178 are used all along. In order to use the LFS tools, issue as the 179 <systemitem class="username">root</systemitem> user:</para> 211 <para> 212 Doing so has the drawback that the <application>GCC</application> 213 and <application>Binutils</application> executables are taken 214 from the just installed <application>GNAT</application> package, but the 215 versions of those executables are outdated compared to those installed in 216 LFS. This is not important for the <application>GCC</application> compilers, 217 since they recompile themselves during the bootstrap process. On the other 218 hand, the outdated <command>ld</command> and <command>as</command> tools 219 are used all along. In order to use the LFS tools, issue as the 220 <systemitem class="username">root</systemitem> user: 221 </para> 180 222 181 223 <screen role="root"><userinput>find /opt/gnat -name ld -exec mv -v {} {}.old \; … … 186 228 <sect2 role="installation"> 187 229 <title>Installation of GCC Ada</title> 188 <!-- 189 <para>As in LFS, fix a problem identified upstream:</para> 190 191 <screen><userinput>sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen> 192 --> 193 194 <para>Install <application>GCC Ada</application> by running the 195 following commands:</para> 196 197 <screen><userinput><!-- 198 patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch && 199 -->mkdir ../gcc-build && 230 231 <para> 232 As in LFS, fix a problem identified upstream with the libgomp library: 233 </para> 234 235 <screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-upstream_libgomp_fix-1.patch</userinput></screen> 236 237 <para> 238 Install <application>GCC Ada</application> by running the 239 following commands: 240 </para> 241 242 <screen><userinput>mkdir ../gcc-build && 200 243 cd ../gcc-build && 201 244 202 245 ../gcc-&gcc-version;/configure \ 203 246 --prefix=/usr \ 204 --libdir=/usr/lib \205 --enable-shared \206 --enable-threads=posix \207 --enable-__cxa_atexit \208 --enable-clocale=gnu \209 247 --disable-multilib \ 210 248 --with-system-zlib \ … … 212 250 make</userinput></screen> 213 251 214 <para>If you have installed additional packages such as 215 <application>Valgrind</application> and <application>GDB</application>, 216 the <application>GCC</application> part of the testsuite will run more 217 tests than in LFS. Some of those will report FAIL and others XPASS 218 (pass when expected to FAIL). To run the tests, issue:</para> 252 <para> 253 If you have installed additional packages such as 254 <application>Valgrind</application> and <application>GDB</application>, 255 the <application>GCC</application> part of the testsuite will run more 256 tests than in LFS. Some of those will report FAIL and others XPASS 257 (pass when expected to FAIL). To run the tests, issue: 258 </para> 219 259 220 260 <screen><userinput>ulimit -s 32768 && … … 223 263 to be run. --> 224 264 225 <para>The tests are very long, and the results may be hard to find in the 226 logs, specially if you use parallel jobs with make. You can get a summary 227 of the tests with:</para> 265 <para> 266 The tests are very long, and the results may be hard to find in the 267 logs, specially if you use parallel jobs with make. You can get a summary 268 of the tests with: 269 </para> 228 270 229 271 <screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen> 230 272 231 <para>Now, as the <systemitem class="username">root</systemitem> user:</para> 273 <para> 274 Now, as the <systemitem class="username">root</systemitem> user: 275 </para> 232 276 233 277 <screen role="root"><userinput>make install && … … 240 284 /usr/lib/gcc/*linux-gnu/&gcc-version;/ada{lib,include}</userinput></screen> 241 285 242 <para>You should now remove the <application>GNAT</application> 243 installation and perform other cleanups:</para> 244 245 <screen><userinput>rm -rf /opt/gnat && 246 export PATH=$PATH_HOLD && 286 <para> 287 You should now remove the <application>GNAT</application> 288 installation and perform other cleanups. First, as the <systemitem 289 class="username">root</systemitem> user: 290 </para> 291 292 <screen role="root"><userinput>rm -rf /opt/gnat</userinput></screen> 293 294 <para> 295 Then, as a normal user: 296 </para> 297 298 <screen><userinput>export PATH=$PATH_HOLD && 247 299 unset PATH_HOLD</userinput></screen> 248 300 … … 251 303 <sect2 role="commands"> 252 304 <title>Command Explanations</title> 253 <!-- 254 <para> 255 <command>patch ... gcc-&gcc-version;-upstream_fixes-1.patch</command>: 256 This patch corrects bugs in the C++ compiler, which lead to 257 segmentation faults in some cases. 258 </para> 259 --> 260 261 <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The 262 <application>GCC</application> documentation recommends 263 building the package in a dedicated build directory.</para> 264 265 <para><parameter>--enable-shared --enable-threads=posix 266 --enable-__cxa_atexit</parameter>: These parameters are required to build 267 the <application>C++</application> libraries to published standards.</para> 268 269 <para><parameter>--enable-clocale=gnu</parameter>: This parameter is a 270 failsafe for incomplete locale data.</para> 271 272 <para><parameter>--disable-multilib</parameter>: This parameter ensures 273 that files are created for the specific architecture of your computer.</para> 305 306 <para> 307 <command>mkdir ../gcc-build; cd ../gcc-build</command>: The 308 <application>GCC</application> documentation recommends 309 building the package in a dedicated build directory. 310 </para> 311 312 <para> 313 <parameter>--disable-multilib</parameter>: This parameter ensures 314 that files are created for the specific architecture of your computer. 315 </para> 274 316 275 317 <para> … … 288 330 </para> 289 331 290 <para><command>ulimit -s 32768</command>: This command prevents several 291 tests from running out of stack space.</para> 292 293 <para><command>make -k check</command>: This command runs the test suite 294 without stopping if any errors are encountered.</para> 295 296 <para><command>../gcc-&gcc-version;/contrib/test_summary</command>: This 297 command will produce a summary of the test suite results. You can append 298 <command>| grep -A7 Summ</command> to the command to produce an even more 299 condensed version of the summary. You may also wish to redirect the output 300 to a file for review and comparison later on.</para> 301 302 <para><command>chown -v -R root:root /usr/lib/gcc/*linux-gnu/...</command>: 303 If the package is built by a user other than root, the ownership of the 304 installed <filename class="directory">include</filename> and 305 <filename class="directory">adalib</filename> directories (and their 306 contents) will be incorrect. These commands change the ownership to the 307 <systemitem class="username">root</systemitem> user and group.</para> 332 <para> 333 <option>--with-default-libstdcxx-abi=c++98</option>: Use this switch if you 334 are building <application>GNAT</application> tools using a 335 <application>GCC</application> version prior to 5.1.0, 336 and you do not want to recompile all the libraries written in C++. 337 </para> 338 339 <para> 340 <command>ulimit -s 32768</command>: This command prevents several 341 tests from running out of stack space. 342 </para> 343 344 <para> 345 <command>make -k check</command>: This command runs the test suite 346 without stopping if any errors are encountered. 347 </para> 348 349 <para> 350 <command>../gcc-&gcc-version;/contrib/test_summary</command>: This 351 command will produce a summary of the test suite results. You can append 352 <command>| grep -A7 Summ</command> to the command to produce an even more 353 condensed version of the summary. You may also wish to redirect the output 354 to a file for review and comparison later on. 355 </para> 356 357 <para> 358 <command>chown -v -R root:root /usr/lib/gcc/*linux-gnu/...</command>: 359 If the package is built by a user other than root, the ownership of the 360 installed <filename class="directory">include</filename> and 361 <filename class="directory">adalib</filename> directories (and their 362 contents) will be incorrect. These commands change the ownership to the 363 <systemitem class="username">root</systemitem> user and group. 364 </para> 308 365 309 366 </sect2> … … 320 377 <seg> 321 378 gnat, gnatbind, gnatchop, gnatclean, gnatfind, gnatkr, 322 gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref, 323 and a run-time executable, gnat1, in <filename class="directory"> 324 /usr/libexec/<arch-triplet>/&gcc-version;</filename> 379 gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref 325 380 </seg> 326 381 <seg> … … 334 389 </segmentedlist> 335 390 336 <para>Only the Ada specific files are listed here. Others can be found at 337 <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were 338 initially installed during the building of LFS.</para> 391 <para> 392 Only the Ada specific files are listed here. Others can be found at 393 <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were 394 initially installed during the building of LFS. 395 </para> 339 396 340 397 <variablelist> … … 346 403 <term><command>gnat</command></term> 347 404 <listitem> 348 <para>is a wrapper that accepts a number of commands and calls 349 the corresponding tool from the list below.</para> 405 <para> 406 is a wrapper that accepts a number of commands and calls 407 the corresponding tool from the list below. 408 </para> 350 409 <indexterm zone="gcc-ada gnat"> 351 410 <primary sortas="b-gnat">gnat</primary> … … 357 416 <term><command>gnatbind</command></term> 358 417 <listitem> 359 <para>is used to bind compiled objects.</para> 418 <para> 419 is used to bind compiled objects. 420 </para> 360 421 <indexterm zone="gcc-ada gnatbind"> 361 422 <primary sortas="b-gnatbind">gnatbind</primary> … … 367 428 <term><command>gnatchop</command></term> 368 429 <listitem> 369 <para>is useful for renaming files to meet the standard 370 <application>Ada</application> default file naming conventions.</para> 430 <para> 431 is useful for renaming files to meet the standard 432 <application>Ada</application> default file naming conventions. 433 </para> 371 434 <indexterm zone="gcc-ada gnatchop"> 372 435 <primary sortas="b-gnatchop">gnatchop</primary> … … 378 441 <term><command>gnatclean</command></term> 379 442 <listitem> 380 <para>is used to remove files associated with a 381 <application>GNAT</application> project.</para> 443 <para> 444 is used to remove files associated with a 445 <application>GNAT</application> project. 446 </para> 382 447 <indexterm zone="gcc-ada gnatclean"> 383 448 <primary sortas="b-gnatclean">gnatclean</primary> … … 389 454 <term><command>gnatfind</command></term> 390 455 <listitem> 391 <para> is intended for locating definition and/or references to 392 specified entities in a <application>GNAT</application> project.</para> 456 <para> 457 is intended for locating definition and/or references to 458 specified entities in a <application>GNAT</application> project. 459 </para> 393 460 <indexterm zone="gcc-ada gnatfind"> 394 461 <primary sortas="b-gnatfind">gnatfind</primary> … … 400 467 <term><command>gnatkr</command></term> 401 468 <listitem> 402 <para>is used to determine the crunched name for a given file, when 403 crunched to a specified maximum length.</para> 469 <para> 470 is used to determine the crunched name for a given file, when 471 crunched to a specified maximum length. 472 </para> 404 473 <indexterm zone="gcc-ada gnatkr"> 405 474 <primary sortas="b-gnatkr">gnatkr</primary> … … 411 480 <term><command>gnatlink</command></term> 412 481 <listitem> 413 <para>is used to link programs and build an executable file.</para> 482 <para> 483 is used to link programs and build an executable file. 484 </para> 414 485 <indexterm zone="gcc-ada gnatlink"> 415 486 <primary sortas="b-gnatlink">gnatlink</primary> … … 421 492 <term><command>gnatls</command></term> 422 493 <listitem> 423 <para>is the compiled unit browser.</para> 494 <para> 495 is the compiled unit browser. 496 </para> 424 497 <indexterm zone="gcc-ada gnatls"> 425 498 <primary sortas="b-gnatls">gnatls</primary> … … 431 504 <term><command>gnatmake</command></term> 432 505 <listitem> 433 <para>is the <application>Ada</application> compiler, which performs 434 compilaton, binding and linking.</para> 506 <para> 507 is the <application>Ada</application> compiler, which performs 508 compilaton, binding and linking. 509 </para> 435 510 <indexterm zone="gcc-ada gnatmake"> 436 511 <primary sortas="b-gnatmake">gnatmake</primary> … … 442 517 <term><command>gnatname</command></term> 443 518 <listitem> 444 <para>will list the files associated with a 445 <application>GNAT</application> project.</para> 519 <para> 520 will list the files associated with a 521 <application>GNAT</application> project. 522 </para> 446 523 <indexterm zone="gcc-ada gnatname"> 447 524 <primary sortas="b-gnatname">gnatname</primary> … … 453 530 <term><command>gnatprep</command></term> 454 531 <listitem> 455 <para>is the <application>GNAT</application> external 456 preprocessor.</para> 532 <para> 533 is the <application>GNAT</application> external preprocessor. 534 </para> 457 535 <indexterm zone="gcc-ada gnatprep"> 458 536 <primary sortas="b-gnatprep">gnatprep</primary> … … 464 542 <term><command>gnatxref</command></term> 465 543 <listitem> 466 <para>is similar to <command>gnatfind</command>, but generates 467 a full report of all cross-references.</para> 544 <para> 545 is similar to <command>gnatfind</command>, but generates 546 a full report of all cross-references. 547 </para> 468 548 <indexterm zone="gcc-ada gnatxref"> 469 549 <primary sortas="b-gnatxref">gnatxref</primary> -
general/prog/gcc-java.xml
rb39a80c rae0673a 5 5 %general-entities; 6 6 7 <!ENTITY gcc-java-download-http "http ://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">7 <!ENTITY gcc-java-download-http "https://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2"> 8 8 <!ENTITY gcc-java-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2"> 9 <!ENTITY gcc-java-md5sum " 4df8ee253b7f3863ad0b86359cd39c43">10 <!ENTITY gcc-java-size " 86MB">11 <!ENTITY gcc-java-buildsize " 3.0GB">12 <!ENTITY gcc-java-time " 84 SBU (including 70SBU for tests)">9 <!ENTITY gcc-java-md5sum "d5525b1127d07d215960e6051c5da35e"> 10 <!ENTITY gcc-java-size "91 MB"> 11 <!ENTITY gcc-java-buildsize "4.1 GB"> 12 <!ENTITY gcc-java-time "78 SBU (including 65 SBU for tests)"> 13 13 14 14 <!ENTITY ecj-download-ftp "ftp://sourceware.org/pub/java/ecj-latest.jar"> 15 15 16 <!ENTITY antlr-version "4. 2.2">16 <!ENTITY antlr-version "4.5"> 17 17 <!ENTITY antlr-download-http "http://www.antlr.org/download/antlr-&antlr-version;-complete.jar"> 18 18 ]> … … 29 29 30 30 <indexterm zone="gcc"> 31 <primary sortas="a-gcc-java- 4-0">GCC-Java-&gcc-version;</primary>31 <primary sortas="a-gcc-java-5-0">GCC-Java-&gcc-version;</primary> 32 32 </indexterm> 33 33 … … 35 35 <title>Introduction to GCC-Java</title> 36 36 37 <para> See the introduction to the Java language and system at38 <xref linkend="java"/>. The GNU Compiler Collection (GCC) contains39 a Java compiler to native code. Together with the40 <application>ecj</application> Java compiler from Eclipse (to bytecode),41 it provides a way to build an acceptable JVM from source. However, since42 the release of <application>OpenJDK</application>, the development43 of GCC-Java has almost stopped, and the built JVM is an old version.44 One reason to build45 this system is that it can be used to bootstrap <xref linkend="openjdk"/>,46 without the need for downloading a Java binary.</para>37 <para> 38 See the introduction to the Java language and system at 39 <xref linkend="java"/>. The GNU Compiler Collection (GCC) contains 40 a Java compiler to native code. Together with the 41 <application>ecj</application> Java compiler from Eclipse (to bytecode), 42 it provides a way to build an acceptable JVM from source. However, since 43 the release of <application>OpenJDK</application>, the development 44 of GCC-Java has almost stopped, and the built JVM is an old version, 45 which cannot be used for building <xref linkend="openjdk"/>. 46 </para> 47 47 48 48 &lfs77_checked; 49 49 50 50 <caution> 51 <para>Using the instructions on this page will have the effect that 52 the C and C++ compiler and libraries will be reinstalled, overwriting 53 the ones on your system. This may lead to some issues. Please read the 54 note and caution on the <xref linkend="gcc"/> page.</para> 51 <para> 52 Using the instructions on this page will have the effect that 53 the C and C++ compiler and libraries will be reinstalled, overwriting 54 the ones on your system. This may lead to some issues. Please read the 55 note and caution on the <xref linkend="gcc"/> page. 56 </para> 55 57 </caution> 56 58 … … 58 60 <itemizedlist spacing="compact"> 59 61 <listitem> 60 <para>Download (HTTP): <ulink url="&gcc-java-download-http;"/></para> 61 </listitem> 62 <listitem> 63 <para>Download (FTP): <ulink url="&gcc-java-download-ftp;"/></para> 64 </listitem> 65 <listitem> 66 <para>Download MD5 sum: &gcc-java-md5sum;</para> 67 </listitem> 68 <listitem> 69 <para>Download size: &gcc-java-size;</para> 70 </listitem> 71 <listitem> 72 <para>Estimated disk space required: &gcc-java-buildsize;</para> 73 </listitem> 74 <listitem> 75 <para>Estimated build time: &gcc-java-time;</para> 62 <para> 63 Download (HTTP): <ulink url="&gcc-java-download-http;"/> 64 </para> 65 </listitem> 66 <listitem> 67 <para> 68 Download (FTP): <ulink url="&gcc-java-download-ftp;"/> 69 </para> 70 </listitem> 71 <listitem> 72 <para> 73 Download MD5 sum: &gcc-java-md5sum; 74 </para> 75 </listitem> 76 <listitem> 77 <para> 78 Download size: &gcc-java-size; 79 </para> 80 </listitem> 81 <listitem> 82 <para> 83 Estimated disk space required: &gcc-java-buildsize; 84 </para> 85 </listitem> 86 <listitem> 87 <para> 88 Estimated build time: &gcc-java-time; 89 </para> 76 90 </listitem> 77 91 </itemizedlist> … … 81 95 <listitem> 82 96 <para> 83 Eclipse Java compiler: 84 <ulink url="&ecj-download-ftp;"/> 97 Eclipse Java compiler: <ulink url="&ecj-download-ftp;"/> 85 98 </para> 86 99 </listitem> … … 91 104 </para> 92 105 </listitem> 93 <!--<listitem>106 <listitem> 94 107 <para> 95 108 Required patch: 96 <ulink url="&patch-root;/gcc-&gcc-version;-upstream_ fixes-1.patch"/>97 </para> 98 </listitem> -->109 <ulink url="&patch-root;/gcc-&gcc-version;-upstream_libgomp_fix-1.patch"/> 110 </para> 111 </listitem> 99 112 </itemizedlist> 100 113 101 <bridgehead renderas="sect3">GCC Dependencies</bridgehead>114 <bridgehead renderas="sect3">GCC Java Dependencies</bridgehead> 102 115 103 116 <bridgehead renderas="sect4">Required</bridgehead> 104 117 <para role="required"> 105 <xref linkend=" zip"/>,106 <xref linkend=" unzip"/>, and107 <xref linkend=" which"/>118 <xref linkend="unzip"/>, 119 <xref linkend="which"/>, and 120 <xref linkend="zip"/> 108 121 </para> 109 122 … … 129 142 <title>Installation of GCC Java</title> 130 143 131 <para>The instructions below assume that the C and C++ compilers have 132 the same version as the one you are installing, so that a 133 <quote>bootstrap</quote> is not necessary. If you are upgrading 134 the GCC version, then remove the <option>--disable-bootstrap</option> from 135 the <command>./configure</command> options below.</para> 136 <!-- 137 <para>As in LFS, fix a problem identified upstream:</para> 138 139 <screen><userinput>sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen> 140 --> 141 142 <para>Install <application>GCC Java</application> by running the 143 following commands:</para> 144 <para> 145 The instructions below assume that the C and C++ compilers have 146 the same version as the one you are installing, so that a 147 <quote>bootstrap</quote> is not necessary. If you are upgrading 148 the GCC version, then remove the <option>--disable-bootstrap</option> from 149 the <command>./configure</command> options below. 150 </para> 151 152 <para> 153 As in LFS, fix a problem identified upstream with the libgomp library: 154 </para> 155 156 <screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-upstream_libgomp_fix-1.patch</userinput></screen> 157 158 <para> 159 Install <application>GCC Java</application> by running the 160 following commands: 161 </para> 144 162 145 163 <screen><userinput>sed -i 's/\(install.*:\) install-.*recursive/\1/' libffi/Makefile.in && 146 164 sed -i 's/\(install-data-am:\).*/\1/' libffi/include/Makefile.in && 147 <!--148 patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch &&149 -->150 165 151 166 cp ../ecj-latest.jar ./ecj.jar && … … 156 171 ../gcc-&gcc-version;/configure \ 157 172 --prefix=/usr \ 158 --libdir=/usr/lib \159 --enable-shared \160 --enable-threads=posix \161 --enable-__cxa_atexit \162 --enable-clocale=gnu \163 173 --disable-multilib \ 164 174 --with-system-zlib \ … … 170 180 make</userinput></screen> 171 181 172 <para>If you have installed additional packages such as 173 <application>Valgrind</application> and <application>GDB</application>, 174 the <application>GCC</application> part of the testsuite will run more 175 tests than in LFS. Some of those will report FAIL and others XPASS 176 (pass when expected to FAIL). To run the tests, issue:</para> 182 <para> 183 If you have installed additional packages such as 184 <application>Valgrind</application> and <application>GDB</application>, 185 the <application>GCC</application> part of the testsuite will run more 186 tests than in LFS. Some of those will report FAIL and others XPASS 187 (pass when expected to FAIL). To run the tests, issue: 188 </para> 177 189 178 190 <screen><userinput>ulimit -s 32768 && … … 181 193 to be run. --> 182 194 183 <para>The tests are very long, and the results may be hard to find in the 184 logs, specially if you use job control with make. You can get a summary 185 of the tests with:</para> 195 <para> 196 The tests are very long, and the results may be hard to find in the 197 logs, specially if you use job control with make. You can get a summary 198 of the tests with: 199 </para> 186 200 187 201 <screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen> 188 202 189 <para>Now, as the <systemitem class="username">root</systemitem> user:</para> 203 <para> 204 Now, as the <systemitem class="username">root</systemitem> user: 205 </para> 190 206 191 207 <screen role="root"><userinput>make install && … … 207 223 <title>Command Explanations</title> 208 224 209 <para>The two <command>sed</command> commands prevent the 210 installation of the <application>libffi</application> library bundled 211 with <application>GCC</application>, since it is outdated compared to 212 <xref linkend="libffi"/>.</para> 213 <!-- 214 <para> 215 <command>patch ... gcc-&gcc-version;-upstream_fixes-1.patch</command>: 216 This patch corrects bugs in the C++ compiler, which lead to 217 segmentation faults in some cases. 218 </para> 219 --> 220 221 <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The 222 <application>GCC</application> documentation recommends 223 building the package in a dedicated build directory.</para> 224 225 <para><parameter>--enable-shared --enable-threads=posix 226 --enable-__cxa_atexit</parameter>: These parameters are required to build 227 the <application>C++</application> libraries to published standards.</para> 228 229 <para><parameter>--enable-clocale=gnu</parameter>: This parameter is a 230 failsafe for incomplete locale data.</para> 231 232 <para><parameter>--disable-multilib</parameter>: This parameter ensures 233 that files are created for the specific architecture of your computer.</para> 225 <para> 226 The two <command>sed</command> commands prevent the 227 installation of the <application>libffi</application> library bundled 228 with <application>GCC</application>, since it is outdated compared to 229 <xref linkend="libffi"/>. 230 </para> 231 232 <para> 233 <command>mkdir ../gcc-build; cd ../gcc-build</command>: The 234 <application>GCC</application> documentation recommends 235 building the package in a dedicated build directory. 236 </para> 237 238 <para> 239 <parameter>--disable-multilib</parameter>: This parameter ensures 240 that files are created for the specific architecture of your computer. 241 </para> 234 242 235 243 <para> … … 262 270 263 271 <para> 264 <parameter>--enable-languages=java</parameter>: 265 This command identifies which language to build. Note it is unavoidable 266 that the <application>C</application> and <application>C++</application> 267 compilers be built too.</para> 272 <parameter>--enable-languages=java</parameter>: 273 This command identifies which language to build. Note it is unavoidable 274 that the <application>C</application> and <application>C++</application> 275 compilers be built too. 276 </para> 268 277 269 278 <para> … … 273 282 </para> 274 283 275 <para><command>ulimit -s 32768</command>: This command prevents several 276 tests from running out of stack space.</para> 277 278 <para><command>make -k check</command>: This command runs the test suite 279 without stopping if any errors are encountered.</para> 280 281 <para><command>../gcc-&gcc-version;/contrib/test_summary</command>: This 282 command will produce a summary of the test suite results. You can append 283 <command>| grep -A7 Summ</command> to the command to produce an even more 284 condensed version of the summary. You may also wish to redirect the output 285 to a file for review and comparison later on.</para> 286 287 <para><command>chown -v -R root:root 288 /usr/lib/gcc/*linux-gnu/...</command>: 289 If the package is built by a user other than root, the ownership of the 290 installed <filename class="directory">include</filename> directory (and its 291 content) will be incorrect. This commands changes the ownership to the 292 <systemitem class="username">root</systemitem> user and group.</para> 284 <para> 285 <command>ulimit -s 32768</command>: This command prevents several 286 tests from running out of stack space. 287 </para> 288 289 <para> 290 <command>make -k check</command>: This command runs the test suite 291 without stopping if any errors are encountered. 292 </para> 293 294 <para> 295 <command>../gcc-&gcc-version;/contrib/test_summary</command>: This 296 command will produce a summary of the test suite results. You can append 297 <command>| grep -A7 Summ</command> to the command to produce an even more 298 condensed version of the summary. You may also wish to redirect the output 299 to a file for review and comparison later on. 300 </para> 301 302 <para> 303 <command>chown -v -R root:root 304 /usr/lib/gcc/*linux-gnu/...</command>: 305 If the package is built by a user other than root, the ownership of the 306 installed <filename class="directory">include</filename> directory (and its 307 content) will be incorrect. This commands changes the ownership to the 308 <systemitem class="username">root</systemitem> user and group. 309 </para> 293 310 294 311 <para> … … 307 324 308 325 <para> 309 The configuration is the same as for <xref linkend="openjdk"/>,326 The configuration is the same as <xref linkend="ojdk-conf"/>, 310 327 replacing <filename class="directory">/opt/jdk</filename> with 311 328 <filename class="directory">/opt/gcj</filename>. … … 341 358 <seg> 342 359 /usr/include/c++/&gcc-version;/{gcj,gnu,java,javax,org,sun}, 343 /usr/lib/gcj-&gcc-version;-15, 344 /usr/lib/security, /opt/gcj/{bin,jre,include,lib} and 345 /usr/share/java 360 /usr/lib/gcj-&gcc-version;-16, /usr/lib/jvm-exports, 361 /usr/lib/security, /opt/gcj and /usr/share/java 346 362 </seg> 347 363 </seglistitem> 348 364 </segmentedlist> 349 365 350 <para>Some program and library names and descriptions are not listed here, 351 but can be found at 352 <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were 353 initially installed during the building of LFS.</para> 366 <para> 367 Some program and library names and descriptions are not listed here, 368 but can be found at 369 <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were 370 initially installed during the building of LFS. 371 </para> 354 372 355 373 <variablelist> … … 361 379 <term><command>aot-compile</command></term> 362 380 <listitem> 363 <para>searches a directory for Java bytecode and uses 364 <command>gcj</command> to compile it to native code.</para> 381 <para> 382 searches a directory for Java bytecode and uses 383 <command>gcj</command> to compile it to native code. 384 </para> 365 385 <indexterm zone="gcc aot-compile"> 366 386 <primary sortas="b-aot-compile">aot-compile</primary> … … 372 392 <term><command>ecj</command></term> 373 393 <listitem> 374 <para>is the eclipse compiler.</para> 394 <para> 395 is the eclipse compiler. 396 </para> 375 397 <indexterm zone="gcc ecj"> 376 398 <primary sortas="b-ecj">ecj</primary> … … 382 404 <term><command>gappletviewer</command></term> 383 405 <listitem> 384 <para>loads and run a <application>Java</application> applet.</para> 406 <para> 407 loads and run a <application>Java</application> applet. 408 </para> 385 409 <indexterm zone="gcc gappletviewer"> 386 410 <primary sortas="b-gappletviewer">gappletviewer</primary> … … 392 416 <term><command>gc-analyze</command></term> 393 417 <listitem> 394 <para>analyzes garbage collector (GC) memory dumps from 395 <application>Java</application> code.</para> 418 <para> 419 analyzes garbage collector (GC) memory dumps from 420 <application>Java</application> code. 421 </para> 396 422 <indexterm zone="gcc gc-analyze"> 397 423 <primary sortas="b-gc-analyze">gc-analyze</primary> … … 403 429 <term><command>gcj</command></term> 404 430 <listitem> 405 <para>is an ahead-of-time compiler for the 406 <application>Java</application> language.</para> 431 <para> 432 is an ahead-of-time compiler for the <application>Java</application> 433 language. 434 </para> 407 435 <indexterm zone="gcc gcj"> 408 436 <primary sortas="b-gcj">gcj</primary> … … 414 442 <term><command>gcj-dbtool</command></term> 415 443 <listitem> 416 <para>is a tool for creating and manipulating class file mapping 417 databases.</para> 444 <para> 445 is a tool for creating and manipulating class file mapping databases. 446 </para> 418 447 <indexterm zone="gcc gcj-dbtool"> 419 448 <primary sortas="b-gcj-dbtool">gcj-dbtool</primary> … … 425 454 <term><command>gcjh</command></term> 426 455 <listitem> 427 <para>generates header files from <application>Java</application> 428 class files.</para> 456 <para> 457 generates header files from <application>Java</application> class files. 458 </para> 429 459 <indexterm zone="gcc gcjh"> 430 460 <primary sortas="b-gcjh">gcjh</primary> … … 436 466 <term><command>gij</command></term> 437 467 <listitem> 438 <para>is the GNU interpreter for <application>Java</application> 439 bytecode.</para> 468 <para> 469 is the GNU interpreter for <application>Java</application> bytecode. 470 </para> 440 471 <indexterm zone="gcc gij"> 441 472 <primary sortas="b-gij">gij</primary> … … 447 478 <term><command>gjar</command></term> 448 479 <listitem> 449 <para>is an (partial) implementation of the <command>jar</command> 450 utility that comes with Sun's JDK.</para> 480 <para> 481 is an (partial) implementation of the <command>jar</command> 482 utility that comes with Sun's JDK. 483 </para> 451 484 <indexterm zone="gcc gjar"> 452 485 <primary sortas="b-gjar">gjar</primary> … … 458 491 <term><command>gjarsigner</command></term> 459 492 <listitem> 460 <para>is a Java ARchive (JAR) file signing and verification 461 tool.</para> 493 <para> 494 is a Java ARchive (JAR) file signing and verification tool. 495 </para> 462 496 <indexterm zone="gcc gjarsigner"> 463 497 <primary sortas="b-gjarsigner">gjarsigner</primary> … … 469 503 <term><command>gjavah</command></term> 470 504 <listitem> 471 <para>generates header files from Java class files.</para> 505 <para> 506 generates header files from Java class files. 507 </para> 472 508 <indexterm zone="gcc gjavah"> 473 509 <primary sortas="b-gjavah">gjavah</primary> … … 479 515 <term><command>gjdoc</command></term> 480 516 <listitem> 481 <para>is a documentation tool similar to <command>javadoc</command>. 517 <para> 518 is a documentation tool similar to <command>javadoc</command>. 482 519 </para> 483 520 <indexterm zone="gcc gjdoc"> … … 490 527 <term><command>gkeytool</command></term> 491 528 <listitem> 492 <para>manages private keys and public certificates in a 493 <application>Java</application> environment.</para> 529 <para> 530 manages private keys and public certificates in a 531 <application>Java</application> environment. 532 </para> 494 533 <indexterm zone="gcc gkeytool"> 495 534 <primary sortas="b-gkeytool">gkeytool</primary> … … 501 540 <term><command>gnative2ascii</command></term> 502 541 <listitem> 503 <para>is an encoding converter for <application>Java</application>.</para> 542 <para> 543 is an encoding converter for <application>Java</application>. 544 </para> 504 545 <indexterm zone="gcc gnative2ascii"> 505 546 <primary sortas="b-gnative2ascii">gnative2ascii</primary> … … 511 552 <term><command>gorbd</command></term> 512 553 <listitem> 513 <para>is an object request broker daemon.</para> 554 <para> 555 is an object request broker daemon. 556 </para> 514 557 <indexterm zone="gcc gorbd"> 515 558 <primary sortas="b-gorbd">gorbd</primary> … … 521 564 <term><command>grmic</command></term> 522 565 <listitem> 523 <para>generates stubs for Remote Method Invocation.</para> 566 <para> 567 generates stubs for Remote Method Invocation. 568 </para> 524 569 <indexterm zone="gcc grmic-gcc"> 525 570 <primary sortas="b-grmic">grmic</primary> … … 531 576 <term><command>grmid</command></term> 532 577 <listitem> 533 <para>RMI activation system daemon.</para> 578 <para> 579 RMI activation system daemon. 580 </para> 534 581 <indexterm zone="gcc grmid-gcc"> 535 582 <primary sortas="b-grmid">grmid</primary> … … 541 588 <term><command>grmiregistry</command></term> 542 589 <listitem> 543 <para> starts a remote object registry on the current host.</para> 590 <para> 591 starts a remote object registry on the current host. 592 </para> 544 593 <indexterm zone="gcc grmiregistry-gcc"> 545 594 <primary sortas="b-grmiregistry">grmiregistry</primary> … … 551 600 <term><command>gserialver</command></term> 552 601 <listitem> 553 <para> prints the serialVersionUID of the specified class.</para> 602 <para> 603 prints the serialVersionUID of the specified class. 604 </para> 554 605 <indexterm zone="gcc gserialver"> 555 606 <primary sortas="b-gserialver">gserialver</primary> … … 561 612 <term><command>gtnameserv</command></term> 562 613 <listitem> 563 <para> starts a naming service.</para> 614 <para> 615 starts a naming service. 616 </para> 564 617 <indexterm zone="gcc gtnameserv"> 565 618 <primary sortas="b-gtnameserv">gtnameserv</primary> … … 571 624 <term><command>jcf-dump</command></term> 572 625 <listitem> 573 <para>prints information about <application>Java</application> 574 class files.</para> 626 <para> 627 prints information about <application>Java</application> 628 class files. 629 </para> 575 630 <indexterm zone="gcc jcf-dump"> 576 631 <primary sortas="b-jcf-dump">jcf-dump</primary> … … 582 637 <term><command>jv-convert</command></term> 583 638 <listitem> 584 <para>converts files from one encoding to another.</para> 639 <para> 640 converts files from one encoding to another. 641 </para> 585 642 <indexterm zone="gcc jv-convert"> 586 643 <primary sortas="b-jv-convert">jv-convert</primary> … … 592 649 <term><command>rebuild-gcj-db</command></term> 593 650 <listitem> 594 <para>Merge the per-solib databases made by 595 <application>aot-compile</application> into one system-wide 596 database.</para> 651 <para> 652 Merge the per-solib databases made by 653 <application>aot-compile</application> into one system-wide 654 database. 655 </para> 597 656 <indexterm zone="gcc rebuild-gcj-db"> 598 657 <primary sortas="b-rebuild-gcj-db">rebuild-gcj-db</primary> -
general/prog/gcc.xml
rb39a80c rae0673a 5 5 %general-entities; 6 6 7 <!ENTITY gcc-download-http "http ://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">7 <!ENTITY gcc-download-http "https://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2"> 8 8 <!ENTITY gcc-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2"> 9 <!ENTITY gcc-md5sum " 4df8ee253b7f3863ad0b86359cd39c43">10 <!ENTITY gcc-size " 86MB">11 <!ENTITY gcc-buildsize " 5.2GB">12 <!ENTITY gcc-time "13 8 SBU (including 95SBU for tests)">9 <!ENTITY gcc-md5sum "d5525b1127d07d215960e6051c5da35e"> 10 <!ENTITY gcc-size "91 MB"> 11 <!ENTITY gcc-buildsize "6.7 GB"> 12 <!ENTITY gcc-time "130 SBU (including 80 SBU for tests)"> 13 13 ]> 14 14 … … 24 24 25 25 <indexterm zone="gcc"> 26 <primary sortas="a-gcc- 4-0">GCC-&gcc-version;</primary>26 <primary sortas="a-gcc-5-0">GCC-&gcc-version;</primary> 27 27 </indexterm> 28 28 … … 30 30 <title>Introduction to GCC</title> 31 31 32 <para>The <application>GCC</application> package contains the GNU Compiler 33 Collection. This page describes the installation of compilers for the 34 following languages: C, C++, Fortran, Objective C, Objective C++, and Go. 35 Two additional languages , Ada and Java are available in the collection. 36 They have specific requirements, so they are described in separate pages 37 (<xref linkend="gcc-ada"/> and <xref linkend="gcc-java"/>). Since C and 38 C++ are installed in LFS, this page is either for upgrading C and C++, 39 or for installing additional compilers.</para> 32 <para> 33 The <application>GCC</application> package contains the GNU Compiler 34 Collection. This page describes the installation of compilers for the 35 following languages: C, C++, Fortran, Objective C, Objective C++, and Go. 36 Two additional languages , Ada and Java are available in the collection. 37 They have specific requirements, so they are described in separate pages 38 (<xref linkend="gcc-ada"/> and <xref linkend="gcc-java"/>). Since C and 39 C++ are installed in LFS, this page is either for upgrading C and C++, 40 or for installing additional compilers. 41 </para> 40 42 41 43 &lfs77_checked; 42 44 43 45 <caution> 44 <para>If you are upgrading <application>GCC</application> from any other 45 version prior to &gcc-version;, then you must be careful compiling 3rd 46 party kernel modules. You should ensure that the kernel and all its 47 native modules are also compiled using the same version of 48 <application>GCC</application> that you use to build the 3rd party module. 49 This issue does not affect native kernel (and kernel modules) updates, 50 as the instructions below are a complete reinstallation of 51 <application>GCC</application>. If you have existing 3rd party modules 52 installed, ensure they are recompiled using the updated version of 53 <application>GCC</application>. As always, never update the kernel 54 headers from the ones used when <application>Glibc</application> was 55 compiled during LFS.</para> 46 <para> 47 If you are upgrading <application>GCC</application> from any other 48 version prior to &gcc-version;, then you must be careful compiling 3rd 49 party kernel modules. You should ensure that the kernel and all its 50 native modules are also compiled using the same version of 51 <application>GCC</application> that you use to build the 3rd party module. 52 This issue does not affect native kernel (and kernel modules) updates, 53 as the instructions below are a complete reinstallation of 54 <application>GCC</application>. If you have existing 3rd party modules 55 installed, ensure they are recompiled using the updated version of 56 <application>GCC</application>. As always, never update the kernel 57 headers from the ones used when <application>Glibc</application> was 58 compiled during LFS. 59 </para> 60 61 <para> 62 The 5.1.0 version of GCC introduces an incompatible ABI change in the 63 C++ library <filename>libstdc++.so</filename>. This does not prevent 64 using programs compiled with the previous version of <application>GCC 65 </application>, since both old and new symbols are available in the 66 library. But compiling, with the new version, programs which use libraries 67 compiled with the old version is likely to give errors. So, if you are 68 upgrading from any previous version prior to 5.1.0, you have two solutions: 69 recompile all the libraries with the new version, or use the <option> 70 --with-default-libstdcxx-abi</option> switch to configure. 71 </para> 56 72 </caution> 57 73 … … 59 75 <itemizedlist spacing="compact"> 60 76 <listitem> 61 <para>Download (HTTP): <ulink url="&gcc-download-http;"/></para> 62 </listitem> 63 <listitem> 64 <para>Download (FTP): <ulink url="&gcc-download-ftp;"/></para> 65 </listitem> 66 <listitem> 67 <para>Download MD5 sum: &gcc-md5sum;</para> 68 </listitem> 69 <listitem> 70 <para>Download size: &gcc-size;</para> 71 </listitem> 72 <listitem> 73 <para>Estimated disk space required: &gcc-buildsize;</para> 74 </listitem> 75 <listitem> 76 <para>Estimated build time: &gcc-time;</para> 77 <para> 78 Download (HTTP): <ulink url="&gcc-download-http;"/> 79 </para> 80 </listitem> 81 <listitem> 82 <para> 83 Download (FTP): <ulink url="&gcc-download-ftp;"/> 84 </para> 85 </listitem> 86 <listitem> 87 <para> 88 Download MD5 sum: &gcc-md5sum; 89 </para> 90 </listitem> 91 <listitem> 92 <para> 93 Download size: &gcc-size; 94 </para> 95 </listitem> 96 <listitem> 97 <para> 98 Estimated disk space required: &gcc-buildsize; 99 </para> 100 </listitem> 101 <listitem> 102 <para> 103 Estimated build time: &gcc-time; 104 </para> 77 105 </listitem> 78 106 </itemizedlist> 79 <!-- 107 80 108 <bridgehead renderas="sect3">Additional Downloads</bridgehead> 81 109 <itemizedlist spacing="compact"> … … 83 111 <para> 84 112 Required patch: 85 <ulink url="&patch-root;/gcc-&gcc-version;-upstream_ fixes-1.patch"/>113 <ulink url="&patch-root;/gcc-&gcc-version;-upstream_libgomp_fix-1.patch"/> 86 114 </para> 87 115 </listitem> 88 116 </itemizedlist> 89 --> 117 90 118 91 119 <bridgehead renderas="sect3">GCC Dependencies</bridgehead> … … 96 124 </para> 97 125 98 <para condition="html" role="usernotes">User Notes: 99 <ulink url="&blfs-wiki;/gcc"/></para> 126 <para condition="html" role="usernotes"> 127 User Notes: <ulink url="&blfs-wiki;/gcc"/> 128 </para> 100 129 101 130 </sect2> … … 105 134 106 135 <important> 107 <para>Even if you specify only languages other than C and C++ to the 108 <command>./configure</command> command below, the 109 installation process will overwrite your existing 110 <application>GCC</application> C and C++ compilers and libraries. 111 Having the <application>Tcl</application>, 112 <application>Expect</application> and <application>DejaGnu</application> 113 packages installed before beginning the build is highly recommended so 114 you can run the full suite of tests.</para> 115 116 <para>Do not continue with the <command>make install</command> command 117 until you are confident the build was successful. You can compare your 118 test results with those found at <ulink 119 url="http://gcc.gnu.org/ml/gcc-testresults/"/>. You may also want to 120 refer to the information found in the <application>GCC</application> 121 section of Chapter 6 in the LFS book (<ulink 122 url="&lfs-root;/chapter06/gcc.html"/>).</para> 136 <para> 137 Even if you specify only languages other than C and C++ to the 138 <command>./configure</command> command below, the 139 installation process will overwrite your existing 140 <application>GCC</application> C and C++ compilers and libraries. 141 Having the <application>Tcl</application>, 142 <application>Expect</application> and <application>DejaGnu</application> 143 packages installed before beginning the build is highly recommended so 144 you can run the full suite of tests. 145 </para> 146 147 <para> 148 Do not continue with the <command>make install</command> command 149 until you are confident the build was successful. You can compare your 150 test results with those found at <ulink 151 url="http://gcc.gnu.org/ml/gcc-testresults/"/>. You may also want to 152 refer to the information found in the <application>GCC</application> 153 section of Chapter 6 in the LFS book (<ulink 154 url="&lfs-root;/chapter06/gcc.html"/>). 155 </para> 123 156 </important> 124 157 125 <para>The instructions below are intentionally performing a 126 <quote>bootstrap</quote> process. Bootstrapping is needed for robustness 127 and is highly recommended when upgrading the compilers version. To disable 128 bootstrap anyways, add <parameter>--disable-bootstrap</parameter> to the 129 <command>./configure</command> options below.</para> 130 <!-- 131 <para>As in LFS, fix a problem identified upstream:</para> 132 133 <screen><userinput>sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen> 134 --> 135 136 <para>Install <application>GCC</application> by running the 137 following commands:</para> 138 139 <screen><userinput><!-- 140 patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch && 141 -->mkdir ../gcc-build && 158 <para> 159 The instructions below are intentionally performing a 160 <quote>bootstrap</quote> process. Bootstrapping is needed for robustness 161 and is highly recommended when upgrading the compilers version. To disable 162 bootstrap anyways, add <parameter>--disable-bootstrap</parameter> to the 163 <command>./configure</command> options below. 164 </para> 165 166 <para> 167 As in LFS, fix a problem identified upstream with the libgomp library: 168 </para> 169 170 <screen><userinput>patch -Np1 -i ../gcc-5.1.0-upstream_libgomp_fix-1.patch</userinput></screen> 171 172 173 <para> 174 Install <application>GCC</application> by running the following commands: 175 </para> 176 177 <screen><userinput>mkdir ../gcc-build && 142 178 cd ../gcc-build && 143 179 144 180 ../gcc-&gcc-version;/configure \ 145 181 --prefix=/usr \ 146 --libdir=/usr/lib \147 --enable-shared \148 --enable-threads=posix \149 --enable-__cxa_atexit \150 --enable-clocale=gnu \151 182 --disable-multilib \ 152 183 --with-system-zlib \ … … 154 185 make</userinput></screen> 155 186 156 <para>If you have installed additional packages such as 157 <application>Valgrind</application> and <application>GDB</application>, 158 the <application>GCC</application> part of the testsuite will run more 159 tests than in LFS. Some of those will report FAIL and others XPASS 160 (pass when expected to FAIL). To run the tests, issue:</para> 187 <para> 188 If you have installed additional packages such as 189 <application>Valgrind</application> and <application>GDB</application>, 190 the <application>GCC</application> part of the testsuite will run more 191 tests than in LFS. Some of those will report FAIL and others XPASS 192 (pass when expected to FAIL). To run the tests, issue: 193 </para> 161 194 162 195 <screen><userinput>ulimit -s 32768 && … … 165 198 to be run. --> 166 199 167 <para>The tests are very long, and the results may be hard to find in the 168 logs, specially if you use parallel jobs with make. You can get a summary 169 of the tests with:</para> 200 <para> 201 The tests are very long, and the results may be hard to find in the 202 logs, specially if you use parallel jobs with make. You can get a summary 203 of the tests with: 204 </para> 170 205 171 206 <screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen> 172 207 173 <para>Now, as the <systemitem class="username">root</systemitem> user:</para> 208 <para> 209 Now, as the <systemitem class="username">root</systemitem> user: 210 </para> 174 211 175 212 <screen role="root"><userinput>make install && … … 181 218 /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}</userinput></screen> 182 219 183 <para>Some packages expect to find the C preprocessor in 184 <filename class="directory">/lib</filename> or may refer to the C compiler 185 under the name <command>cc</command>. The following symbolic links are not 186 needed if you have followed the LFS instructions, since they 187 have been already created. If you do not have them on your system, issue 188 as the <systemitem class="username">root</systemitem> user:</para> 189 190 <screen role="root"><userinput>ln -v -sf ../usr/bin/cpp /lib && 191 ln -v -sf gcc /usr/bin/cc</userinput></screen> 220 <para> 221 Some packages expect to find the C preprocessor in 222 <filename class="directory">/lib</filename> or may refer to the C compiler 223 under the name <command>cc</command>. The following symbolic links are not 224 needed if you have followed the LFS instructions, since they 225 have been already created. If you do not have them on your system, issue 226 as the <systemitem class="username">root</systemitem> user: 227 </para> 228 229 <screen role="root"><userinput>ln -v -sf ../usr/bin/cpp /lib && 230 ln -v -sf gcc /usr/bin/cc && 231 install -v -dm755 /usr/lib/bfd-plugins && 232 ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so /usr/lib/bfd-plugins/</userinput></screen> 192 233 193 234 </sect2> … … 195 236 <sect2 role="commands"> 196 237 <title>Command Explanations</title> 197 <!--198 <para>199 <command>patch ... gcc-&gcc-version;-upstream_fixes-1.patch</command>:200 This patch corrects bugs in the C++ compiler, which lead to201 segmentation faults in some cases.202 </para>203 -->204 238 205 239 <para> … … 208 242 building the package in a dedicated build directory. 209 243 </para> 210 211 <para>212 <parameter>--enable-shared --enable-threads=posix213 --enable-__cxa_atexit</parameter>: These parameters are required to build214 the <application>C++</application> libraries to published standards.215 </para>216 217 <para>218 <parameter>--enable-clocale=gnu</parameter>: This parameter is a219 failsafe for incomplete locale data.</para>220 244 221 245 <para> … … 239 263 240 264 <para> 265 <option>--with-default-libstdcxx-abi=c++98</option>: Use this switch if you 266 are upgrading from a <application>GCC</application> version prior to 5.1.0, 267 and you do not want to recompile all the libraries written in C++. 268 </para> 269 270 <para> 241 271 <command>ulimit -s 32768</command>: This command prevents several 242 272 tests from running out of stack space. … … 277 307 <title>Contents</title> 278 308 279 <para>Some program and library names and descriptions are not listed here, 280 but can be found at 281 <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were 282 initially installed during the building of LFS.</para> 309 <para> 310 Some program and library names and descriptions are not listed here, 311 but can be found at 312 <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were 313 initially installed during the building of LFS. 314 </para> 283 315 284 316 <segmentedlist> … … 289 321 <seglistitem> 290 322 <seg> 291 gccgo and gfortran, 292 hard-linked to architecture specific names 323 gccgo and gfortran, hard-linked to architecture specific names 293 324 </seg> 294 325 <seg> 295 326 libgfortran.{so,a}, 296 libgo.{so,a}, libgobegin.a, lib objc.{so,a}, and numerous other297 run-time libraries and executables in <filename class="directory">327 libgo.{so,a}, libgobegin.a, libnetgo.a, libobjc.{so,a}, and numerous 328 other run-time libraries and executables in <filename class="directory"> 298 329 /usr/lib/gcc</filename>, <filename class="directory"> 299 330 /usr/libexec/gcc</filename>, and <filename class="directory"> … … 315 346 <term><command>gccgo</command></term> 316 347 <listitem> 317 <para>is a GCC-based compiler for the 318 <application>Go</application> language.</para> 348 <para> 349 is a GCC-based compiler for the <application>Go</application> language. 350 </para> 319 351 <indexterm zone="gcc gccgo"> 320 352 <primary sortas="b-gccgo">gccgo</primary> … … 326 358 <term><command>gfortran</command></term> 327 359 <listitem> 328 <para>is a GCC-based compiler for the 329 <application>Fortran</application> language.</para> 360 <para> 361 is a GCC-based compiler for the <application>Fortran</application> 362 language. 363 </para> 330 364 <indexterm zone="gcc gfortran"> 331 365 <primary sortas="b-gfortran">gfortran</primary> -
general/prog/prog.xml
rb39a80c rae0673a 34 34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/> 35 35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/> 36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-java.xml"/> 36 37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-ada.xml"/> 37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-java.xml"/>38 38 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gc.xml"/> 39 39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdb.xml"/> -
introduction/welcome/changelog.xml
rb39a80c rae0673a 47 47 <para>May 24th, 2015 </para> 48 48 <itemizedlist> 49 <listitem> 50 <para>[pierre] - Update to GCC-5.1.0. Fixes 51 <ulink url="&blfs-ticket-root;6430">#6430</ulink>.</para> 52 </listitem> 49 53 <listitem> 50 54 <para>[renodr] - Add a sed to fix a compilation issue with Valgrind -
packages.ent
rb39a80c rae0673a 255 255 <!ENTITY elfutils-version "0.161"> 256 256 <!ENTITY expect-version "5.45"> 257 <!ENTITY gcc-version " 4.9.2">257 <!ENTITY gcc-version "5.1.0"> 258 258 <!ENTITY gc-version "7.4.2"> 259 259 <!ENTITY gdb-version "7.9.1">
Note:
See TracChangeset
for help on using the changeset viewer.