Re: undefined references since newlib-3.2.0
Josef Wolf <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Hello again, finally, I have identified the commit, which makes my project to fail: My project links just fine against newlib-df5c79f30c3f871b7e0edd6d4629af78b30fca15 but it fails with the error message shown below when linking against newlib-f88aece242178ff0c187d56e34a79645fbc44a23 To be honest, I completely fail to understand how this commit https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=f88aece242178ff0c187d56e34a79645fbc44a23 can possibly cause those link failures. After all, f88aece242178ff0c187d56e34a79645fbc44a23 shows no traces of abort/exit/kill/getpid. Any suggestions? On Tue, Jun 09, 2020 at 08:00:25AM +0000, Wolf, Josef via Newlib wrote: > > Since newlib-3.2.0, I get this error when linking one of my projects: > > > $ m68k-unknown-elf-gcc -nostartfiles -Wl,--cref,--section-start=vectors=0 \ > -Wl,-Ttext=0x400,--entry=entry -Wl,--oformat,elf32-m68k \ > -Wl,--cref,-Map,proj.map \ > -Wl,-T,ldscript.be -ansi -pedantic -Wall -Wcast-align \ > -Wstrict-prototypes -Wmissing-prototypes -std=c89 -Wnull-dereference -g \ > -O2 -fno-toplevel-reorder -mcpu32 -o proj.elf `cat proj.objs` -lc > /m/a/local/crossgcc/m68k-unknown-elf/lib64/gcc/m68k-unknown-elf/9.3.0/../../../../m68k-unknown-elf/bin/ld: /m/a/local/crossgcc/m68k-unknown-elf/lib64/gcc/m68k-unknown-elf/9.3.0/../../../../m68k-unknown-elf/lib/mcpu32/libc.a(lib_a-abort.o): > in function `abort': > /m/a/tmp/builds/crossgcc/src/newlib-3.2.0/newlib/libc/stdlib/abort.c:59: undefined reference to `_exit' > /m/a/local/crossgcc/m68k-unknown-elf/lib64/gcc/m68k-unknown-elf/9.3.0/../../../../m68k-unknown-elf/bin/ld: /m/a/local/crossgcc/m68k-unknown-elf/lib64/gcc/m68k-unknown-elf/9.3.0/../../../../m68k-unknown-elf/lib/mcpu32/libc.a(lib_a-signalr.o): > in function `_kill_r': > /m/a/tmp/builds/crossgcc/src/newlib-3.2.0/newlib/libc/reent/signalr.c:53: undefined reference to `kill' > /m/a/local/crossgcc/m68k-unknown-elf/lib64/gcc/m68k-unknown-elf/9.3.0/../../../../m68k-unknown-elf/bin/ld: /m/a/local/crossgcc/m68k-unknown-elf/lib64/gcc/m68k-unknown-elf/9.3.0/../../../../m68k-unknown-elf/lib/mcpu32/libc.a(lib_a-signalr.o): > in function `_getpid_r': > /m/a/tmp/builds/crossgcc/src/newlib-3.2.0/newlib/libc/reent/signalr.c:83: undefined reference to `getpid' > > The project builds just fine with newlib versions up to 3.1.0 > > newlib was configured like this: > > /m/a/tmp/builds/crossgcc/src/newlib-3.2.0/configure --target=m68k-unknown-elf --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --prefix=/m/a/local/crossgcc/m68k-unknown-elf/nanoLibraries --enable-lite-exit --enable-newlib-nano-malloc --enable-newlib-nano-formatted-io --enable-newlib-reent-small --enable-newlib-retargetable-locking --enable-newlib-global-atexit --enable-newlib-global-stdio-streams --disable-newlib-supplied-syscalls --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --disable-newlib-unbuf-stream-opt --disable-nls > > Any suggestions? -- Josef Wolf [email protected]