The Objective C testsuite results have regressed from 1 failure to 180 failures after the libobjc patch was applied.
Confirmed.
Caused by: https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00073.html Let's only define the new value for Solaris instead of for everyone.
I'll prepare and test a patch along that line over the weekend. David, just out of interest: could you check what happens if you remove the definition of _XOPEN_SOURCE in thr.c completely? In my experience, defining feature test macros more often than not causes more trouble than it solves anything. Thanks, and sorry for the breakage. Rainer
Created attachment 33916 [details] proposed patch
If _XOPEN_SOURCE is removed from thr.c completely, the testsuite results revert to 1 failure.
> --- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> --- > If _XOPEN_SOURCE is removed from thr.c completely, the testsuite results revert > to 1 failure. Did this failure already exist before my patch? If so, such a change is certainly better than arch-specific _XOPEN_SOURCE values. Andrew, what do you thing? Thanks. Rainer
Yes, the single objc failure existed before the patch. But I don't know if *other* targets need _XOPEN_SOURCE=500.
> --- Comment #7 from David Edelsohn <dje at gcc dot gnu.org> --- > Yes, the single objc failure existed before the patch. But I don't know if > *other* targets need _XOPEN_SOURCE=500. True, but now (end of stage1) is the time to find out. In most compilation environments, defining no feature test macros gives you the superset of everything available. Ultimately, it's Andrew's call. Rainer
I would have expected _XOPEN_SOURCE=500 to be defined in a host-specific configure file (like libstdc++-v3/config/os/.../os_defines.h) or added to the compile line in configure.
Let's go with the one defining _XOPEN_SOURCE only for Solaris until someone programs David's suggestion of the host-specific configure file.
> --- Comment #9 from David Edelsohn <dje at gcc dot gnu.org> --- > I would have expected _XOPEN_SOURCE=500 to be defined in a host-specific > configure file (like libstdc++-v3/config/os/.../os_defines.h) or added to the > compile line in configure. Given how little target-specific configuration libobjc needs, this seems overkill to me. Rainer
> --- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > Let's go with the one defining _XOPEN_SOURCE only for Solaris until someone > programs David's suggestion of the host-specific configure file. Huh? As I've just checked, both Solaris and Linux/x86_64 do fine without any definition of _XOPEN_SOURCE at all, as does AIX. Only if _XOPEN_SOURCE is defined at all does Solaris need a value >= 600 with C99 and beyond. The attached patch does just that. Rainer
Created attachment 33933 [details] alternative patch
(In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #11) > > --- Comment #9 from David Edelsohn <dje at gcc dot gnu.org> --- > > I would have expected _XOPEN_SOURCE=500 to be defined in a host-specific > > configure file (like libstdc++-v3/config/os/.../os_defines.h) or added to the > > compile line in configure. > > Given how little target-specific configuration libobjc needs, this seems > overkill to me. That is because it picks up most of it from GCC's target headers right now. I had plans to changing that but I never got around fixing that around 9 years ago :).
I've never received comments on my alternative patch. Either that one, which I prefer since it's cleaner) or the previous one (ugly and target-specific), needs to be applied to have AIX bootstrap, I believe. What should we do? Rainer
The alternative patch works on AIX. I thought that it was going to be installed.
What other comments are needed to install the alternative patch? It works for Solaris and AIX, where the problems started.
(In reply to David Edelsohn from comment #16) > The alternative patch works on AIX. I thought that it was going to be > installed. I don't remember it being ever posted to gcc-patches, patch review doesn't happen in bugzilla.
Done now. I hadn't posted the patches so far, since Andrew as libobjc maintainer had commented on the first proposol in the PR already. Rainer
Author: ro Date: Thu Feb 5 09:41:44 2015 New Revision: 220438 URL: https://gcc.gnu.org/viewcvs?rev=220438&root=gcc&view=rev Log: Fix failures on AIX (PR libobjc/63765) PR libobjc/63765 * thr.c (_XOPEN_SOURCE): Remove. Modified: trunk/libobjc/ChangeLog trunk/libobjc/thr.c
Fixed for 5.0.