助力来源:sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz

主机x64-linux,ubuntu 20

交叉编译器sparc-sun-solaris2.10-g++ (GCC) 4.9.3

基于本教程的步骤https://www.boost.org/build/doc/html/bbv2/tasks/crosscompile.html

./bootstrap.sh --with-libraries=iostreams

# replace in file project-config.jam the line "using gcc ;" with the line "using gcc : sparc : /opt/crosssolaris/bin/sparc-sun-solaris2.10-g++ ; "
sed -i 's,using gcc ;,using gcc : sparc : /opt/crosssolaris/bin/sparc-sun-solaris2.10-g++ ;,' project-config.jam 

./b2 toolset=gcc-sparc target-os=solaris
The result
Performing configuration checks

    - 32-bit                   : yes
    - arm                      : no
    - mips1                    : no
    - power                    : no
    - sparc                    : yes

Building the Boost C++ Libraries.


    - symlinks supported       : yes
    - zlib                     : yes
    - zlib                     : yes

Component configuration:

    - atomic                   : not building
    - chrono                   : not building
    - container                : not building
    - context                  : not building
    - coroutine                : not building
    - coroutine2               : not building
    - date_time                : not building
    - exception                : not building
    - filesystem               : not building
    - graph                    : not building
    - graph_parallel           : not building
    - iostreams                : building
    - locale                   : not building
    - log                      : not building
    - math                     : not building
    - mpi                      : not building
    - program_options          : not building
    - python                   : not building
    - random                   : not building
    - regex                    : not building
    - serialization            : not building
    - signals                  : not building
    - system                   : not building
    - test                     : not building
    - thread                   : not building
    - timer                    : not building
    - wave                     : not building

...patience...
...found 768 targets...
...updating 28 targets...
common.mkdir stage
common.mkdir stage/lib
common.mkdir bin.v2/libs
common.mkdir bin.v2/libs/iostreams
common.mkdir bin.v2/libs/iostreams/build
common.mkdir bin.v2/libs/iostreams/build/gcc-sparc
common.mkdir bin.v2/libs/iostreams/build/gcc-sparc/release
common.mkdir bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris
common.mkdir bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/file_descriptor.o
/tmp/cc794ayD.s: Assembler messages:
/tmp/cc794ayD.s:1152: Error: Architecture mismatch on "cas [%g4],%g3,%g1".
/tmp/cc794ayD.s:1152: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:1896: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:1896: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:1927: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:1927: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:4526: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:4526: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:4558: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:4558: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:5235: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:5235: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:5274: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:5274: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:5444: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:5444: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:5483: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:5483: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:5653: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:5653: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:5692: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:5692: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:5862: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:5862: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:5901: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:5901: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:6069: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:6069: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc794ayD.s:6101: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc794ayD.s:6101: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)

    "/opt/crosssolaris/bin/sparc-sun-solaris2.10-g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -mcpu=v7 -pthreads -fPIC -m32  -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_DYN_LINK=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG  -I"." -c -o "bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/file_descriptor.o" "libs/iostreams/src/file_descriptor.cpp"

...failed gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/file_descriptor.o...
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/mapped_file.o
/tmp/ccWae5Mg.s: Assembler messages:
/tmp/ccWae5Mg.s:1648: Error: Architecture mismatch on "cas [%g4],%g3,%g1".
/tmp/ccWae5Mg.s:1648: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccWae5Mg.s:2758: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccWae5Mg.s:2758: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccWae5Mg.s:2789: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccWae5Mg.s:2789: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccWae5Mg.s:4852: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccWae5Mg.s:4852: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccWae5Mg.s:4884: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccWae5Mg.s:4884: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccWae5Mg.s:5039: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccWae5Mg.s:5039: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccWae5Mg.s:5071: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccWae5Mg.s:5071: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)

    "/opt/crosssolaris/bin/sparc-sun-solaris2.10-g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -mcpu=v7 -pthreads -fPIC -m32  -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_DYN_LINK=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG  -I"." -c -o "bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/mapped_file.o" "libs/iostreams/src/mapped_file.cpp"

...failed gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/mapped_file.o...
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/bzip2.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/gzip.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi/zlib.o
...skipped <pbin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi>libboost_iostreams.so.1.59.0 for lack of <pbin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi>file_descriptor.o...
...skipped <pstage/lib>libboost_iostreams.so.1.59.0 for lack of <pbin.v2/libs/iostreams/build/gcc-sparc/release/target-os-solaris/threading-multi>libboost_iostreams.so.1.59.0...
...skipped <pstage/lib>libboost_iostreams.so for lack of <pstage/lib>libboost_iostreams.so.1.59.0...
common.mkdir bin.v2/libs/iostreams/build/gcc-sparc/release/link-static
common.mkdir bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris
common.mkdir bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/file_descriptor.o
/tmp/cc75PcHu.s: Assembler messages:
/tmp/cc75PcHu.s:1057: Error: Architecture mismatch on "cas [%g4],%g3,%g1".
/tmp/cc75PcHu.s:1057: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:1301: Error: Architecture mismatch on "cas [%g4],%g3,%g1".
/tmp/cc75PcHu.s:1301: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:1332: Error: Architecture mismatch on "cas [%g4],%g3,%g1".
/tmp/cc75PcHu.s:1332: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:2108: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:2108: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:2145: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:2145: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:6555: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:6555: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:6592: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:6592: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:6739: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:6739: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:6884: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:6884: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:7349: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:7349: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:7493: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:7493: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:7958: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:7958: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8026: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8026: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8206: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8206: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8277: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8277: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8455: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8455: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8492: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8492: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8627: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8627: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8695: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8695: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8875: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8875: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:8943: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:8943: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:9123: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:9123: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:9194: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:9194: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:9374: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:9374: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:9445: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:9445: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:9625: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:9625: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:9758: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:9758: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:10187: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:10187: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:10327: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:10327: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:10756: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:10756: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:10897: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:10897: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:11326: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:11326: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/cc75PcHu.s:11460: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/cc75PcHu.s:11460: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)

    "/opt/crosssolaris/bin/sparc-sun-solaris2.10-g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -mcpu=v7 -pthreads -m32  -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG  -I"." -c -o "bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/file_descriptor.o" "libs/iostreams/src/file_descriptor.cpp"

