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: '_ctype_' aliased to undefined symbol '_ctype_b+127'


This should have been handled by the configuration check for array aliasing in configure.in which sets a flag in newlib.h. If gcc fails to compile such code (which modern gcc versions do), then the _HAVE_ARRAY_ALIASING flag should be undefined when you compile ctype_.c and therefore you shouldn't get to that code.

FWIW: I have seen a bug in gcc4 with save-temps where the original file and saved-temps differed. In my case, gcc didn't output a function it should have that was protected by a flag check. The save-temps and -E outputs showed that the flag was indeed set as expected and so when compiled it output the function. The scary thing is that I believe the saved-temps output was correct and the original compile was wrong.

-- Jeff J.

Shaun Jackman wrote:
gcc complains about this line:
extern _CONST char _ctype_[1 + 256] __attribute__ ((alias ("_ctype_b+127")));
error: '_ctype_' aliased to undefined symbol '_ctype_b+127'
However, if I use gcc -save-temps, I can compile the resulting
assembler file using as. Any suggestions?

Cheers,
Shaun

$ make
...
gcc -m64 -I/home/sjackman/work/debian/newlib/newlib-1.13.0/_build/i686-pc-linux-gnu/64/newlib/targ-include
-I/home/sjackman/work/debian/newlib/newlib-1.13.0/newlib/libc/include
-DPACKAGE=\"newlib\" -DVERSION=\"1.13.0\" -I.
-I../../../../../../newlib/libc/ctype -O2 -Wall
-D_I386MACH_ALLOW_HW_INTERRUPTS -DHAVE_FCNTL -fPIC
-D_I386MACH_NEED_SOTYPE_FUNCTION -DMISSING_SYSCALL_NAMES -fno-builtin
-O2 -g -O2 -O2 -g -O2 -m64 -c
../../../../../../newlib/libc/ctype/ctype_.c  -fPIC -DPIC -o
.libs/ctype_.o
../../../../../../newlib/libc/ctype/ctype_.c:91: error: '_ctype_'
aliased to undefined symbol '_ctype_b+127'
make[7]: *** [ctype_.lo] Error 1
make[7]: Leaving directory
`/home/sjackman/work/debian/newlib/newlib-1.13.0/_build/i686-pc-linux-gnu/64/newlib/libc/ctype'
...


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