This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


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: Linking error with DINTEGER_ONLY


Thanks Jeff, configuring with --disable-newlib-io-float solved all my
problems. Now all the printf family functions work.

Alex

On 2/1/06, Alex Gonzalez <langabe@gmail.com> wrote:
> Hi,
>
> A a follow up, compiling without any extra CFLAGS_FOR_TARGET, I am
> also having problems to get iprintf to work.
>
> It gets to __sfvwrite, in the line buffered section, but never
> actually calls fp->_write.
>
> I would expect the library to call the provided write stub at some point.
>
> I have copied the libnosys tree to a new folder under libgloss, and I
> have changed the configure files to build an architecture specific
> libgloss library. I then compile my application with it.
>
> I have only provided a stub for write, as I expect to provide the
> stubs as my code needs them.
>
> I would appreciate any help as I am not sure what to try next.
>
> Regards,
> Alex
>
> On 2/1/06, Alex Gonzalez <langabe@gmail.com> wrote:
> > Hi,
> >
> > If I add DINTEGER_ONLY to CFLAGS_FOR_TARGET, as follows
> >
> > CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -DINTEGER_ONLY
> >
> > I get the following error,
> >
> > /opt/redhat/mips64linux-031001/H-i686-pc-linux-gnulibc2.2/bin/mips64-linux-gnu-gcc
> >  obj/start.o obj/pvmain.o -Llib -EB -N -G0 -nostdlib -static
> > -Wl,-Ttext=0x81000000 -Wl,-Map,pv1000_p1.map -lpvos -lpveth
> > -L../../libc/trunk/build/mips64-elf/lib/  -L../../pub/lib
> > -L../../libc/trunk/mips64-elf/lib -lg -lgcc -lg -lpv1000 -lpvos -o
> > pv1000_p1.elf
> > ../../libc/trunk/mips64-elf/lib/libg.a(fprintf.o): In function `fprintf':
> > /tftpboot/pv-rootfs/usr/src/repository/pktvsn/libc/trunk/build/mips64-elf/newlib/libc/stdio/../../../../../src/newlib/libc/stdio/fprintf.c:45:
> > undefined reference to `vfprintf'
> > ../../libc/trunk/mips64-elf/lib/libg.a(sprintf.o): In function `_sprintf_r':
> > /tftpboot/pv-rootfs/usr/src/repository/pktvsn/libc/trunk/build/mips64-elf/newlib/libc/stdio/../../../../../src/newlib/libc/stdio/sprintf.c:347:
> > undefined reference to `_vfprintf_r'
> > ../../libc/trunk/mips64-elf/lib/libg.a(sprintf.o): In function `sprintf':
> > /tftpboot/pv-rootfs/usr/src/repository/pktvsn/libc/trunk/build/mips64-elf/newlib/libc/stdio/../../../../../src/newlib/libc/stdio/sprintf.c:380:
> > undefined reference to `_vfprintf_r'
> > collect2: ld returned 1 exit status
> > make: *** [pv1000_p1] Error 1
> >
> > The linking works OK without the -DINTEGER_ONLY flag.
> >
> > I am missing something?
> >
> > Using,
> >
> >  mips64-linux-gnu-gcc (GCC) 3.3-mips64linux-031001
> >  Copyright (C) 2002 Free Software Foundation, Inc.
> >  This is free software; see the source for copying conditions.  There is NO
> >  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> >
> >  and newlib 1.14.0 configured with
> >
> >  ../src/configure --host=i686-pc-linux-gnulibc2.2 --target=mips64-elf
> > --prefix=../../
> >
>


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