Ignore:
Timestamp:
08/01/2015 04:26:22 AM (9 years ago)
Author:
Douglas R. Reno <renodr@…>
Branches:
systemd-13485
Children:
ad6910d
Parents:
4a83293
Message:

Import back into SVN from Github

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16309 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/gcc-java.xml

    r4a83293 rac38e9dc  
    55  %general-entities;
    66
    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">
    88  <!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           "86 MB">
    11   <!ENTITY gcc-java-buildsize      "3.0 GB">
    12   <!ENTITY gcc-java-time           "84 SBU (including 70 SBU 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)">
    1313
    1414  <!ENTITY ecj-download-ftp    "ftp://sourceware.org/pub/java/ecj-latest.jar">
    1515
    16   <!ENTITY antlr-version       "4.2.2">
     16  <!ENTITY antlr-version       "4.5">
    1717  <!ENTITY antlr-download-http "http://www.antlr.org/download/antlr-&antlr-version;-complete.jar">
    1818]>
     
    2929
    3030  <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>
    3232  </indexterm>
    3333
     
    3535    <title>Introduction to GCC-Java</title>
    3636
    37     <para>See the introduction to the Java language and system at
    38     <xref linkend="java"/>. The GNU Compiler Collection (GCC) contains
    39     a Java compiler to native code. Together with the
    40     <application>ecj</application> Java compiler from Eclipse (to bytecode),
    41     it provides a way to build an acceptable JVM from source. However, since
    42     the release of <application>OpenJDK</application>, the development
    43     of GCC-Java has almost stopped, and the built JVM is an old version.
    44     One reason to build
    45     this system is that it can be used to bootstrap <xref linkend="openjdk"/>,
    46     without the need for downloading a Java binary.</para>
    47 
    48     &lfs76_checked;
     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
     48    &lfs77_checked;
    4949
    5050    <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>
    5557    </caution>
    5658
     
    5860    <itemizedlist spacing="compact">
    5961      <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>
    7690      </listitem>
    7791    </itemizedlist>
     
    8195      <listitem>
    8296        <para>
    83           Eclipse Java compiler:
    84           <ulink url="&ecj-download-ftp;"/>
     97          Eclipse Java compiler: <ulink url="&ecj-download-ftp;"/>
    8598        </para>
    8699      </listitem>
     
    91104        </para>
    92105      </listitem>
    93 <!--      <listitem>
     106      <listitem>
    94107        <para>
    95108          Required patch:
    96109          <ulink url="&patch-root;/gcc-&gcc-version;-upstream_fixes-1.patch"/>
    97110        </para>
    98       </listitem>-->
     111      </listitem>
    99112    </itemizedlist>
    100113
    101     <bridgehead renderas="sect3">GCC Dependencies</bridgehead>
     114    <bridgehead renderas="sect3">GCC Java Dependencies</bridgehead>
    102115
    103116    <bridgehead renderas="sect4">Required</bridgehead>
    104117    <para role="required">
    105       <xref linkend="zip"/>,
    106       <xref linkend="unzip"/>, and
    107       <xref linkend="which"/>
     118      <xref linkend="unzip"/>,
     119      <xref linkend="which"/>, and
     120      <xref linkend="zip"/>
    108121    </para>
    109122
     
    129142    <title>Installation of GCC Java</title>
    130143
    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 \&amp;\&amp; \!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 some problems identified upstream:
     154    </para>
     155
     156<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch</userinput></screen>
     157
     158    <para>
     159      Install <application>GCC Java</application> by running the
     160      following commands:
     161    </para>
    144162
    145163<screen><userinput>sed -i 's/\(install.*:\) install-.*recursive/\1/' libffi/Makefile.in         &amp;&amp;
    146164sed -i 's/\(install-data-am:\).*/\1/'             libffi/include/Makefile.in &amp;&amp;
    147 <!--
    148 patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch &amp;&amp;
    149 -->
    150165
    151166cp ../ecj-latest.jar ./ecj.jar &amp;&amp;
     
    165180make</userinput></screen>
    166181
    167     <para>If you have installed additional packages such as
    168     <application>Valgrind</application> and <application>GDB</application>,
    169     the <application>GCC</application> part of the testsuite will run more
    170     tests than in LFS. Some of those will report FAIL and others XPASS
    171     (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>
    172189
    173190<screen><userinput>ulimit -s 32768 &amp;&amp;
     
    176193to be run. -->
    177194
    178     <para>The tests are very long, and the results may be hard to find in the
    179     logs, specially if you use job control with make. You can get a summary
    180     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>
    181200
    182201<screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
    183202
    184     <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>
    185206
    186207<screen role="root"><userinput>make install &amp;&amp;
     
    202223    <title>Command Explanations</title>
    203224
    204     <para>The two <command>sed</command> commands prevent the
    205     installation of the <application>libffi</application> library bundled
    206     with <application>GCC</application>, since it is outdated compared to
    207     <xref linkend="libffi"/>.</para>
    208 <!--
    209     <para>
    210       <command>patch ... gcc-&gcc-version;-upstream_fixes-1.patch</command>:
    211       This patch corrects bugs in the C++ compiler, which lead to
    212       segmentation faults in some cases.
    213     </para>
    214 -->
    215 
    216     <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
    217     <application>GCC</application> documentation recommends
    218     building the package in a dedicated build directory.</para>
    219 
    220     <para><parameter>--disable-multilib</parameter>: This parameter ensures
    221     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>
    222242
    223243    <para>
     
    250270
    251271    <para>
    252     <parameter>--enable-languages=java</parameter>:
    253     This command identifies which language to build. Note it is unavoidable
    254     that the <application>C</application> and <application>C++</application>
    255     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>
    256277
    257278    <para>
     
    261282    </para>
    262283
    263     <para><command>ulimit -s 32768</command>: This command prevents several
    264     tests from running out of stack space.</para>
    265 
    266     <para><command>make -k check</command>: This command runs the test suite
    267     without stopping if any errors are encountered.</para>
    268 
    269     <para><command>../gcc-&gcc-version;/contrib/test_summary</command>: This
    270     command will produce a summary of the test suite results. You can append
    271     <command>| grep -A7 Summ</command> to the command to produce an even more
    272     condensed version of the summary. You may also wish to redirect the output
    273     to a file for review and comparison later on.</para>
    274 
    275     <para><command>chown -v -R root:root
    276     /usr/lib/gcc/*linux-gnu/...</command>:
    277     If the package is built by a user other than root, the ownership of the
    278     installed <filename class="directory">include</filename> directory (and its
    279     content) will be incorrect. This commands changes the ownership to the
    280     <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>
    281310
    282311    <para>
     
    295324
    296325      <para>
    297         The configuration is the same as for <xref linkend="openjdk"/>,
     326        The configuration is the same as <xref linkend="ojdk-conf"/>,
    298327        replacing <filename class="directory">/opt/jdk</filename> with
    299328        <filename class="directory">/opt/gcj</filename>.
     
    329358        <seg>
    330359          /usr/include/c++/&gcc-version;/{gcj,gnu,java,javax,org,sun},
    331           /usr/lib/gcj-&gcc-version;-15,
    332           /usr/lib/security, /opt/gcj/{bin,jre,include,lib} and
    333           /usr/share/java
     360          /usr/lib/gcj-&gcc-version;-16, /usr/lib/jvm-exports,
     361          /usr/lib/security, /opt/gcj and /usr/share/java
    334362        </seg>
    335363      </seglistitem>
    336364    </segmentedlist>
    337365
    338     <para>Some program and library names and descriptions are not listed here,
    339     but can be found at
    340     <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
    341     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>
    342372
    343373    <variablelist>
     
    349379        <term><command>aot-compile</command></term>
    350380        <listitem>
    351           <para>searches a directory for Java bytecode and uses
    352           <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>
    353385          <indexterm zone="gcc aot-compile">
    354386            <primary sortas="b-aot-compile">aot-compile</primary>
     
    360392        <term><command>ecj</command></term>
    361393        <listitem>
    362           <para>is the eclipse compiler.</para>
     394          <para>
     395            is the eclipse compiler.
     396          </para>
    363397          <indexterm zone="gcc ecj">
    364398            <primary sortas="b-ecj">ecj</primary>
     
    370404        <term><command>gappletviewer</command></term>
    371405        <listitem>
    372           <para>loads and run a <application>Java</application> applet.</para>
     406          <para>
     407            loads and run a <application>Java</application> applet.
     408          </para>
    373409          <indexterm zone="gcc gappletviewer">
    374410            <primary sortas="b-gappletviewer">gappletviewer</primary>
     
    380416        <term><command>gc-analyze</command></term>
    381417        <listitem>
    382           <para>analyzes garbage collector (GC) memory dumps from
    383           <application>Java</application> code.</para>
     418          <para>
     419            analyzes garbage collector (GC) memory dumps from
     420            <application>Java</application> code.
     421          </para>
    384422          <indexterm zone="gcc gc-analyze">
    385423            <primary sortas="b-gc-analyze">gc-analyze</primary>
     
    391429        <term><command>gcj</command></term>
    392430        <listitem>
    393           <para>is an ahead-of-time compiler for the
    394           <application>Java</application> language.</para>
     431          <para>
     432            is an ahead-of-time compiler for the <application>Java</application>
     433            language.
     434          </para>
    395435          <indexterm zone="gcc gcj">
    396436            <primary sortas="b-gcj">gcj</primary>
     
    402442        <term><command>gcj-dbtool</command></term>
    403443        <listitem>
    404           <para>is a tool for creating and manipulating class file mapping
    405           databases.</para>
     444          <para>
     445            is a tool for creating and manipulating class file mapping databases.
     446          </para>
    406447          <indexterm zone="gcc gcj-dbtool">
    407448            <primary sortas="b-gcj-dbtool">gcj-dbtool</primary>
     
    413454        <term><command>gcjh</command></term>
    414455        <listitem>
    415           <para>generates header files from <application>Java</application>
    416           class files.</para>
     456          <para>
     457            generates header files from <application>Java</application> class files.
     458          </para>
    417459          <indexterm zone="gcc gcjh">
    418460            <primary sortas="b-gcjh">gcjh</primary>
     
    424466        <term><command>gij</command></term>
    425467        <listitem>
    426           <para>is the GNU interpreter for <application>Java</application>
    427           bytecode.</para>
     468          <para>
     469            is the GNU interpreter for <application>Java</application> bytecode.
     470          </para>
    428471          <indexterm zone="gcc gij">
    429472            <primary sortas="b-gij">gij</primary>
     
    435478        <term><command>gjar</command></term>
    436479        <listitem>
    437           <para>is an (partial) implementation of the <command>jar</command>
    438           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>
    439484          <indexterm zone="gcc gjar">
    440485            <primary sortas="b-gjar">gjar</primary>
     
    446491        <term><command>gjarsigner</command></term>
    447492        <listitem>
    448           <para>is a Java ARchive (JAR) file signing and verification
    449           tool.</para>
     493          <para>
     494            is a Java ARchive (JAR) file signing and verification tool.
     495          </para>
    450496          <indexterm zone="gcc gjarsigner">
    451497            <primary sortas="b-gjarsigner">gjarsigner</primary>
     
    457503        <term><command>gjavah</command></term>
    458504        <listitem>
    459           <para>generates header files from Java class files.</para>
     505          <para>
     506            generates header files from Java class files.
     507          </para>
    460508          <indexterm zone="gcc gjavah">
    461509            <primary sortas="b-gjavah">gjavah</primary>
     
    467515        <term><command>gjdoc</command></term>
    468516        <listitem>
    469           <para>is a documentation tool similar to <command>javadoc</command>.
     517          <para>
     518            is a documentation tool similar to <command>javadoc</command>.
    470519          </para>
    471520          <indexterm zone="gcc gjdoc">
     
    478527        <term><command>gkeytool</command></term>
    479528        <listitem>
    480           <para>manages private keys and public certificates in a
    481           <application>Java</application> environment.</para>
     529          <para>
     530            manages private keys and public certificates in a
     531            <application>Java</application> environment.
     532          </para>
    482533          <indexterm zone="gcc gkeytool">
    483534            <primary sortas="b-gkeytool">gkeytool</primary>
     
    489540        <term><command>gnative2ascii</command></term>
    490541        <listitem>
    491           <para>is an encoding converter for <application>Java</application>.</para>
     542          <para>
     543            is an encoding converter for <application>Java</application>.
     544          </para>
    492545          <indexterm zone="gcc gnative2ascii">
    493546            <primary sortas="b-gnative2ascii">gnative2ascii</primary>
     
    499552        <term><command>gorbd</command></term>
    500553        <listitem>
    501           <para>is an object request broker daemon.</para>
     554          <para>
     555            is an object request broker daemon.
     556          </para>
    502557          <indexterm zone="gcc gorbd">
    503558            <primary sortas="b-gorbd">gorbd</primary>
     
    509564        <term><command>grmic</command></term>
    510565        <listitem>
    511           <para>generates stubs for Remote Method Invocation.</para>
     566          <para>
     567            generates stubs for Remote Method Invocation.
     568          </para>
    512569          <indexterm zone="gcc grmic-gcc">
    513570            <primary sortas="b-grmic">grmic</primary>
     
    519576        <term><command>grmid</command></term>
    520577        <listitem>
    521           <para>RMI activation system daemon.</para>
     578          <para>
     579            RMI activation system daemon.
     580          </para>
    522581          <indexterm zone="gcc grmid-gcc">
    523582            <primary sortas="b-grmid">grmid</primary>
     
    529588        <term><command>grmiregistry</command></term>
    530589        <listitem>
    531           <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>
    532593          <indexterm zone="gcc grmiregistry-gcc">
    533594            <primary sortas="b-grmiregistry">grmiregistry</primary>
     
    539600        <term><command>gserialver</command></term>
    540601        <listitem>
    541           <para> prints the serialVersionUID of the specified class.</para>
     602          <para>
     603            prints the serialVersionUID of the specified class.
     604          </para>
    542605          <indexterm zone="gcc gserialver">
    543606            <primary sortas="b-gserialver">gserialver</primary>
     
    549612        <term><command>gtnameserv</command></term>
    550613        <listitem>
    551           <para> starts a naming service.</para>
     614          <para>
     615            starts a naming service.
     616          </para>
    552617          <indexterm zone="gcc gtnameserv">
    553618            <primary sortas="b-gtnameserv">gtnameserv</primary>
     
    559624        <term><command>jcf-dump</command></term>
    560625        <listitem>
    561           <para>prints information about <application>Java</application>
    562           class files.</para>
     626          <para>
     627            prints information about <application>Java</application>
     628            class files.
     629          </para>
    563630          <indexterm zone="gcc jcf-dump">
    564631            <primary sortas="b-jcf-dump">jcf-dump</primary>
     
    570637        <term><command>jv-convert</command></term>
    571638        <listitem>
    572           <para>converts files from one encoding to another.</para>
     639          <para>
     640            converts files from one encoding to another.
     641          </para>
    573642          <indexterm zone="gcc jv-convert">
    574643            <primary sortas="b-jv-convert">jv-convert</primary>
     
    580649        <term><command>rebuild-gcj-db</command></term>
    581650        <listitem>
    582           <para>Merge the per-solib databases made by
    583           <application>aot-compile</application> into one system-wide
    584           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>
    585656          <indexterm zone="gcc rebuild-gcj-db">
    586657            <primary sortas="b-rebuild-gcj-db">rebuild-gcj-db</primary>
Note: See TracChangeset for help on using the changeset viewer.