...failed gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/file_descriptor.o...
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/mapped_file.o
/tmp/ccfD3w4Y.s: Assembler messages:
/tmp/ccfD3w4Y.s:1692: Error: Architecture mismatch on "cas [%g4],%g3,%g1".
/tmp/ccfD3w4Y.s:1692: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccfD3w4Y.s:1847: Error: Architecture mismatch on "cas [%g4],%g3,%g1".
/tmp/ccfD3w4Y.s:1847: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccfD3w4Y.s:1878: Error: Architecture mismatch on "cas [%g4],%g3,%g1".
/tmp/ccfD3w4Y.s:1878: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccfD3w4Y.s:4451: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccfD3w4Y.s:4451: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccfD3w4Y.s:4518: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccfD3w4Y.s:4518: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccfD3w4Y.s:7007: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccfD3w4Y.s:7007: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccfD3w4Y.s:7038: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccfD3w4Y.s:7038: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccfD3w4Y.s:7397: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccfD3w4Y.s:7397: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
/tmp/ccfD3w4Y.s:7428: Error: Architecture mismatch on "cas [%g3],%g2,%g1".
/tmp/ccfD3w4Y.s:7428: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)

    "/opt/crosssolaris/bin/sparc-sun-solaris2.10-g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -mcpu=v7 -pthreads -m32  -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG  -I"." -c -o "bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/mapped_file.o" "libs/iostreams/src/mapped_file.cpp"

...failed gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/mapped_file.o...
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/bzip2.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/gzip.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/zlib.o
...skipped <pbin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi>libboost_iostreams.a(clean) for lack of <pbin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi>file_descriptor.o...
...skipped <pbin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi>libboost_iostreams.a for lack of <pbin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi>file_descriptor.o...
...skipped <pstage/lib>libboost_iostreams.a for lack of <pbin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi>libboost_iostreams.a...
...failed updating 4 targets...
...skipped 6 targets...
...updated 18 targets...

这些错误(Error: Architecture mismatch on "cas [%g4],%g3,%g1".)似乎是因为SPARC-SUN-Solaris2.10-g++编译时带有-mcpu=v7标志.

如果我运行SPARC-SUN-Solaris2.10-g++而不使用-mcpu=v7,例如:

"/opt/crosssolaris/bin/sparc-sun-solaris2.10-g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthreads -m32 -DBOOST_ALL_NO_LIB=1 -DBOOST_IOST REAMS_USE_DEPRECATED -DNDEBUG -I"." -c -o "bin.v2/libs/iostreams/build/gcc-sparc/release/link-static/target-os-solaris/threading-multi/file_descriptor.o" "libs/iostreams/src/file_descriptor.cpp"

,编译成功

有没有办法从编译中排除-mcpu=v7标志?或者其他解决问题的方法?

推荐答案

对于the GCC SPARC documentation人:

除了以上on SPARC-V9 processors in 64-bit environments个选项外,还支持以下‘-m’选项:

-m32

-m64

为32位或64位环境生成代码.32位环境将INT、LONG和POINTER设置为32位.64位环境将int设置为32位,将long和指针设置为64位.

-mcModel=哪个

......

-m32表示32位内部版本on a 64-bit SPARC v9 CPU.

这意味着使用-m32选项将导致GCC发出cas条指令以及可能存在于SPARCv9和更高版本指令集中的其他指令,但这些指令不存在于SPARCv7指令集中.

类似的情况请参见https://lists.boost.org/boost-build/2015/08/28211.php.

这里的解决方案是在命令行上传递instruction-set=v9.

Linux相关问答推荐

无法分析nasm中的单词

在Linux中随机化txt文件但保证不重复行

Git在某些文件中添加回车符,尽管autocrlf已关闭

在 Rust 中重命名主线程

操作系统信号处理循环 - 阻塞或非阻塞读取?

使用 sed 或 awk 在 linux 中将第一行中的一个单词替换为第二行中的另一个单词

文件未在脚本中使用 cp 命令复制到 Docker 容器中

当接收端未从套接字读取时,通过 Unix 套接字发送的消息会发生什么情况?

为什么 perf 不报告缓存未命中?

Bash 变量:是否区分大小写?

如何在 Ubuntu 上安装 chkconfig?

SVN 错误:无法将字符串从本机编码转换为UTF-8

./studio.sh 之后的 Android Studio 错误

如何知道是否有足够的内存可以在 Linux 机器上部署新应用程序?

在 mac 上通过 ssh 连接到 amazon aws linux 服务器

Supervisord - 将进程标准输出重定向到控制台

初学者如何在 Linux 中开始使用 Mono?

查找和基本名称不能很好地播放

如何在 docker 容器中运行 cron 作业(job)

如何用逗号而不是空格分割列表