Issue related to C++ building

Sivaprasad.pv sivaprasad.pv@redpinesignals.com
Mon Oct 8 05:09:00 GMT 2007


Hi Ian,
Thank you for quick response.
Is it require host system should support newlib inorder to build 
libiberty for the host?

--P.V.Siva Prasad

Ian Lance Taylor wrote:
> "Sivaprasad.pv" <sivaprasad.pv@redpinesignals.com> writes:
>
>   
>> I am quite new to gcc building.while building g++(cross compiler)for
>> our target following error occurred.
>>
>> gcc   -O -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings
>> -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic
>> -Wno-long-long   -DHAVE_CONFIG_H  -o Tcollect2 \
>>                 collect2.o tlink.o intl.o version.o
>> ../libiberty/libiberty.a
>> ../libiberty/libiberty.a(cp-demangle.o): In function `demangle_identifier':
>> cp-demangle.c:(.text+0xdc3): undefined reference to `_ctype_'
>> ../libiberty/libiberty.a(cp-demangle.o): In function `cplus_demangle_v3':
>> cp-demangle.c:(.text+0x3758): undefined reference to `__getreent'
>> ../libiberty/libiberty.a(cp-demangle.o): In function `java_demangle_v3':
>> cp-demangle.c:(.text+0x3817): undefined reference to `__getreent'
>> ../libiberty/libiberty.a(cp-demangle.o): In function
>> `demangle_v3_with_details':
>> cp-demangle.c:(.text+0x3995): undefined reference to `__getreent'
>> cp-demangle.c:(.text+0x39d5): undefined reference to `__getreent'
>> collect2: ld returned 1 exit status
>>     
>
> You've got a libiberty built with the newlib header files, and you're
> linking against it on a system which does not use newlib.
>
> I don't know how that happened.  This is a link of a host program, so
> it should use a libiberty built for the host, not for the target.
>
> Ian
>
>
>   




More information about the Gcc-help mailing list