This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
syskill.o unconditionally provides 'kill', but signal.h conditionally declares it
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: newlib at sourceware dot org
- Date: Fri, 21 Aug 2015 10:52:49 +0100
- Subject: syskill.o unconditionally provides 'kill', but signal.h conditionally declares it
- Authentication-results: sourceware.org; auth=none
Hi,
I'm trying to fix the configurey that libgfortran uses to detect what
features newlib supplies [1], and I'm running in to an issue very similar
to that Ulrichi/Corinna fixed for SPU here:
https://sourceware.org/ml/newlib/2014/msg00630.html
I see "kill" autodetected by the libgfortran configure, but when
libgfortran tries to use it after including signal.h it does not find
a declaration of the function and errors. readelf tells me
that this is being provided by syskill.c:
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS syskill.c
2: 0000000000000000 0 SECTION LOCAL DEFAULT 1
3: 0000000000000000 0 SECTION LOCAL DEFAULT 3
4: 0000000000000000 0 SECTION LOCAL DEFAULT 4
5: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 $x
6: 0000000000000000 0 SECTION LOCAL DEFAULT 5
7: 0000000000000000 0 SECTION LOCAL DEFAULT 7
8: 0000000000000000 0 SECTION LOCAL DEFAULT 8
9: 0000000000000000 0 SECTION LOCAL DEFAULT 9
10: 0000000000000000 0 SECTION LOCAL DEFAULT 11
11: 0000000000000000 0 SECTION LOCAL DEFAULT 13
12: 0000000000000010 0 NOTYPE LOCAL DEFAULT 15 $d
13: 0000000000000000 0 SECTION LOCAL DEFAULT 15
14: 0000000000000000 0 SECTION LOCAL DEFAULT 14
15: 0000000000000000 20 FUNC GLOBAL DEFAULT 1 kill
16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _impure_ptr
17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _kill_r
I guess this was never a problem in the past as libgfortran didn't build
with -Werror=implicit-function-declaration until late 2014, by which
point libgfortran's configure was hardcoding rather than detecting
presence of functions.
I'd like to move libgfortran back to auto-detecting what newlib is
providing for it, so it would seem to make sense to me to make that
declaration of 'kill' in libc/include/sys/signal.h unconditional.
On the other hand, I know very little about building newlib, and the
reasons for this currently being conditional. I've looked back at the
history, and it seems like it has been this way for a sufficiently long
time that it looks intentional.
What am I missing? If nothing, would a patch making the declaration of
kill unconditional be acceptable?
Thanks,
James
---
[1]: Along these lines: https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01181.html