[Bug target/50678] [4.7/4.8 Regression] FAIL: c52104y on x86_64-apple-darwin10

simon at pushface dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 5 15:34:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50678

--- Comment #71 from simon at pushface dot org 2013-02-05 15:33:52 UTC ---
Created attachment 29360
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29360
Patch to suppress register swap on Darwin >= 12

(In reply to comment #69)

> OK, thanks, so the bug has apparently been fixed in Darwin 12.  The last thing
> to do is to devise a _run time_ test to be added to
> __gnat_adjust_context_for_raise that will disable the code if the Darwin
> version is 12 or above.  Essentially anything that works is acceptable.  Any
> Darwin expert out there?

This patch works here in Darwin 12.2.1:

                === acats Summary ===
# of expected passes            2320
# of unexpected failures        0

                === gnat Summary ===

# of expected passes            1158
# of expected failures          17
# of unsupported tests          5
/Users/simon/tmp/gcc-build-195682-patched/gcc/gnatmake version 4.8.0 20130202
(experimental) [trunk revision 195682]

It uses sysctl(3) and strtol(3), which might seem heavy but as Eric has pointed
out it'll only be called when we're already in the middle of handling a signal.

Especially considering that, I may have gone OTT in caching the determined
version and/or separating the version determination into a new function.

I haven't checked the returned values of the sysctl(3) calls or the length of
the buffer required; what's policy? and what could be done if there was an
error?

As an aside, what's the recommended technique for rebuilding and reinstalling
just the RTS? ('cd gcc; make gnatlib' leaves the build in a state where 'make
install' doesn't work).



More information about the Gcc-bugs mailing list