Changeset 69a6e63c


Ignore:
Timestamp:
03/03/2022 04:36:02 PM (7 months ago)
Author:
William Harrington <kb0iic@…>
Branches:
arm
Children:
bd36dc5
Parents:
3ef45bc
git-author:
Xi Ruoyao <xry111@…> (02/26/2022 05:09:05 PM)
git-committer:
William Harrington <kb0iic@…> (03/03/2022 04:36:02 PM)
Message:

fix GCC PR100017 and enable libstdc++ for pass 2

This is the issue preventing us from cross-compiling libstdc++ in
Chapter 6. By fixing this issue we can remove a seperate pass 2 for
libstdc++ and simplify the instruction.

The upstream fix will be released in 11.3 and 12.0, so we can remove the
first sed upgrading gcc next time.

Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • chapter05/libstdc++.xml

    r3ef45bc r69a6e63c  
    66]>
    77
    8 <sect1 id="ch-tools-libstdcpp-pass1" role="wrap">
    9   <?dbhtml filename="gcc-libstdc++-pass1.html"?>
     8<sect1 id="ch-tools-libstdcpp" role="wrap">
     9  <?dbhtml filename="gcc-libstdc++.html"?>
    1010
    1111  <sect1info condition="script">
     
    1515  </sect1info>
    1616
    17   <title>Libstdc++ from GCC-&gcc-version;, Pass 1</title>
     17  <title>Libstdc++ from GCC-&gcc-version;</title>
    1818
    19   <indexterm zone="ch-tools-libstdcpp-pass1">
     19  <indexterm zone="ch-tools-libstdcpp">
    2020    <primary sortas="a-GCC">GCC</primary>
    2121    <secondary>tools, libstdc++ pass 1</secondary>
  • chapter06/gcc-pass2.xml

    r3ef45bc r69a6e63c  
    6868esac</userinput></screen>
    6969
     70    <!-- https://gcc.gnu.org/PR100017 -->
     71    <para>Fix an issue causing failure cross-compiling libstdc++:</para>
     72
     73<screen><userinput remap="pre">sed 's/gnu++17/&amp; -nostdinc++/' \
     74    -i libstdc++-v3/src/c++17/Makefile.in</userinput></screen>
     75
     76    <para>Override the building rule of libgcc and libstdc++ headers, to
     77    allow building these libraries with POSIX threads support:</para>
     78
     79<screen><userinput remap="pre">sed '/thread_header =/s/@.*@/gthr-posix.h/' \
     80    -i libgcc/Makefile.in libstdc++-v3/include/Makefile.in</userinput></screen>
     81
    7082    <para>Create a separate build directory again:</para>
    7183
    7284<screen><userinput remap="pre">mkdir -v build
    7385cd       build</userinput></screen>
    74 
    75     <para>Create a symlink that allows libgcc to be built with posix threads
    76     support:</para>
    77 
    78 <screen><userinput remap="pre">mkdir -pv $LFS_TGT/libgcc
    79 ln -s ../../../libgcc/gthr-posix.h $LFS_TGT/libgcc/gthr-default.h</userinput></screen>
    8086
    8187    <para>Before starting to build GCC, remember to unset any environment
     
    8995    --prefix=/usr                                  \
    9096    CC_FOR_TARGET=$LFS_TGT-gcc                     \
     97    CXX_FOR_TARGET=$LFS_TGT-g++                    \
     98    LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc      \
    9199    --with-build-sysroot=$LFS                      \
    92100    --enable-initfini-array                        \
     
    99107    --disable-libssp                               \
    100108    --disable-libvtv                               \
    101     --disable-libstdcxx                            \
    102109    --enable-languages=c,c++</userinput></screen>
    103110
  • chapter07/chapter07.xml

    r3ef45bc r69a6e63c  
    1818  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingdirs.xml"/>
    1919  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="createfiles.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++-pass2.xml"/>
    2120  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>
    2221  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>
Note: See TracChangeset for help on using the changeset viewer.