public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problems with Building a Fortran Cross Compiler
@ 2004-02-27  0:50 aaronchiles
  2004-02-27 12:34 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: aaronchiles @ 2004-02-27  0:50 UTC (permalink / raw)
  To: crossgcc; +Cc: gcc-help, gcc, gcc

I am trying to build a FORTRAN cross compiler.  
 
I am using gcc-3.3.2 (only the core and f77) and binutils-2.12.12.  My configuration was as follows : configure --host=sparc-sun-solaris2.9 --target=powerpc-wrs-vxworks --with-headers=/opt/wind/target/h --with-libs=/opt/wind/target/lib --prefix=/opt/src/xcomp/target 
 
I managed to build the C compiler with no problems, build a mod, loaded up on SBC and ran the module.  Next I ran the configure-target-libf2c from top level, and that created libf2c under the powerpc-wrs-vxworks and the 'make all-target-libf2c.  
  As a test I built two files a C file and file to test the c and FORTRAN compilation.  Both compile without errors.  The problem is that if I load the FORTRAN obj file on the board I receive Relocation value does not fit in 24 bits.  
 
To get around that I called the FORTRAN function from a C file and then linked in one obj file...it load find with no errors and works as long as I don't have any I/O in the FORTRAN file.  
If it does I receive a similar error as stated before only this one is either 14 or 16 bit sizes.  


I've tried going back to the beginning and updated the binutilities to 2.14 hoping that would create some kind of fix, but it was not successful.  I then have tried to build 2.14 with gcc versions 2.95.3, 3.03, and 3.3.3 with the core only and full versions.  In all cases I receive the following error :

gcc/include/sys/resource.h:44: parse error before "PARAMS"
gcc/include/sys/resource.h:45: parse error before "PARAMS"
gcc/include/sys/resource.h:47: parse error before "PARAMS"
gcc/include/sys/resource.h:48: parse error before "PARAMS"
gcc/include/sys/resource.h:49: parse error before "PARAMS"
gcc/include/sys/resource.h:50: parse error before "PARAMS"
gcc/include/sys/resource.h:51: parse error before "PARAMS"

and 
it comes from libf2c/libU77/etime_.c
also with the following errors

libf2c/libU77/etime_.c:129: storage size of 'rbuff' isn't known
libf2c/libU77/etime_.c:131: 'RUSAGE_SELF' undeclared (first use)
libf2c/libU77/etime_.c:131: (Each undeclared identifier is reported only once)

I have know idea what todo.  Can anyone please help me. If so email me at Aaron.chiles@robins.af.mil or aaronchiles@cox.net


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problems with Building a Fortran Cross Compiler
  2004-02-27  0:50 Problems with Building a Fortran Cross Compiler aaronchiles
@ 2004-02-27 12:34 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 2004-02-27 12:34 UTC (permalink / raw)
  To: aaronchiles; +Cc: gcc-help, gcc

aaronchiles@cox.net wrote:
>if I load the FORTRAN obj file on the board I receive Relocation value does not fit in 24 bits.

My guess would be that you forgot to link in something.  The fortran 
compiler has a run time that needs to be linked in, particularly if you 
do something like I/O.

The C library is built into the vxworks kernel, so you don't need to 
worry about linking C files with any library.  But vxworks is not going 
to have the Fortran library built into the kernel.

Because vxworks by partially linking (-r) objects, and then loading them 
into the kernel, you won't get an error for a missing library until you 
load an object file.

You can probably find the missing symbols by using objdump to look at 
the relocations.  The library you need is probably libg2c.a.

> I've tried going back to the beginning and updated the binutilities to 2.14
> gcc/include/sys/resource.h:44: parse error before "PARAMS"

This one I can't make sense of.  Where did gcc/include/sys/resource.h 
come from?   There is no such file in binutils or gcc.  I am guessing it 
is a fixincluded target header file, but does vxworks have such a file? 
  Maybe this is a fixinclude host header file, but I doubt such a file 
would have PARAM markers in it.

You have done something here that I can't understand from the info you 
gave me.  I think you have somehow messed up your header files, or maybe 
the host environment.  You need to give more details about the commands 
you ran, and the errors you are getting.

> libf2c/libU77/etime_.c:129: storage size of 'rbuff' isn't known
> libf2c/libU77/etime_.c:131: 'RUSAGE_SELF' undeclared (first use)
> libf2c/libU77/etime_.c:131: (Each undeclared identifier is reported only once)

This similarly implies that something in your environment is messed up, 
or that you configured something wrong.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-27  7:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-27  0:50 Problems with Building a Fortran Cross Compiler aaronchiles
2004-02-27 12:34 ` Jim Wilson

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