head 1.7; access; symbols pkgsrc-2019Q3:1.6.0.30 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.6.0.28 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.26 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.6.0.24 pkgsrc-2018Q4-base:1.6 pkgsrc-2018Q3:1.6.0.22 pkgsrc-2018Q3-base:1.6 pkgsrc-2018Q2:1.6.0.20 pkgsrc-2018Q2-base:1.6 pkgsrc-2018Q1:1.6.0.18 pkgsrc-2018Q1-base:1.6 pkgsrc-2017Q4:1.6.0.16 pkgsrc-2017Q4-base:1.6 pkgsrc-2017Q3:1.6.0.14 pkgsrc-2017Q3-base:1.6 pkgsrc-2017Q2:1.6.0.10 pkgsrc-2017Q2-base:1.6 pkgsrc-2017Q1:1.6.0.8 pkgsrc-2017Q1-base:1.6 pkgsrc-2016Q4:1.6.0.6 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.4 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.2 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.5.0.54 pkgsrc-2016Q1-base:1.5 pkgsrc-2015Q4:1.5.0.52 pkgsrc-2015Q4-base:1.5 pkgsrc-2015Q3:1.5.0.50 pkgsrc-2015Q3-base:1.5 pkgsrc-2015Q2:1.5.0.48 pkgsrc-2015Q2-base:1.5 pkgsrc-2015Q1:1.5.0.46 pkgsrc-2015Q1-base:1.5 pkgsrc-2014Q4:1.5.0.44 pkgsrc-2014Q4-base:1.5 pkgsrc-2014Q3:1.5.0.42 pkgsrc-2014Q3-base:1.5 pkgsrc-2014Q2:1.5.0.40 pkgsrc-2014Q2-base:1.5 pkgsrc-2014Q1:1.5.0.38 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.36 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.5.0.34 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.5.0.32 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.5.0.30 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.28 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.5.0.26 pkgsrc-2012Q3-base:1.5 pkgsrc-2012Q2:1.5.0.24 pkgsrc-2012Q2-base:1.5 pkgsrc-2012Q1:1.5.0.22 pkgsrc-2012Q1-base:1.5 pkgsrc-2011Q4:1.5.0.20 pkgsrc-2011Q4-base:1.5 pkgsrc-2011Q3:1.5.0.18 pkgsrc-2011Q3-base:1.5 pkgsrc-2011Q2:1.5.0.16 pkgsrc-2011Q2-base:1.5 pkgsrc-2011Q1:1.5.0.14 pkgsrc-2011Q1-base:1.5 pkgsrc-2010Q4:1.5.0.12 pkgsrc-2010Q4-base:1.5 pkgsrc-2010Q3:1.5.0.10 pkgsrc-2010Q3-base:1.5 pkgsrc-2010Q2:1.5.0.8 pkgsrc-2010Q2-base:1.5 pkgsrc-2010Q1:1.5.0.6 pkgsrc-2010Q1-base:1.5 pkgsrc-2009Q4:1.5.0.4 pkgsrc-2009Q4-base:1.5 pkgsrc-2009Q3:1.5.0.2 pkgsrc-2009Q3-base:1.5 pkgsrc-2009Q2:1.4.0.32 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.30 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.28 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.26 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.24 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.22 pkgsrc-2008Q2-base:1.4 cwrapper:1.4.0.20 pkgsrc-2008Q1:1.4.0.18 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.16 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.14 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.12 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.10 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.8 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.6 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.4 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.2 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.3.0.18 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.16 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.14 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.12 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.10 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.7 date 2019.10.12.20.52.54; author he; state dead; branches; next 1.6; commitid twQwGcqOMJ3EwCGB; 1.6 date 2016.04.14.22.04.47; author dholland; state Exp; branches; next 1.5; commitid KZW293z6L8LpWD2z; 1.5 date 2009.09.22.14.48.47; author asau; state Exp; branches; next 1.4; 1.4 date 2006.03.28.21.35.27; author gavan; state Exp; branches; next 1.3; 1.3 date 2003.07.01.23.19.14; author jtb; state Exp; branches; next 1.2; 1.2 date 2003.07.01.23.10.34; author jtb; state Exp; branches; next 1.1; 1.1 date 2003.03.21.22.20.56; author wiz; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2003.03.21.22.20.56; author wiz; state Exp; branches; next ; desc @@ 1.7 log @Various updates to smlnj so it builds on NetBSD/powerpc again: * Modernize the powerpc entry in signal-sysdep.h to use the various _UC_MACHINE_ macros. * mk.ppc-netbsd: don't pass an empty RANLIB variable, causing build failure. Also make checksums of all the three arch-specific distfiles ("boxes"), for sparc, x86 and ppc. Bump PKGREVISION. @ text @$NetBSD: patch-af,v 1.6 2016/04/14 22:04:47 dholland Exp $ Support for NetBSD, and for NetBSD on PPC. --- src/runtime/mach-dep/signal-sysdep.h.orig 2006-02-27 17:47:32.000000000 +0000 +++ src/runtime/mach-dep/signal-sysdep.h 2006-03-09 19:15:48.000000000 +0000 @@@@ -171,7 +171,7 @@@@ /* disable all FP exceptions */ # define SIG_InitFPE() SetFSR(0) -# if defined(OPSYS_SUNOS) +# if defined(OPSYS_SUNOS) || defined(OPSYS_NETBSD) /** SPARC, SUNOS **/ # define USE_ZERO_LIMIT_PTR_FN # define SIG_FAULT1 SIGFPE @@@@ -340,6 +340,19 @@@@ # define SIG_ResetFPE(scp) { (scp)->regs->gpr[PT_FPSCR] = 0x0; } typedef void SigReturn_t; +# elif (defined(TARGET_PPC) && defined(OPSYS_NETBSD)) + /* PPC, NetBSD */ + +# define SIG_FAULT1 SIGTRAP + +# define INT_DIVZERO(s, c) ((s) == SIGTRAP) +# define INT_OVFLW(s, c) ((s) == SIGTRAP) +# define SIG_GetPC(scp) ((scp)->sc_frame.srr0) +# define SIG_SetPC(scp, addr) { (scp)->sc_frame.srr0 = (long)(addr); } +# define SIG_ZeroLimitPtr(scp) { ((scp)->sc_frame.fixreg[15] = 0); } /* limitptr = 15 (see src/runtime/mach-dep/PPC.prim.asm) */ +# define SIG_GetCode(info,scp) (info) + typedef void SigReturn_t; + # endif /* HOST_RS6000/HOST_PPC */ #elif defined(HOST_HPPA) @ 1.6 log @Add patch comments (where feasible) @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.5 2009/09/22 14:48:47 asau Exp $ @ 1.5 log @Update to SML/NJ 110.71. Numerous changes since version 110.42 include AMD64 support and loads of bug fixes, detailed list of changes is at http://www.smlnj.org/dist/working/110.71/NOTES/HISTORY @ text @d1 3 a3 1 $NetBSD$ @ 1.4 log @Apply patch from PR pkg/32722. Fixes building on i386. @ text @d3 3 a5 3 --- src/runtime/mach-dep/signal-sysdep.h.orig 2002-10-10 19:20:04.000000000 +0100 +++ src/runtime/mach-dep/signal-sysdep.h @@@@ -147,7 +147,7 @@@@ extern void SetFSR(int); d14 3 a16 3 @@@@ -318,6 +318,19 @@@@ extern void SetFSR(); # define SIG_Flags 0 a30 1 d33 1 a33 43 @@@@ -463,35 +476,15 @@@@ extern Addr_t *ML_X86Frame; /* used to # elif defined(OPSYS_NETBSD) /** x86, NetBSD **/ -/* NetBSD (including versions 1.0 and 1.1) generates SIGBUS rather - than SIGFPE for overflows. The real fix is a trivial change to - kernel sources, which has already been reported (NetBSD internal - problem identification "port-i386/1833"). - - If you want to fix this on your NetBSD system. Edit machdep.c in - directory /sys/arch/i386/i386, and find the line - - setgate(&idt[ 4], &IDTVEC(ofl), 0, SDT_SYS386TGT, SEL_KPL); - - Change SEL_KPL to SEL_UPL. With SEL_KPL, the int overflow trap is - not accessible at user level, and a protection fault occurs instead - (thus the seg fault). SEL_UPL will allow user processes to generate - this trap. - - For the change to take effect, recompile your kernel, install it - and reboot. */ -# define SIG_FAULT1 SIGFPE -# define SIG_FAULT2 SIGBUS -# define INT_DIVZERO(s, c) 0 -# define INT_OVFLW(s, c) (((s) == SIGFPE) || ((s) == SIGBUS)) - -# define SIG_GetCode(info, scp) (info) -# define SIG_GetPC(scp) ((scp)->sc_pc) -# define SIG_SetPC(scp, addr) { (scp)->sc_pc = (long)(addr); } +# define SIG_FAULT1 SIGFPE +# define INT_DIVZERO(s, c) ((s) == SIGFPE) +# define INT_OVFLW(s, c) ((s) == SIGFPE) + +# define SIG_GetCode(info, scp) (0) +# define SIG_GetPC(scp) ((scp)->uc_mcontext.__gregs[_REG_EIP]) +# define SIG_SetPC(scp, addr) {(scp)->uc_mcontext.__gregs[_REG_EIP] = (long)(addr); } # define SIG_ZeroLimitPtr(scp) { ML_X86Frame[LIMITPTR_X86OFFSET] = 0; } - typedef void SigReturn_t; - # elif defined(OPSYS_SOLARIS) /** x86, Solaris */ @ 1.3 log @Wrong version of patch-af. @ text @d3 1 a3 1 --- src/runtime/mach-dep/signal-sysdep.h.orig d5 1 a5 1 @@@@ -147,7 +147,7 @@@@ d14 1 a14 1 @@@@ -318,6 +318,19 @@@@ d34 43 @ 1.2 log @Make this work on powerpc. @ text @d14 1 a14 1 @@@@ -318,6 +318,23 @@@@ a19 2 +# include + typedef struct sigcontext_t SigContext_t; a29 2 + +# define SIG_Flags 0 @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.1 2002/09/29 15:03:33 wiz Exp $ d3 1 a3 1 --- src/runtime/mach-dep/signal-sysdep.h.orig Fri Apr 20 09:26:45 2001 d5 1 a5 1 @@@@ -151,7 +151,7 @@@@ extern void SetFSR(int); d14 24 @ 1.1.1.1 log @Reimport sml-nj as smlnj, which is the name commonly used by the community. Suggested by Christopher Richards in connection with PR 18678. @ text @@