-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature Request: dump out --with-arch options the compiler was built with #775
Comments
gcc -v will show the configure options, including the --with-arch and --with-abi if any. touch tmp.c; gcc -v tmp.c will show default options passed to cc1 and as which will show the default arch and abi options. touch tmp.c; gcc -E -dM | grep __riscv will show the default predefined RISC-V macros. This doesn't give arch directly, but will give xlen and all extensions. It also give the abi by combining xlen and the float abi. If you have an embedded elf compiler, then "touch tmp.c; gcc -S tmp.c; grep arch tmp.s" will give arch. touch tmp.c; gcc -c tm-.c; readelf -h tmp.o will give float ABI. You can get xlen from whether this is ELF32 or ELF64. That gives you ABI. |
thanks for the info.. -v option is not very well documented in the--help
It says : Display the programs invoked by the compiler.
Marc
…On Mon, Nov 16, 2020 at 11:01 AM Jim Wilson ***@***.***> wrote:
gcc -v will show the configure options, including the --with-arch and
--with-abi if any.
touch tmp.c; gcc -v tmp.c will show default options passed to cc1 and as
which will show the default arch and abi options.
touch tmp.c; gcc -E -dM | grep __riscv will show the default predefined
RISC-V macros. This doesn't give arch directly, but will give xlen and all
extensions. It also give the abi by combining xlen and the float abi.
If you have an embedded elf compiler, then "touch tmp.c; gcc -S tmp.c;
grep arch tmp.s" will give arch.
touch tmp.c; gcc -c tm-.c; readelf -h tmp.o will give float ABI. You can
get xlen from whether this is ELF32 or ELF64. That gives you ABI.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#775 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD72ZM4V26435OJNDUMXXELSQFED7ANCNFSM4TXKQNBQ>
.
--
/****************
Marc Karasek
ASM T648
Herder of Cats
****************/
|
Duplicate issue? |
On this basis I'm closing this issue. |
option for gcc to printout what arch extensions it was built with.
for example built with --with-arch=rv64imafdc some option to dump rv64imafdc to console.
Something like --arch
The text was updated successfully, but these errors were encountered: