This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Cross toolchain problem.
- From: Sjei Ryhstrup <sjei_rhystrup at yahoo dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 27 Sep 2007 07:07:19 -0700 (PDT)
- Subject: Re: Cross toolchain problem.
Hi,
--- Nick Clifton <nickc@redhat.com> wrote:
> Hi Sjei,
>
> > The limits.h in my
> > $prefix/lib/gcc/arm-linux-gnu/4.2.1/include built
> by
> > gcc seems to not include the
> >
> > #ifdef _GCC_NEXT_LIMITS_H
> > #include_next <limits.h> /* recurse down to the
> > real one */
> > #endif
> >
> > lines which are present on my native gcc, causing
> > the compilation errors.
>
> This would appear to be a gcc installation problem
> then. Quite a serious one
> too, if programs cannot use #include <limits.h>
> safely. Have you investigated
> the cause and tried rebuilding/reinstalling the gcc
> from scratch ?
I peeked around in the gcc build scripts and found
this rule in $(topdir)/gcc/Makefile.in which I
believe is used to generate the correct limits.h and
it's not being executed (for whatever reason):
xlimits.h: glimits.h limitx.h limity.h
if $(LIMITS_H_TEST) ; then \
cat $(srcdir)/limitx.h $(srcdir)/glimits.h
$(srcdir)/limity.h > tmp-xlimits.h; \
else \
cat $(srcdir)/glimits.h > tmp-xlimits.h; \
fi
mv tmp-xlimits.h xlimits.h
>
>
> > Another problem is binaries for straight C code
> > get unncessarily linked to libgcc_s.so.1
> > (similar to this:
> >
>
http://www.cygwin.com/ml/binutils/2005-07/msg00476.html).
>
> Check for symbol references in the startup files
> that are being resolved by the
> libgcc_s.so.1.
I don't think there are any. Using the results of
$(target)-gcc -v:
/home/sjei/mg/libexec/gcc/arm-linux/4.2.1/collect2
--eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -X
-m armelf_linux -p
/home/sjei/mg/lib/gcc/arm-linux/4.2.1/../../../../arm-linux/lib/crt1.o
/home/sjei/mg/lib/gcc/arm-linux/4.2.1/../../../../arm-linux/lib/crti.o
/home/sjei/mg/lib/gcc/arm-linux/4.2.1/crtbegin.o
-L/home/sjei/mg/lib/gcc/arm-linux/4.2.1
-L/home/sjei/mg/lib/gcc/arm-linux/4.2.1/../../../../arm-linux/lib
/tmp/cck6d4zM.o -lgcc --as-needed -lgcc_s
--no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed
/home/sjei/mg/lib/gcc/arm-linux/4.2.1/crtend.o
/home/sjei/mg/lib/gcc/arm-linux/4.2.1/../../../../arm-linux/lib/crtn.o
I can manually link the app by directly invoking
$(target)-ld without the -lgcc_s flag and not
receive any errors about unresolved symbols.
>
> Cheers
> Nick
>
Rgds,
Sjei.
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7