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: latest mini-ct script and NPTL versus linuxthreads


Hinko Kocevar wrote:

> FYI
>
>> That is caused by erroneous glibc-headers install, right? I eventried
>> as Arno suggested few days back - copying
>> linuxthreads/sysdeps/pthread/pthread.h by hand to the
>> sys-root/usr/include. It turned out that I needed the contents of
>> linuxthreads/sysdeps/pthread/bits/* copied to
>> sys-root/usr/include/bits too, to get past the error but it failed
>> down the line when it couldn't find crti.o (while compiling final
>> gcc). Even tried to create lib and usr/lib (according to
>> crosstool.sh) but to no avail... Maybe I need newer gcc ?!
>>
That looks like gcc has no clue about where it should find the target
libraries.

Do you have a crt1.o for your target system? It should have been
installed in the final glibc install phase. Search for it in
$glibc_install_root/usr/lib/crt1.o (if you configured glibc with
--prefix=/usr, which is almost mandatory; otherwise it is in
$glibc_install_root/lib). Then use gcc --print-search-dirs to find out
where gcc expects these files to reside.

Here's a simple test:
#> echo 'void main(){}' > test.c
#> $target-gcc test.c -o test
test.c: In function `main':
test.c:1: warning: return type of `main' is not `int'
[$target-ld: crt1.o: No such file: No such file or directory]
#>

Of course, in a perfect world with a workin toolchain you would not get
a message about crt1.o missing ;)

You can also use gcc --verbose to find out what configure options were
given to gcc.

It will work if you would just copy the crt?.o files to where gcc
expects them (and then build the final gcc), but you might also run into
missing -lc errors later. Find out what went wrong (a missing option to
the configure of gcc-core?), correct it and rebuild the toolchain
(should be easier, now that you already have the target libraries - just
rebuild gcc once with --disable-shared, verify that it can find crt1.o,
then rebuild gcc with --enable-shared).


Good luck!
Arno

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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