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: Fortran on arm-unknown-linux-gnueabi


Hello David!
Hello All!

On Wednesday 16 July 2008 04:50:31 David Snowdon wrote:
> First off - thanks so much for crosstool-ng. I was tearing my hair  
> out before I found it!

;-)

> I'm trying to compile a toolchain which includes the fortran front  
> end, so that I can compile the SPEC CPU benchmarks. I want to run  
> these on an iMX31 based board which is set up for use with gnueabi.  
> I've checked out the latest svn and have used Alexander's sample  
> config to build C and C++ compilers (although I haven't yet tested  
> them), but am running into issues when I enable Fortran,  
> specifically, it seems that there's a bug in the generated fortran  
> compiler (config and tail of the build log are included below).

If I'm not mistaken (see below), Fortran is not available for ARM...

> So, being new to the world of GCC hacking, I figured I'd ask for some  
> advice. How and where would you guys start looking for the problem?

I'd look at the gcc configure log, which lies a bit higher in the logs,
and which unambiguously says (sorry for long lines):

[INFO ]  Installing final compiler
[EXTRA]    Configuring final compiler
[--SNIP--]
[ALL  ]    *** This configuration is not supported in the following subdirectories:
[ALL  ]         target-libffi target-libjava target-libobjc target-libada gnattools target-libgfortran target-zlib zlib target-boehm-gc
[ALL  ]        (Any other directories should still work fine.)
[--SNIP--]

Notice the part that reads "target-libgfortran"? Remember that when reading
the end of mail...

> [DEBUG]  Dumping crosstool-NG configuration
[--SNIP--]
> [DEBUG]    CT_PARALLEL_JOBS=5
[--SNIP--]

Don't use // jobs if you are debugging. Stay at 1, even if it is longer,
it will be much more easier to understand what's goin' on.

> [ALL  ]    /home/daves/ct/targets/arm-unknown-linux-gnueabi/build/ 
> build-cc/./gcc/gfortran -B/home/daves/ct/targets/arm-unknown-linux- 
> gnueabi/build/build-cc/./gcc/ -B/home/daves/ct/x-tools/arm-unknown- 
> linux-gnueabi/arm-unknown-linux-gnueabi/bin/ -B/home/daves/ct/x-tools/ 
> arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/lib/ -isystem / 
> home/daves/ct/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux- 
> gnueabi/include -isystem /home/daves/ct/x-tools/arm-unknown-linux- 
> gnueabi/arm-unknown-linux-gnueabi/sys-include -DHAVE_CONFIG_H -I. -I/ 
> home/daves/ct/targets/src/gcc-4.2.3/libgfortran -I. -iquote/home/ 
> daves/ct/targets/src/gcc-4.2.3/libgfortran/io -I/home/daves/ct/ 
> targets/src/gcc-4.2.3/libgfortran/../gcc -I/home/daves/ct/targets/src/ 
> gcc-4.2.3/libgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -I . - 
> Wall -fno-repack-arrays -fno-underscoring -g -O2 -c /home/daves/ct/ 
> targets/src/gcc-4.2.3/libgfortran/generated/_mod_i4.F90 -o _mod_i4.o  
>  >/dev/null 2>&1
> [ALL  ]    /home/daves/ct/targets/src/gcc-4.2.3/libgfortran/generated/ 
> _mod_i8.F90: In function 'specific__mod_i8':
> [ERROR]    /home/daves/ct/targets/src/gcc-4.2.3/libgfortran/generated/ 
> _mod_i8.F90:42: internal compiler error: Segmentation fault
> [ALL  ]    Please submit a full bug report,
> [ALL  ]    with preprocessed source if appropriate.
> [ALL  ]    See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> [ALL  ]    make[4]: *** [_mod_i8.lo] Error 1
> [ALL  ]    make[4]: *** Waiting for unfinished jobs....

See, the error is here, but you still have many of lines after that one, and
before the build stops (this is due to make "waiting for unfinished jobs"
prior to bailing out. Not having // jobs would make the error stand out, at
the end of the logs...

Also, that error suggests to submit a bug report, which I would consider if
you are ready to investigate and help the gcc folks on supporting Fortran for
ARM. Check before hand if such a bug report exists, of course...

> [ALL  ]    make[2]: *** [all-target-libgfortran] Error 2

Now, remember: the configure log already said that would happen! ;-)

Anyway, that seems to be:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30486

And with the fix available at:
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01010.html

Can you try that, and keep us informed wether that fixes your problem?
If it works with that fix, I'll add it to the patch collection for
gcc-4.{1,2}.x.

Note: I'm preparing a 1.2.0 release, due shortly (next WE?). If you were
kind enough to test that, then the patch would be in that release. :-)

Regards, and good luck! :-)
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< °_° >==-- °------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | * _ * | / \ HTML MAIL    |  """  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]