-
Notifications
You must be signed in to change notification settings - Fork 13.6k
powerpc64-ibm-aix: the .weak
assembler directive is not supported
#130269
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
Comments
@llvm/issue-subscribers-backend-powerpc Author: Folkert de Vries (folkertdev)
the `.weak` assembler directive is currently not supported by LLVM (although it is documented https://www.ibm.com/docs/en/ssw_aix_71/assembler/assembler_pdf.pdf).
In contrast, the Therefore it is currently impossible to define weak symbols using inline assembly. the clang version 21.0.0git (https://github.com/llvm/llvm-project.git 5422e2c)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation) this came up here rust-lang/rust#137816 |
the
.weak
assembler directive is currently not supported by LLVM (although it is documented https://www.ibm.com/docs/en/ssw_aix_71/assembler/assembler_pdf.pdf).In contrast, the
.weak_definition
directive is accepted by the assembly parser, but crashes LLVM later on.Therefore it is currently impossible to define weak symbols using inline assembly.
the
.weak_definition
attribute fails with (https://godbolt.org/z/rderToPx4)clang version 21.0.0git (https://github.com/llvm/llvm-project.git 5422e2c)
Target: powerpc64-ibm-aix
Thread model: posix
InstalledDir: /opt/compiler-explorer/clang-trunk-20250306/bin
(in-process)
"/opt/compiler-explorer/clang-trunk-20250306/bin/clang-21" -cc1 -triple powerpc64-ibm-aix -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name example.c -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -fno-verbose-asm -mconstructor-aliases -fxl-pragma-pack -fno-sized-deallocation -target-cpu pwr7 -mfloat-abi hard -gstrict-dwarf -gno-column-info -debug-info-kind=constructor -dwarf-version=3 -fdebug-compilation-dir=/app -v -fdata-sections -fcoverage-compilation-dir=/app -resource-dir /opt/compiler-explorer/clang-trunk-20250306/lib/clang/21 -internal-isystem /opt/compiler-explorer/clang-trunk-20250306/lib/clang/21/include/ppc_wrappers -internal-isystem /opt/compiler-explorer/clang-trunk-20250306/lib/clang/21/include -internal-isystem /usr/include -ferror-limit 19 -fno-signed-char -fno-use-cxa-atexit -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -o /app/output.s -x c
clang -cc1 version 21.0.0git based upon LLVM 21.0.0git default target x86_64-unknown-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
/opt/compiler-explorer/clang-trunk-20250306/lib/clang/21/include/ppc_wrappers
/opt/compiler-explorer/clang-trunk-20250306/lib/clang/21/include
/usr/include
End of search list.
fatal error: error in backend: Not implemented yet.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Compiler returned: 70
this came up here rust-lang/rust#137816
cc @daltenty
The text was updated successfully, but these errors were encountered: