>/usr/bin/ld: src/librandom/random_string.lo: in function `random_string':
>./src/librandom/random_string.c:26: warning: getrandom is not
>implemented and will always fail
And this, ladies and gentlemen, is why 'choose clr' is more reliable
than 'choose cl'.
Unfortunately, the former isn't cross-friendly, while the latter is.
And *some* people insisted on making the build more cross-friendly, so
here we are.
>ld returns zero, even it knows "xxx is not implemented and will always fail".
That, on the other hand, is completely insane. Why the heck isn't it
an error? It's *precisely* the kind of thing I want ld to error out on!
>I think the LDFLAGS should be appended with "-Wl,--fatal-warnings", so
>that ld returns non-zero in such case.
Yeah, so we have to bully ld for it to do its job. Nice.
Are there cases where we could get a false negative, though? Are there
legitimate ld warnings that _should not_ error out? I don't want to make
a change to accommodate an exotic system if it risks breaking others.
>I only observe such case on GNU Hurd/K*BSD actually. I'm thinking if
>only these non-linux systems have such confused behaviour(why it links
>successfully at all...)
That would be interesting to explore, yes. What version of ld do they
they use? Is that GNU binutils or something else? And it may be more
beneficial align ld's behaviour to other systems: skalibs can't be the
only piece of software that relies on ld to test sysdeps. Starting with
autoconf. Hm, does autoconf use -Wl,--fatal-warnings ?
--
Laurent
Received on Wed Oct 23 2019 - 09:50:24 UTC