簡體   English   中英

無法從源代碼構建 GCC 10

[英]Failed to build GCC 10 from source

在 Oracle Linux 上,我正在嘗試從以下構建 GCC 工具鏈:

  • GCC 10.1.0
  • 二進制實用程序 2.34
  • GDB 9.2.0

所有這些都是截至今天最新發布的資源。 我是這樣配置的:

../gcc10-toolchain/configure \
    --prefix=/opt/gcc10-toolchain \
    --with-diagnostics-color=auto \
    --with-system-zlib \
    --with-system-lzma \
    --enable-languages="c,c++,lto" \
    --enable-shared \
    --enable-static \
    --enable-gold=default \
    --enable-install-libbfd \
    --enable-plugins \
    --enable-default-pie \
    --enable-linker-build-id \
    --enable-threads=posix \
    --enable-checking=release \
    --enable-__cxa_atexit \
    --enable-initfini-array \
    --enable-gnu-indirect-function \
    --enable-tui \
    --enable-bootstrap \
    --disable-multilib \
    --disable-libgcj \
    --disable-nls \
    --disable-lto \
    --disable-libstdcxx-debug

但是,使用make構建時,出現以下錯誤:

../../gcc10-toolchain/gcc/lto-streamer-out.c: In function ‘void write_symbol_extension_info(tree)’: ../../gcc10-toolchain/gcc/lto-streamer-out.c:2790:10: error: ‘GCCST_VARIABLE’ was not declared in this scope
        ? GCCST_VARIABLE : GCCST_FUNCTION);
          ^ ../../gcc10-toolchain/gcc/lto-streamer-out.c:2790:27: error: ‘GCCST_FUNCTION’ was not declared in this scope
        ? GCCST_VARIABLE : GCCST_FUNCTION);
                           ^ ../../gcc10-toolchain/gcc/lto-streamer-out.c:2797:18: error: ‘GCCSSK_BSS’ was not declared in this scope   section_kind |= GCCSSK_BSS;

不幸的是,我在網上找不到任何東西,甚至不知道從哪里開始尋找。

問題是我將源代碼復制在一起的順序。 binutils-2.34 比 gcc-10.1.0 更早,所以最后復制 gcc-10.1.0 以便它覆蓋與 binutils 共享的文件,而不是相反。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM