flang-compiler / f18

F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler
230 stars 48 forks source link

Add dependency on libSemantics to libEvaluate to solve linker issues. #1104

Closed DavidTruby closed 4 years ago

DavidTruby commented 4 years ago

When building with LLVM HEAD, the unittests fail to link with ld.bfd or ld.gold due to a linker ordering issue. Adding libSemantics as a dependency to libEvaluate seems to fix that issue.

tskeith commented 4 years ago

By the way, I was seeing the problem without explicitly requesting ld.bfd or ld.gold. Maybe it was using one of them by default, but I don't know how to tell. This was with GCC 8.4 on ubuntu 18.04.

DavidTruby commented 4 years ago

BFD is the default on Ubuntu, unless its been changed on that machine or explicitly requested on the build line, so that would make sense.

bcfriesen commented 4 years ago

Hi,

this patch works, I can build flang clang 11 dev build with no errors. Thanks @DavidTruby!

DavidTruby commented 4 years ago

Committed directly into llvm-project: https://github.com/llvm/llvm-project/commit/a1726e65bc1fdbd2800839e48e68cb4a68cc7092