* Error in multilib build when doing canadian cross @ 2012-03-06 10:46 Per Arnold Blaasmo 2012-03-06 19:00 ` Yann E. MORIN 0 siblings, 1 reply; 3+ messages in thread From: Per Arnold Blaasmo @ 2012-03-06 10:46 UTC (permalink / raw) To: yann.morin.1998; +Cc: crossgcc 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 The arm-none-eabi-gcc.exe is there, but when doing a canadian cross that fails on my linux machine. If the build had been run on a windows it would have accepted the filename without '.exe', but not if the build is run on a linux machine. So if it is a canadian build it should rather run the build servers cross toolchain. Sugested fix: if [ "${CT_MULTILIB}" = "y" ]; then if [ "{CT_CANADIAN}" = "y" ]; then multilibs=( $( "${CT_TARGET_PREFIX}-gcc" -print-multi-lib \ |tail -n +2 ) ) else multilibs=( $( "${core_prefix_dir}/bin/${CT_TARGET}-gcc" -print-multi-lib \ |tail -n +2 ) ) fi -- Per Arnold Blåsmo Senior Design Engineer, Atmel Norway -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error in multilib build when doing canadian cross 2012-03-06 10:46 Error in multilib build when doing canadian cross Per Arnold Blaasmo @ 2012-03-06 19:00 ` Yann E. MORIN 2012-03-08 8:05 ` Per Arnold Blaasmo 0 siblings, 1 reply; 3+ messages in thread From: Yann E. MORIN @ 2012-03-06 19:00 UTC (permalink / raw) To: crossgcc, Per-Arnold.Blaasmo 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error in multilib build when doing canadian cross 2012-03-06 19:00 ` Yann E. MORIN @ 2012-03-08 8:05 ` Per Arnold Blaasmo 0 siblings, 0 replies; 3+ messages in thread From: Per Arnold Blaasmo @ 2012-03-08 8:05 UTC (permalink / raw) To: Yann E. MORIN; +Cc: crossgcc 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-08 8:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-03-06 10:46 Error in multilib build when doing canadian cross Per Arnold Blaasmo 2012-03-06 19:00 ` Yann E. MORIN 2012-03-08 8:05 ` Per Arnold Blaasmo
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).