Undefined reference to `__jp2uc_l' during tests
Jan Dubiec <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
I usually configure newlib with ../../newlib/configure --prefix=/usr/local --target=h8300-elf --disable-newlib-supplied-syscalls --disable-newlib-mb --disable-newlib-iconv --disable-newlib-wide-orient --enable-newlib-io-c99-formats. Then, when I run tests I get the following message: [...] Executing on host: h8300-elf-gcc /mnt/Works/newlib/newlib/testsuite/newlib.wctype/twctrans.c -I/mnt/Works/newlib/newlib/testsuite/include -lm -o /mnt/Works/xcomp/newlib-build/h8300-elf/newlib/testsuite/twctrans.x (timeout = 300) spawn -ignore SIGHUP h8300-elf-gcc /mnt/Works/newlib/newlib/testsuite/newlib.wctype/twctrans.c -I/mnt/Works/newlib/newlib/testsuite/include -lm -o /mnt/Works/xcomp/newlib-build/h8300-elf/newlib/testsuite/twctrans.x /mnt/Works/xcomp/sysroot/bin/../lib/gcc/h8300-elf/16.0.0/../../../../h8300-elf/bin/ld: /mnt/Works/xcomp/sysroot/bin/../lib/gcc/h8300-elf/16.0.0/../../../../h8300-elf/lib/libc.a(libc_a-towctrans_l.o): in function `towctrans_l': /mnt/Works/xcomp/newlib-build/h8300-elf/newlib/../../../../newlib/newlib/libc/ctype/towctrans_l.c:145:(.text+0x185): undefined reference to `__jp2uc_l' /mnt/Works/xcomp/sysroot/bin/../lib/gcc/h8300-elf/16.0.0/../../../../h8300-elf/bin/ld: /mnt/Works/xcomp/newlib-build/h8300-elf/newlib/../../../../newlib/newlib/libc/ctype/towctrans_l.c:159:(.text+0x2a3): undefined reference to `__uc2jp_l' collect2: error: ld returned 1 exit status compiler exited with status 1 FAIL: newlib.wctype/twctrans.c compilation [...] _uc2jp_l() is compiled only if _MB_CAPABLE is defined, but _MB_CAPABLE is NOT defined because of "--disable-newlib-mb". On the other hand _uc2jp_l() is called unconditionally from towctrans_l(). That's why the linker complains about missing symbol. This is obvious. But I have no idea how to fix the issue in an elegant way. Any help would be appreciated. Regards, Jan