This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

Re: powerpc-linux cross gcc-2.95 with newlib-1.8.1 missing crt1.o


On Wed, 11 Aug 1999, Graham Stoney wrote:

> The build of gcc-2.95 fails while building libio/iogetline.c with:
> ../../../../gcc-2.95/libio/libio.h:30: _G_config.h: No such file or directory
> 
> This is problem #1; Any ideas where gcc is supposed to find _G_config.h?

I think I just had that same problem.  I was trying to build an m68hc11
cross compiler on Linux.  Turned out the HC11 stuff hasn't been tested with
any front-end except for C, so I had to get the gcc-core-2.95.tar.gz file
instead of the full distribution, and just compile that.  After it compiled,
I had to do "cd gcc;make s-crt0" in order to get it to built the crt0.o and
mcrt0.o files, and then I had to copy those two files to the destination
myself (/usr/local/lib/gcc-lib/m68hc11/2.95/).

I think typing "make LANGUAGES=c" might have worked ok as well, if you don't
want to go through downloading the core distribution.  Hope that helps you.

If you add a link to the gcc-2.95 directory and compile something like this:

cd gcc-2.95
ln -s ../newlib-1.8.1/newlib	(creates a symlink called "newlib")
sh ./configure --target=m68hc11-elf --program-prefix=m68hc11-elf- --with-newlib
make LANGUAGES=c
cd gcc
make s-crt0
su
cp crt0.o /usr/local/lib/gcc-lib/m68hc11/2.95/
cp mcrt0.o /usr/local/lib/gcc-lib/m68hc11/2.95/
cd ..
make install
exit

Then when you make GCC, newlib will get built as well.  Pretty cool, except
I haven't been able to get newlib to compile yet (my problem, not yours).
Perhaps this will solve your 2nd problem below also:


> I notice at this point that all the compiler passes are built, so I installed
> gcc-2.95 (despite the above build error), and went ahead and built newlib-1.8.1
> in a spirit of persistance and international understanding.
> 
> newlib built and installed fine, but when I go to compile "hello world" with
> the resulting compiler, crt1.o is missing:
> bash$ powerpc-linux-gcc hello.c
> /home/elph/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/powerpc-linux/bin/ld: cannot open crt1.o: No such file or directory
> collect2: ld returned 1 exit status
> 
> This is problem #2; Where is crt1.o supposed to come from?
> newlib-1.8.1 builds crt0.o, and includes numerous crt1.c's, but no crt1.o
> gets built. Is this a configure problem with newlib, or am I going crazy?


Curt Mills, WE7U                         hacker.NO_*SPAM@tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U


_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

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