This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error in multilib build when doing canadian cross


Hi,

On 06. mars 2012 20:00, Yann E. MORIN wrote:
> But since you bring up the problem, there still is an issue elsewhere in
> that same build script. On line 736, we have a similar construct (for the
> final gcc build):
> 
> 780   if [ "${CT_MULTILIB}" = "y" ]; then
> 781       multilibs=( $( "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc" -print-multi-lib \
> 782                      |tail -n +2 ) )
> 783       if [ ${#multilibs[@]} -ne 0 ]; then
> 784           CT_DoLog EXTRA "gcc configured with these multilibs (besides the default):"
> 785           for i in "${multilibs[@]}"; do
> 786               dir="${i%%;*}"
> 787               flags="${i#*;}"
> 788               CT_DoLog EXTRA "   ${flags//@/ -}  -->  ${dir}/"
> 789           done
> 790       else
> 791           CT_DoLog WARN "gcc configured for multilib, but none available"
> 792       fi
> 793   fi
> 
> Looking at line 781, this would indeed not work for canadian crosses.
> So, we can not use the newly-built compiler to get the list of available
> multilibs... And because we are doping a canadian cross, we do *not* have
> the core gcc either. And the compiler that was used to build the C library
> (a step that you did not reach yet) might not be multilib aware either...
> 
> So, I am afraid that multilib is currently a no-no for canadian crosses.
> Yes, that *is* a hard limitation.
Hmmm... that's to bad :-(

> 
> Fortunately, I already have some patches localy, that do revamp the canadian
> case code-path. In this rework-in-progess, the core compilers will actually
> be built, so there will no longer be a requirement for a target cross-compiler
> to pre-exist, so we'll be able to query the core compiler to get the multilib
> listing, even (and especially) ion the canadian case.
> 
> Quoting again that part of the message:
>> .../.build/arm-none-eabi/build/gcc-core-static/bin/arm-none-eabi-gcc
> 
> So, you are building for a bare-metal target?
Yes, arm-none-eabi target.

I have set up a Jnekins build job using an ant script to first build a
native x86_64 compiler for arm-none-eabi.

Then I do canadian cross for i686 and mingw32.

Currently I do not make it multilib, but to align it with what others do
when build arm compiler, I would bvery much like it to be multilib.

> That's probably why you have an issue in the core compiler code, because
> the core compiler code path is used to build the bare-metal final gcc.
> 
> So, again, for canadian cross, we would not be able to call the newly-built
> core compiler (which is in fact a final compiler)...
But when doing a canadian cross to mingw32 it is difficult to run the
core compiler since it is built for windows. And running windows exe on
linux demands that you have wine installed. And that complicates the
build very much.

So instead I though it was more correct to use the native compiler to
ask for multilib configuration. Of course that requires that the native
compiler is compile with the same parameters that the candian cross is
using.

> 
> When I thought I had most bases covered, and a quiet evening in sight!...
> Sigh... ;-)
> 
Sorry too open a can of worms ;-)

> Thanks for pointing the issue! :-)
>
My pleasure :-)

Regards
Per A.



--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]