summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill@pkgsrc.org>2002-01-24 14:58:07 +0000
committerdmcmahill <dmcmahill@pkgsrc.org>2002-01-24 14:58:07 +0000
commita18a640ca8fe54725a6abcdc888508ec7a8d058c (patch)
tree2a4392aedbfcf99091b3167f9285c4a1433db61d /mk
parent0b457d53e843bca33688d7e38bf16a57a1f7d712 (diff)
downloadpkgsrc-a18a640ca8fe54725a6abcdc888508ec7a8d058c.tar.gz
For NetBSD/alpha versions >= 1.5V add -mieee to both CFLAGS and FFLAGS.
This will pass -mieee to those package which obey CFLAGS and FFLAGS. paraphrasing an email from Ross: The executive summary is: if i386 uses it (and it does) then alpha should also, or some programs will SIGFPE out on alpha when they don't on i386. If anyone asks, the details are as follows: The actual effect of -mieee is to put a software completion code bit into every floating point instruction, and to put trap barrier instructions in the code as necessary to ensure that traps are delivered before branches or other instructions make it impossible to trace backwards to the trapping op. The code bits have little effect on the hardware, mainly what happens is that when the hardware and palcode deliver a trap, they tell the trap handler whether the faulting op had a completion code. If it did, the kernel is suppose to trace backwards, find the op, and interpret it in SW, doing all the wacky ieee stuff that most chips don't do, stuff like denormal arithmetic and the generation of magic values (infinity, NaN) and the sticky flags. We do all that now except for a couple of truly obscure things that SoftFloat didn't support and which I haven't yet added. (And these are things that happen ONLY when you are taking overflow and underflow traps, which no one has every really done AFAICT. If you have the default behavior of gradual underflow and nontrapping infinity generation, we do everything.) This brings up the question of -mieee libraries, but that's not a pkgsrc problem. (Except to the extent that I recommend that libraries from pkgsrc, like everything else, also be compiled with -mieee. And in the case of libraries, it might be worth individually modifying the Makefile for the "not easy" case.)
Diffstat (limited to 'mk')
-rw-r--r--mk/defs.NetBSD.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/defs.NetBSD.mk b/mk/defs.NetBSD.mk
index 397d4b1b927..9953095d7fe 100644
--- a/mk/defs.NetBSD.mk
+++ b/mk/defs.NetBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.NetBSD.mk,v 1.20 2002/01/19 21:29:41 agc Exp $
+# $NetBSD: defs.NetBSD.mk,v 1.21 2002/01/24 14:58:07 dmcmahill Exp $
#
# Variable definitions for the NetBSD operating system.
@@ -107,3 +107,11 @@ SERIAL_DEVICES?= /dev/ttya \
DEFAULT_SERIAL_DEVICE?= /dev/null
SERIAL_DEVICES?= /dev/null
.endif
+
+# Add -mieee to CFLAGS and FFLAGS for NetBSD->=1.5V-alpha
+.for __tmp__ in 1.5[V-Z] 1.5[A-Z][A-Z]* 1.[6-9]* [2-9].*
+. if ${MACHINE_PLATFORM:MNetBSD-${__tmp__}-alpha} != ""
+CFLAGS+= -mieee
+FFLAGS+= -mieee
+. endif # MACHINE_PLATFORM
+.endfor # __tmp__