[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #29996] fix to build base on openbsd i386
From: |
Sebastian Reitenbach |
Subject: |
[bug #29996] fix to build base on openbsd i386 |
Date: |
Sun, 30 May 2010 15:48:12 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.0.11) Gecko/2009070118 Firefox/3.0.11 |
URL:
<http://savannah.gnu.org/bugs/?29996>
Summary: fix to build base on openbsd i386
Project: GNUstep
Submitted by: buzzdee
Submitted on: Sun 30 May 2010 03:48:11 PM GMT
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Change Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
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
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sun 30 May 2010 03:48:11 PM GMT Name: patch-Source_NSObject_m Size:
846B By: buzzdee
<http://savannah.gnu.org/bugs/download.php?file_id=20653>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?29996>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #29996] fix to build base on openbsd i386,
Sebastian Reitenbach <=