-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang/flang-new compilation issues on Linux on loongarch64 #4907
Comments
Thank you for your testing. I will set up the environment promptly to reproduce the issue. |
Update with correction: According to the reference here: https://flang.llvm.org/docs/FlangCommandLineReference.html, there is no "-mabi=%" flag for flang-new. Following a recent PR #4899, I tried to add " -mabi=% " flag to the filter-out list at lines 1723-1724 in the file Makefile.system: Lines 1722 to 1724 in f10d47c
This fixes " flang-new: error: unknown argument: '-mabi=lp64d' " issue for However, now I observe two FORTRAN programs
Check the attachment for the msg files. ######################################################### For The original related part is here: Lines 62 to 80 in edaf593
The fix: add one line before lines 64 and 74: if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*") and one line after lines 69 and 79: endif () The above fixes " flang-new: error: unknown argument: '-mabi=lp64d' " issue for
Check the attachment for the msg files. |
Right, seems earlier versions of flang-new used to ignore any Regarding the other problem with clang, could you try changing the toplevel
and make it read
(assuming one does not need to use the GNUSTACK identifier to mark the stack as non-executable with clang - although maybe it would be necessary when expressly using GNU ld for linking) |
Thanks for your kind help. I confirm that your modification fixes clang errors. |
Great, thanks for the feedback. That leaves the compilation error in slacon.f, which appears to be an internal error in LLVM18. Maybe this is already fixed in the recently released 19.1 ? |
No. Current flang-new 19.1.1 still fails. |
Thanks, reported to llvm/llvm-project now |
Hello,
@XiWeiGu When I try to build OpenBLAS with clang/flang-new on Debian sid, I found compilation failed with both gmake and cmake. See below.
System details: Loongson 3A6000 CPU, Debian sid, kernel 6.11.0, clang 18.1.8, flang-new 18.1.8 (or clang 19.1.0 and flang-new 19.1.0), cmake 3.30.3.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
gmake:
building command:
CC=clang-18 FC=flang-new-18 make
result:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cmake:
building commands:
CC=clang-18 FC=flang-new-18 cmake -B build
and thencmake --build build
result:
if replace
flang-new-18
withgfortran
, the result is:The text was updated successfully, but these errors were encountered: