Skip to content
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

[MIPS] -mno-abicalls is ignored for LTO #56192

Open
vit9696 opened this issue Jun 23, 2022 · 3 comments
Open

[MIPS] -mno-abicalls is ignored for LTO #56192

vit9696 opened this issue Jun 23, 2022 · 3 comments

Comments

@vit9696
Copy link

vit9696 commented Jun 23, 2022

For 2 empty files (t.c and k.S) do the following:

clang -target mips-linux-gnu -c -flto -mno-abicalls t.c -o t.o
clang -target mips-linux-gnu -c -flto -mno-abicalls k.S -o k.o
clang -target mips-linux-gnu  -flto -mno-abicalls -nostdlib -fuse-ld=lld t.o k.o -o t

The following warnings will be generated:

ld.lld: warning: lto.tmp: linking abicalls code with non-abicalls code k.o
ld.lld: warning: cannot find entry symbol __start; not setting start address

The problematic one is the ld.lld: warning: lto.tmp: linking abicalls code with non-abicalls code k.o. The assembly code is correctly generated without ABI calls. However, LTO code apparently is generated with ABI calls despite -mno-abicalls argument present.

Is it a bug or shall one disable mno-abicalls anyhow differently?

@llvmbot
Copy link

llvmbot commented Jun 23, 2022

@llvm/issue-subscribers-lld-elf

@llvmbot
Copy link

llvmbot commented Jun 23, 2022

@llvm/issue-subscribers-backend-mips

@vit9696
Copy link
Author

vit9696 commented Jul 14, 2022

The issue can be worked around by adding -Wl,-mllvm,-mattr=+noabicalls. Apparently the bug is similar to #50505.

@MaskRay MaskRay changed the title [MIPS][LLD] -mno-abicalls is ignored for LTO [MIPS] -mno-abicalls is ignored for LTO Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants