../../../libiberty/strsignal.c:554:1: error: conflicting types for ‘psignal’ /usr/include/signal.h:150:13: note: previous declaration of ‘psignal’ was here strsignal.c: #ifndef HAVE_PSIGNAL void psignal (int signo, char *message) /usr/include/signal.h (GLIBC) extern void psignal (int __sig, __const char *__s); adding the __const modifier to the prototype of psignal in strsignal.c fixes compilation.
HAVE_PSIGNAL is supposed to be defined if the header file has psignal. Why does that not happen? Look at config.log.
(In reply to comment #1) > HAVE_PSIGNAL is supposed to be defined if the header file has psignal. Why > does that not happen? Look at config.log. i was building with musl libc, but not in a chroot. the first stage uses a wrapper script as CC, which sets the right include paths. i was using --disable-bootstrap to disable bootstrapping, but make still invoked the compiled xgcc (thus, it looks as it had been entering the bootstrap phase, but without the correct include paths).
On Fri, Apr 29, 2011 at 04:54:34PM +0000, wkor97gy0eef1fr at i dot mintemail.com wrote: > i was using --disable-bootstrap to disable bootstrapping, but make still > invoked the compiled xgcc (thus, it looks as it had been entering the bootstrap > phase, but without the correct include paths). xgcc is invoked for target libraries; libiberty is built as a target library.
(In reply to comment #3) > xgcc is invoked for target libraries; libiberty is built as a target > library. may i ask why this is being built ? it seems as if it is not needed. is there a way to disable it ?
So the end result of the discussion on the mailing list was that libiberty should not be built as a target library.
It Would Be Nice if the eventual solution could be backported to open gcc branches. (My autotester, when trying to pick up newlib updates, fails for all branches so it seems anyone trying to build a toolchain with a recent newlib and *any* gcc will be hit.)
Author: hp Date: Wed Jun 22 21:30:19 2011 New Revision: 175316 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175316 Log: PR regression/47836 PR bootstrap/23656 PR other/47733 PR bootstrap/49247 PR c/48825 * configure.ac (target_libraries): Remove target-libiberty. Remove case-statement setting skipdirs=target-libiberty for multiple targets. Remove checking target_configdirs and removing target-libiberty but keeping target-libgcc if otherwise empty. * Makefile.def (target_modules): Don't add libiberty. (dependencies): Remove all traces of target-libiberty. * configure, Makefile.in: Regenerate. (add missing PR annotation in the ChangeLog entry) Modified: trunk/ChangeLog
Author: hp Date: Mon Jun 27 20:54:59 2011 New Revision: 175560 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175560 Log: PR regression/47836 PR bootstrap/23656 PR other/47733 PR bootstrap/49247 PR c/48825 * configure.ac (target_libraries): Remove target-libiberty. Remove all target-specific settings adding target-libiberty to skipdirs and noconfigdirs. Remove checking target_configdirs and removing target-libiberty but keeping target-libgcc if otherwise empty. * Makefile.def (target_modules): Don't add libiberty. (dependencies): Remove all traces of target-libiberty. * configure, Makefile.in: Regenerate. Modified: branches/gcc-4_6-branch/ChangeLog branches/gcc-4_6-branch/Makefile.def branches/gcc-4_6-branch/Makefile.in branches/gcc-4_6-branch/configure branches/gcc-4_6-branch/configure.ac
Author: hp Date: Mon Jun 27 21:02:53 2011 New Revision: 175564 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175564 Log: PR regression/47836 PR bootstrap/23656 PR other/47733 PR bootstrap/49247 PR c/48825 * configure.ac (target_libraries): Remove target-libiberty. Remove all target-specific settings adding target-libiberty to skipdirs and noconfigdirs. Remove checking target_configdirs and removing target-libiberty but keeping target-libgcc if otherwise empty. * Makefile.def (target_modules): Don't add libiberty. (dependencies): Remove all traces of target-libiberty. * configure, Makefile.in: Regenerate. Modified: branches/gcc-4_5-branch/ChangeLog branches/gcc-4_5-branch/Makefile.def branches/gcc-4_5-branch/Makefile.in branches/gcc-4_5-branch/configure branches/gcc-4_5-branch/configure.ac
duplicate of 47733, 41916 additionally to the removal of libiberty as target library, i'd recommend fixing the prototype.
the actual problem leading to this is that the check for psignal doesn't include the proper feature-test macros to cite the manpage SYNOPSIS #include <signal.h> void psignal(int sig, const char *s); void psiginfo(const siginfo_t *pinfo, const char *s); extern const char *const sys_siglist[]; Feature Test Macro Requirements for glibc (see feature_test_macros(7)): psignal(): _SVID_SOURCE || _BSD_SOURCE psiginfo(): _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L sys_siglist: _BSD_SOURCE
Dup of bug 47733 *** This bug has been marked as a duplicate of bug 47733 ***