public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98878] New: Incorrect multilib list for riscv*-rtems
@ 2021-01-29 7:45 kito at gcc dot gnu.org
2021-01-29 7:57 ` [Bug target/98878] " sebastian.huber@embedded-brains.de
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: kito at gcc dot gnu.org @ 2021-01-29 7:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98878
Bug ID: 98878
Summary: Incorrect multilib list for riscv*-rtems
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: kito at gcc dot gnu.org
Reporter: kito at gcc dot gnu.org
CC: sebastian.huber@embedded-brains.de, wilson at gcc dot gnu.org
Target Milestone: ---
Target: riscv32-rtems
Sebastian has reported multilib generation for RTEM is broken after
g:a5ad5d5c478ee7bebf057161bb8715ee7d286875.
GCC configure: --with-arch=rv32gc --with-abi=ilp32 --target=riscv32-rtems.
----------------------------------------
Before this commit g:a5ad5d5c478ee7bebf057161bb8715ee7d286875:
----------------------------------------
./gcc/xgcc -print-multi-lib
.;
rv32i/ilp32;@march=rv32i@mabi=ilp32
rv32im/ilp32;@march=rv32im@mabi=ilp32
rv32imafd/ilp32d;@march=rv32imafd@mabi=ilp32d <-- HERE
rv32iac/ilp32;@march=rv32iac@mabi=ilp32
rv32imac/ilp32;@march=rv32imac@mabi=ilp32
rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f
rv64imafd/lp64d;@march=rv64imafd@mabi=lp64d
rv64imafd/lp64d/medany;@march=rv64imafd@mabi=lp64d@mcmodel=medany
rv64imac/lp64;@march=rv64imac@mabi=lp64
rv64imac/lp64/medany;@march=rv64imac@mabi=lp64@mcmodel=medany
rv64imafdc/lp64d;@march=rv64imafdc@mabi=lp64d
rv64imafdc/lp64d/medany;@march=rv64imafdc@mabi=lp64d@mcmodel=medany
./gcc/xgcc -print-multi-directory -march=rv32imafd -mabi=ilp32d
rv32imafd/ilp32d
----------------------------------------
After this commit g:a5ad5d5c478ee7bebf057161bb8715ee7d286875:
----------------------------------------
./gcc/xgcc -print-multi-lib
.;
rv32i/ilp32;@march=rv32i@mabi=ilp32
rv32im/ilp32;@march=rv32im@mabi=ilp32
rv32iac/ilp32;@march=rv32iac@mabi=ilp32
rv32imac/ilp32;@march=rv32imac@mabi=ilp32
rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f
rv64imafd/lp64d;@march=rv64imafd@mabi=lp64d
rv64imafd/lp64d/medany;@march=rv64imafd@mabi=lp64d@mcmodel=medany
rv64imac/lp64;@march=rv64imac@mabi=lp64
rv64imac/lp64/medany;@march=rv64imac@mabi=lp64@mcmodel=medany
rv64imafdc/lp64d;@march=rv64imafdc@mabi=lp64d
rv64imafdc/lp64d/medany;@march=rv64imafdc@mabi=lp64d@mcmodel=medany
./gcc/xgcc -print-multi-directory -march=rv32imafd -mabi=ilp32d
rv32imafd/ilp32d
---------------------------
The difference is rv32imafd/ilp32d is disappeared from the output of
-print-multi-directory, the gcc think that could reuse the default library, but
it's not true, but seems like -print-multi-directory is doing right here.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/98878] Incorrect multilib list for riscv*-rtems
2021-01-29 7:45 [Bug target/98878] New: Incorrect multilib list for riscv*-rtems kito at gcc dot gnu.org
@ 2021-01-29 7:57 ` sebastian.huber@embedded-brains.de
2021-02-05 6:27 ` cvs-commit at gcc dot gnu.org
2021-02-05 6:33 ` kito at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: sebastian.huber@embedded-brains.de @ 2021-01-29 7:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98878
--- Comment #1 from Sebastian Huber <sebastian.huber@embedded-brains.de> ---
It may have something to do with TARGET_RISCV_DEFAULT_ABI == ilp32d. The
gcc/tm.h in the build tree contains this:
gcc/tm.h:#ifndef TARGET_RISCV_DEFAULT_ARCH
gcc/tm.h:# define TARGET_RISCV_DEFAULT_ARCH rv32gc
gcc/tm.h:#ifndef TARGET_RISCV_DEFAULT_ABI
gcc/tm.h:# define TARGET_RISCV_DEFAULT_ABI ilp32d
The rv32imafd/ilp32d multilib is the only multilib (except ".") which has also
this ABI. This could be checked by adding a rv32imfd/ilp32d multilib for
example.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/98878] Incorrect multilib list for riscv*-rtems
2021-01-29 7:45 [Bug target/98878] New: Incorrect multilib list for riscv*-rtems kito at gcc dot gnu.org
2021-01-29 7:57 ` [Bug target/98878] " sebastian.huber@embedded-brains.de
@ 2021-02-05 6:27 ` cvs-commit at gcc dot gnu.org
2021-02-05 6:33 ` kito at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-05 6:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98878
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kito Cheng <kito@gcc.gnu.org>:
https://gcc.gnu.org/g:072f20c555907cce38a424da47b6c1baa8330169
commit r11-7117-g072f20c555907cce38a424da47b6c1baa8330169
Author: Kito Cheng <kito.cheng@sifive.com>
Date: Thu Jan 28 18:29:53 2021 +0800
PR target/98878 - Incorrect multilib list for riscv*-rtems
- Multi-lib only check the default argument is appeared in the multilib
flag list, but we didn't check the case that the flag is required but
default argument didn't provide.
- For example riscv*-rtems has a multilib set:
rv32imafd/ilp32d;@march=rv32imafd@mabi=ilp32d
And when we set the default argument of arch to rv32imafdc and ABI to
ilp32d, gcc will check the ilp32d is matched, but it didn't check
rv32imafd is not provided by default arguments, so it should not
reuse default library.
- The side effcet of this patch is csky-elf target will increase the
number of multilib from 54 to 59, but it's because genmultilib didn't
know the default argument for multilib, so I think it could be
improved in future.
gcc/ChangeLog:
* gcc.c (print_multilib_info): Check all required argument is
provided
by default arg.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/98878] Incorrect multilib list for riscv*-rtems
2021-01-29 7:45 [Bug target/98878] New: Incorrect multilib list for riscv*-rtems kito at gcc dot gnu.org
2021-01-29 7:57 ` [Bug target/98878] " sebastian.huber@embedded-brains.de
2021-02-05 6:27 ` cvs-commit at gcc dot gnu.org
@ 2021-02-05 6:33 ` kito at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: kito at gcc dot gnu.org @ 2021-02-05 6:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98878
Kito Cheng <kito at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Kito Cheng <kito at gcc dot gnu.org> ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-05 6:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 7:45 [Bug target/98878] New: Incorrect multilib list for riscv*-rtems kito at gcc dot gnu.org
2021-01-29 7:57 ` [Bug target/98878] " sebastian.huber@embedded-brains.de
2021-02-05 6:27 ` cvs-commit at gcc dot gnu.org
2021-02-05 6:33 ` kito at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).