bugGNUstep - Bugs: bug #29996, fix to build base on openbsd i386

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29996: fix to build base on openbsd i386

Submitted by:  Sebastian Reitenbach <buzzdee>
Submitted on:  Sun 30 May 2010 03:48:11 PM UTC  
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Sun 30 May 2010 06:04:35 PM UTC, comment #3:

I added the fix to the stable branch

Richard Frith-Macdonald <CaS>
Project Member
Sun 30 May 2010 05:21:27 PM UTC, comment #2:

Thanks a lot, that fix is doing it fine.

Sebastian Reitenbach <buzzdee>
Project Member
Sun 30 May 2010 04:07:47 PM UTC, comment #1:

Does the change I just made in SVN trunk do the job?

Richard Frith-Macdonald <CaS>
Project Member
Sun 30 May 2010 03:48:11 PM UTC, original submission:

In the OpenBSD ports tree there exists a patch against Source/NSObject.m to fix a problem on i386:

--- Source/NSObject.m.orig Fri Dec 19 10:06:14 2008
+++ Source/NSObject.m Tue Dec 23 14:00:22 2008
@@ -1127,7 +1127,7 @@ GSDescriptionForClassMethod(pcl self, SEL aSel)
#endif
#endif

-#if defined(_FreeBSD_) && defined(_i386_)
+#if defined(_FreeBSD_) || defined(_OpenBSD_) && defined(_i386_)
// Manipulate the FPU to add the exception mask. (Fixes SIGFPE
// problems on *BSD)
// Note this only works on x86

The following code from 1.18:
+ {
+ volatile short cw;
+
+ _asm_ volatile ("fstcw (%0)" : : "g" (&cw));
+ cw |= 1; /* Mask 'invalid' exception */
+ _asm_ volatile ("fldcw (%0)" : : "g" (&cw));
+ }
was replaced in 1.20 with:
fedisableexcept(FE_INVALID);

That worked well with gnustep-base-1.18.0. But now in gnustep-base-1.20.0, the compilation fails because FE_INVALID is not defined on OpenBSD. Therefore I reverted it back to use the old code, see the appended patch.

Otherwise the new code could stay as it is, and a unique
#if defined defined(_OpenBSD_) && defined(_i386_)
for OpenBSD could be introduced, to not mix up the FreeBSD with OpenBSD stuff, don't know what is better.

I've just seen in the svn changes, that Richard is preparing a stable bugfix release. Would be great if a solution to this one could also go in there.

Sebastian

Sebastian Reitenbach <buzzdee>
Project Member

 

Attached Files
file #20653:  patch-Source_NSObject_m added by buzzdee (846B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by buzzdee (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-30 CaS StatusNone => Fixed
        Open/ClosedOpen => Closed
    2010-05-30 buzzdee Attached File- => Added patch-Source_NSObject_m, #20653

    Back to the top


    Powered by Savane 3.4