-
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
How does the multilib selection mechanism work these days? #1354
Comments
OK - I just realised that I'm probably slightly misguided in looking at the generated |
Why does this happen - why is the multilib list not identical? Using
Using
|
Continuing my conversation with myself... :-)
Looks like
So far, it seems to me that the |
Hi @helloeagleyang - I don't really understand the relevance of this in the context of this thread? Maybe you can explain? I'm not saying that multilib building doesn't work - I'm trying to understand some nuances of the current mechanisms for controlling which multilibs are built and how. This is ongoing and I am using this issue thread to keep track of progress. At this stage my key questions are:
|
Update regarding these files:
|
@TommyMurphyTM1234 Thank you for the information about multilib I want to build bitmanip multilib, just like #1215 , I modify Line 3467 in 8e9fb09
and riscv-gnu-toolchain/configure.ac Line 157 in 8e9fb09
add Then after configure, Makefile will contain GLIBC_MULTILIB_NAMES := rv32imac-ilp32 rv32imafdc-ilp32d rv64imac-lp64 rv64imafdc-lp64d rv64imafdc_zba_zbb_zbc_zbs-lp64d Just like the hack here: #1215 (comment) Then after But finally -print-multi-lib don't show any about zba_zbb_zbc_zbs
Some question:
|
commit about multilib path in GCC :gcc-mirror/gcc@17d683d |
My focus so far has mainly been on the bare metal toolchain. And that's before even touching on more recent changes such as this and other related PRs which may be relevant to controlling what multilibs are built? And maybe also the sort of upstream patch that you mentioned above.
As far as I can see the build will always only build the default set of multilibs no matter what tweaking is done. Edit: apologies -
Perhaps as a stopgap can you build a toolchain targeting your required
|
Yes, I plan to do this if I can't find a good way to build multilib. Thanks for your advice. |
FWIW this is what I got:
|
Since this issue isn't attracting any useful feedback I'm going to close it. It'll obviously remain as a closed issue for future reference and if there are more specific/focused issues with multilib build options then I will log separate issues for these as needed. |
In the past these files could be used to control the set of multilibs built:
multilib-generator
: Python script used to generate the contents oft-elf-multilib
and/ort-linux-multilib
t-elf-multilib
: the (default unless overridden) set of multilibs to be built for the bare metal/newlib toolchaint-linux-multilib
: the (default unless overridden) set of multilibs to be built for the Linux toolchainSo, it was possible to run the
multilib-generator
in order to specify a different set of multilibs than specified by the defaultt-elf-multilib
/t-linux-multilib
files.However, as far as I can see, this approach to overriding the contents of
t-elf-multilib
ort-linux-multilib
to change the set of multilibs built no longer works.I know that
configure --with-multilib-generator="..."
can be used to override the default set of multilibs built for the bare metal/newlib toolchain.However, as stated in the
README.md
, this does not work for the Linux toolchain.So how can one override the default set of multilibs built for the Linux toolchain?
I see this in the
riscv-gnu-toolchain
top levelMakefile
after runningconfigure ... --enable-multilib
:However I don't really understand:
multilib-generator
,t-elf-multilib
andt-linux-multilib
files relate to this mechanism - if at all?Why theifeq ($(MULTILIB_GEN),)
check - and subsequentelse
clause - exist sinceMULTILIB_GEN
always set to nothing by the preceding line?GLIBC_MULTILIB_NAMES := rv32imac-ilp32 rv32imafdc-ilp32d rv64imac-lp64 rv64imafdc-lp64d
perhaps beGLIBC_MULTILIB_NAMES ?= rv32imac-ilp32 rv32imafdc-ilp32d rv64imac-lp64 rv64imafdc-lp64d
to allow it to be overridden externally?(And ditto forNEWLIB_MULTILIB_NAMES
?)Can anybody explain how the current multilib build mechanism works and how the set of multilibs built can be controlled?
The text was updated successfully, but these errors were encountered: