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


On Tuesday 06 March 2012 11:38:19 Per Arnold Blaasmo wrote:
> In gcc.sh you find the following:
>     if [ "${CT_MULTILIB}" = "y" ]; then
>         multilibs=( $( "${core_prefix_dir}/bin/${CT_TARGET}-gcc"
> -print-multi-lib   \
>                        |tail -n +2 ) )
> 
> This fails when trying to do a candian cross where target is win32.
> The error is:
> ..../scripts/build/cc/gcc.sh: line 413:
> .../.build/arm-none-eabi/build/gcc-core-static/bin/arm-none-eabi-gcc: No
> such file or directory

This has already been fixed in the repository:
    http://crosstool-ng.org/hg/crosstool-ng/rev/4fcedd2c14b2

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.

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?
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)...

When I thought I had most bases covered, and a quiet evening in sight!...
Sigh... ;-)

Thanks for pointing the issue! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
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]