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

sparcv9 unsupported argument '-Av9b' to option '-Wa,' #125124

Open
bsdkurt opened this issue Jan 30, 2025 · 2 comments
Open

sparcv9 unsupported argument '-Av9b' to option '-Wa,' #125124

bsdkurt opened this issue Jan 30, 2025 · 2 comments
Labels
backend:Sparc clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

Comments

@bsdkurt
Copy link

bsdkurt commented Jan 30, 2025

oracle$ echo | clang -Wa,-Av9b -x c -
clang: error: unsupported argument '-Av9b' to option '-Wa,'

oracle$ clang -v
OpenBSD clang version 19.1.7
Target: sparc64-unknown-openbsd7.6
Thread model: posix
InstalledDir: /usr/bin

-Wa,-Av9b is supported by gcc on sparc and it would be helpful if clang would support it as well so makefiles don't have to conditionally use -Wa,-mcpu=niagara for clang and -Wa,-Av9b for gcc.

@EugeneZelenko EugeneZelenko added backend:Sparc clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' and removed new issue labels Jan 30, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 30, 2025

@llvm/issue-subscribers-clang-driver

Author: Kurt Miller (bsdkurt)

oracle$ echo | clang -Wa,-Av9b -x c - clang: error: unsupported argument '-Av9b' to option '-Wa,'

oracle$ clang -v
OpenBSD clang version 19.1.7
Target: sparc64-unknown-openbsd7.6
Thread model: posix
InstalledDir: /usr/bin

-Wa,-Av9b is supported by gcc on sparc and it would be helpful if clang would support it as well so makefiles don't have to conditionally use -Wa,-mcpu=niagara for clang and -Wa,-Av9b for gcc.

@bsdkurt
Copy link
Author

bsdkurt commented Jan 30, 2025

There are some similar issues in the space and I'm unsure if I should open additional bug reports - all sparc related.

  1. clang -x assembler-with-cpp does not respect the default CPU that clang without -x assemebler-with-cpp does. clang without -x assembler-with-cpp sets -Av9a as the default CPU for Linux, FreeBSD and OpenBSD:
    https://clang.llvm.org/doxygen/Driver_2ToolChains_2Arch_2Sparc_8cpp_source.html

  2. clang -x assembler-with-cpp -Wa,-mcpu=ultrasparc does not change the instruction set to v9a and errors when v9a instructions are used:
    /usr/xenocara/driver/xf86-video-sunffb/src/VISmoveImage.s:2436:2: error: instruction requires a CPU feature not currently enabled
    faligndata %f42, %f44, %f26

The workaround for 2 is to use clang -x assembler-with-cpp -mcpu=ultrasparc

Please let me know if the above should be their own bug reports or can be a part of this bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:Sparc clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Projects
None yet
Development

No branches or pull requests

3 participants