Skip to content

Internal compiler error while cross-compiling LLVM 20.1.5 with GCC 8.1.0 #146631

Open
@Sangeetha-E

Description

@Sangeetha-E

While cross-compiling LLVM 20.1.5 using GCC 8.1.0, I am encountering the following issues:

Initial Error:

llvm-20.1.5.src/lib/Support/APFloat.cpp:130:61: error: 'const llvm::fltSemantics{15, -14, 11, 16, IEEE754, IEEE, true, true}' is not a constant expression
 static constexpr fltSemantics semIEEEhalf = {15, -14, 11, 16};

Reference Fix Applied:

I followed the suggestion in this GitHub issue:
#81013 (comment)

Subsequent Error After Applying Fix:

llvm-20.1.5.src/lib/Analysis/CtxProfAnalysis.cpp:233:5: internal compiler error: in tsubst_decomp_names, at cp/pt.c:16535
    for (auto &[_, SubCtxSet] : Ctx.callsites())

Note:

  • These issues occur when using GCC 8.1.0.

  • When I compile LLVM 20.1.5 with GCC 13, the build completes successfully.

  • This suggests that newer versions of LLVM (including 20.1.5) may require GCC >= 13 for successful compilation.

Request:

Please confirm:

  • Whether LLVM 20.1.5 officially requires GCC 13 or later.

  • Are there any known workarounds to build LLVM 20.1.5 with GCC 8.x?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions