This is the mail archive of the newlib@sources.redhat.com 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]

undefined reference to `_ctype_' using newlib-1.10.0 under CygWin


Hi

I am using newlib-1.10.0 with the following patches applied:

http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/libgloss/m68k/configure.dif
f?cvsroot=src&r1=1.2&r2=1.3

http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/libgloss/m68k/configure.in.
diff?cvsroot=src&r1=1.1&r2=1.2
I am also using binutils-2.13.2.1 and gcc-3.2.3.
My environment is:
    host=i686-pc-cygwin
    target=m68k-coff
    prefix=/work/m68k
    CC=gcc-2
    PATH=$PATH:/$prefix/bin
I am using CygWin 1.3.22-1 under W2K SP3.

I have successfully built binutils, gcc core, newlib, and full gcc in that
order.

The whole tool chain appears to work fine, except that I get the following
error when linking:
m68k-coff-ld -L/work/m68k/m68k-coff/lib/m5200/ -L/work/m68k/lib/gcc-lib/m68k
-coff/3.3/m5200/ --print-map -Map py2.map --cref --script=py2.ld -o py2.out
<<all my .o files>> -lc -lnosys -lgcc
/work/m68k/m68k-coff/lib/m5200//libc.a(vfscanf.o): In function
`__svfscanf_r':
/work/build-newlib/m68k-coff/m5200/newlib/libc/stdio/../../../../../../src/n
ewlib-1.10.0/newlib/libc/stdio/vfscanf.c:493: undefined reference to
`_ctype_'
/work/build-newlib/m68k-coff/m5200/newlib/libc/stdio/../../../../../../src/n
ewlib-1.10.0/newlib/libc/stdio/vfscanf.c:635: undefined reference to
`_ctype_'
/work/build-newlib/m68k-coff/m5200/newlib/libc/stdio/../../../../../../src/n
ewlib-1.10.0/newlib/libc/stdio/vfscanf.c:648: undefined reference to
`_ctype_'
/work/build-newlib/m68k-coff/m5200/newlib/libc/stdio/../../../../../../src/n
ewlib-1.10.0/newlib/libc/stdio/vfscanf.c:473: undefined reference to
`_ctype_'
/work/build-newlib/m68k-coff/m5200/newlib/libc/stdio/../../../../../../src/n
ewlib-1.10.0/newlib/libc/stdio/vfscanf.c:400: undefined reference to
`_ctype_'

Using 'nm' on libc.a, I get this:
ctype_.o:
00000184 b .bss
00000180 d .data
00000184 N .stab
00000340 N .stabstr
00000000 t .text
00000180 D __ctype_ptr
00000000 t _ctype_b

Can anyone suggest what I might do to resolve this problem?

Many thanks
ColinT
p.s. I have spent several weeks getting this far, so if anyone else is
struggling to do what I have done, I am happy to provide instructions.



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