Changeset b0a4c9a


Ignore:
Timestamp:
09/15/2007 08:45:13 PM (17 years ago)
Author:
Jeremy Huntwork <jhuntwork@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
2a7ac34
Parents:
232aa73
Message:

Upgrade to GCC-4.2.1. Fixes #2002. Merged from jh branch, thanks to Matthew Burgess for preparing a discrete patch.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8374 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
11 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    r232aa73 rb0a4c9a  
    4141      <itemizedlist>
    4242        <listitem>
     43          <para>[jhuntwork] - Upgrade to GCC-4.2.1. Fixes
     44          <ulink url="&lfs-ticket-root;2002">#2002</ulink>.
     45          Thanks to Matthew Burgess for preparing a discrete patch.</para>
     46        </listitem>
     47        <listitem>
    4348          <para>[matthew] - Upgrade to DB-4.6.19. Fixes
    4449          <ulink url="&lfs-ticket-root;2051">#2051</ulink>.</para>
  • chapter01/whatsnew.xml

    r232aa73 rb0a4c9a  
    7878      <para>Gawk &gawk-version;</para>
    7979    </listitem>-->
    80     <!--<listitem>
     80    <listitem>
    8181      <para>GCC &gcc-version;</para>
    8282    </listitem>
    83     <listitem>
     83    <!--<listitem>
    8484      <para>Gettext &gettext-version;</para>
    8585    </listitem>-->
     
    226226    </listitem>
    227227
     228    <listitem>
     229      <para>gcc-4.1.2-specs-1.patch</para>
     230    </listitem>
     231
    228232  </itemizedlist>
    229233
  • chapter03/patches.xml

    r232aa73 rb0a4c9a  
    8484
    8585    <varlistentry>
    86       <term>GCC Specs Patch - <token>&gcc-specs-patch-size;</token>:</term>
    87       <listitem>
    88         <para>Download: <ulink url="&patches-root;&gcc-specs-patch;"/></para>
    89         <para>MD5 sum: <literal>&gcc-specs-patch-md5;</literal></para>
    90       </listitem>
    91     </varlistentry>
    92 
    93     <varlistentry>
    9486      <term>Grep RedHat Fixes Patch - <token>&grep-fixes-patch-size;</token>:</term>
    9587      <listitem>
  • chapter05/adjusting.xml

    r232aa73 rb0a4c9a  
    4949
    5050<!-- Ampersands are needed to allow copy and paste -->
    51 <screen><userinput>gcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&amp;@g' \
     51<screen><userinput>gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&amp;@g' \
    5252  > `dirname $(gcc -print-libgcc-file-name)`/specs</userinput></screen>
    5353
  • chapter05/gcc-pass1.xml

    r232aa73 rb0a4c9a  
    102102    </variablelist>
    103103
    104     <para>Continue with compiling the package:</para>
     104    <para>The following command will compile GCC not once, but several times. It
     105    uses the programs compiled in a first round to compile itself a second time,
     106    and then again a third time. It then compares these second and third compiles
     107    to make sure it can reproduce itself flawlessly. This is called
     108    <quote>bootstrapping</quote>. Building GCC in this way ensures that it was
     109    compiled correctly and is now the default configuration for the released
     110    package. Continue with compiling by running:</para>
    105111
    106 <screen><userinput>make bootstrap</userinput></screen>
    107 
    108     <variablelist>
    109       <title>The meaning of the make parameter:</title>
    110 
    111       <varlistentry>
    112         <term><parameter>bootstrap</parameter></term>
    113         <listitem>
    114           <para>This target does not just compile GCC, but compiles it
    115           several times. It uses the programs compiled in a first round
    116           to compile itself a second time, and then again a third time.
    117           It then compares these second and third compiles to make sure
    118           it can reproduce itself flawlessly. This also implies that it
    119           was compiled correctly.</para>
    120         </listitem>
    121       </varlistentry>
    122 
    123     </variablelist>
     112<screen><userinput>make</userinput></screen>
    124113
    125114    <para>Compilation is now complete. At this point, the test suite would
  • chapter05/gcc-pass2.xml

    r232aa73 rb0a4c9a  
    9191  &gt; gcc/Makefile.in</userinput></screen>
    9292
    93     <para>Apply the following patch to change the location of GCC's default
    94     dynamic linker (typically <filename
    95     class="libraryfile">ld-linux.so.2</filename>):</para>
    96 
    97 <screen><userinput>patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
    98 
    99     <para>The above patch also removes <filename
     93    <para>The following command will change the location of GCC's default
     94    dynamic linker to use the one we installed in
     95    <filename class="directory">/tools</filename>. It also removes <filename
    10096    class="directory">/usr/include</filename> from GCC's include search path.
    101     Patching now rather than adjusting the specs file after installation
     97    Doing this now rather than adjusting the specs file after installation
    10298    ensures that the new dynamic linker is used during the actual build of
    10399    GCC. That is, all of the binaries created during the build will link
    104     against the new Glibc.</para>
    105 
    106     <important>
    107       <para>The above patch is critical in ensuring a successful overall
    108       build. Do not forget to apply it.</para>
    109     </important>
     100    against the new Glibc. Issue:</para>
     101
     102<screen><userinput>for file in $(find gcc/config -name linux64.h -o -name linux.h)
     103do
     104  cp -uv $file{,.orig}
     105  sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&amp;@g' \
     106  -e 's@/usr@/tools@g' $file.orig &gt; $file
     107  echo "
     108#undef STANDARD_INCLUDE_DIR
     109#define STANDARD_INCLUDE_DIR 0" &gt;&gt; $file
     110  touch $file.orig
     111done</userinput></screen>
     112
     113    <para>In case the above seems hard to follow, let's break it down a bit.
     114    First we find all the files under the gcc/config directory that are named
     115    either <filename>linux.h</filename> or <filename>linux64.h</filename>.
     116    For each file found, we copy it to a file of the same name but with an added
     117    suffix of <quote>.orig</quote>. Then the first sed expression prepends
     118    <quote>/tools</quote> to every instance of <quote>/lib/ld</quote>,
     119    <quote>/lib64/ld</quote> or <quote>/lib32/ld</quote>, while the second one
     120    replaces hard-coded instances of <quote>/usr</quote>. Then we add our define
     121    statements which alter the include search path to the end of the file. Finally,
     122    we use <command>touch</command> to update the timestamp on the copied files.
     123    When used in conjunction with <command>cp -u</command>, this prevents unexpected
     124    changes to the original files in case the command is inadvertently run twice.
     125    </para>
    110126
    111127    <para>Create a separate build directory again:</para>
     
    123139    --enable-shared --enable-threads=posix \
    124140    --enable-__cxa_atexit --enable-languages=c,c++ \
    125     --disable-libstdcxx-pch</userinput></screen>
     141    --disable-libstdcxx-pch --disable-bootstrap</userinput></screen>
    126142
    127143    <variablelist>
     
    178194      </varlistentry>
    179195
     196      <varlistentry>
     197        <term><parameter>--disable-bootstrap</parameter></term>
     198        <listitem>
     199          <para>Bootstrapping the compiler is now the default for GCC. However,
     200          our build method should provide us with a solid compiler without the
     201          need to bootstrap each time.</para>
     202        </listitem>
     203      </varlistentry>
     204
    180205    </variablelist>
    181206
  • chapter05/perl.xml

    r232aa73 rb0a4c9a  
    4949<screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>
    5050
     51    <para>Fix an incompatibility with gcc-&gcc-version;:</para>
     52
     53<screen><userinput>mv -v makedepend.SH{,.orig}
     54sed 's/command /command[ -]/' makedepend.SH.orig &gt; makedepend.SH</userinput></screen>
     55
    5156    <para>Prepare Perl for compilation (make sure to get the
    5257    'Data/Dumper Fcntl IO POSIX' part of the command correct&mdash;they are all
  • chapter06/gcc.xml

    r232aa73 rb0a4c9a  
    8484    --libexecdir=/usr/lib --enable-shared \
    8585    --enable-threads=posix --enable-__cxa_atexit \
    86     --enable-clocale=gnu --enable-languages=c,c++</userinput></screen>
     86    --enable-clocale=gnu --enable-languages=c,c++ \
     87    --disable-bootstrap</userinput></screen>
    8788
    8889    <para>Compile the package:</para>
  • chapter06/perl.xml

    r232aa73 rb0a4c9a  
    4747
    4848<screen><userinput>echo "127.0.0.1 localhost $(hostname)" &gt; /etc/hosts</userinput></screen>
     49
     50    <para>Fix an incompatibility with gcc-&gcc-version;:</para>
     51
     52<screen><userinput>sed -i 's/command /command[ -]/' makedepend.SH</userinput></screen>
    4953
    5054    <para>To have full control over the way Perl is set up, you can run the
  • packages.ent

    r232aa73 rb0a4c9a  
    169169<!ENTITY gawk-ch6-sbu "0.2 SBU">
    170170
    171 <!ENTITY gcc-version "4.1.2">
    172 <!ENTITY gcc-size "38,777 KB">
     171<!ENTITY gcc-version "4.2.1">
     172<!ENTITY gcc-size "43,029 KB">
    173173<!ENTITY gcc-url "&gnu;gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
    174 <!ENTITY gcc-md5 "a4a3eb15c96030906d8494959eeda23c">
     174<!ENTITY gcc-md5 "cba410e6ff70f7d7f4be7a0267707fd0">
    175175<!ENTITY gcc-home "http://gcc.gnu.org/">
    176176<!ENTITY gcc-ch5p1-du "655 MB">
  • patches.ent

    r232aa73 rb0a4c9a  
    3939<!ENTITY gawk-segfault-patch-size "1.3 KB">
    4040
    41 
    42 <!ENTITY gcc-specs-patch "gcc-&gcc-version;-specs-1.patch">
    43 <!ENTITY gcc-specs-patch-md5 "a17be8ccfb978e73f382be5093dd8abd">
    44 <!ENTITY gcc-specs-patch-size "14.8 KB">
    4541
    4642<!ENTITY grep-fixes-patch "grep-&grep-version;-redhat_fixes-2.patch">
Note: See TracChangeset for help on using the changeset viewer.