public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Josef Wolf <jw@raven.inka.de>
To: "newlib@sourceware.org" <newlib@sourceware.org>
Subject: Re: undefined references since newlib-3.2.0
Date: Fri, 12 Jun 2020 10:21:11 +0200	[thread overview]
Message-ID: <20200612082111.GD15174@raven.inka.de> (raw)
In-Reply-To: <VI1PR10MB1824903892BD47CCAF1CE53F96820@VI1PR10MB1824.EURPRD10.PROD.OUTLOOK.COM>

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
jw@raven.inka.de

  reply	other threads:[~2020-06-12  8:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09  8:00 Wolf, Josef
2020-06-12  8:21 ` Josef Wolf [this message]
2020-06-12 22:50   ` Josef Wolf
2020-06-13  0:05     ` Keith Packard
2020-06-13  8:27       ` Josef Wolf
2020-06-13 17:20         ` Keith Packard
2020-06-14 14:50           ` Josef Wolf
2020-06-14 17:02             ` Keith Packard
2020-06-14 17:40               ` Brian Inglis
2020-06-14 20:13                 ` Keith Packard
2020-06-15  4:53               ` Dimitrios Glynos
2020-06-16  3:43                 ` Keith Packard
2020-06-17 11:36           ` Josef Wolf
2020-06-13 10:31     ` Jeffrey Walton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200612082111.GD15174@raven.inka.de \
    --to=jw@raven.inka.de \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).