components/ilmbase/patches/002-builtin-trap.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Fri, 07 Apr 2017 17:56:36 -0700
changeset 7851 f82a18f72950
parent 7696 3d9ec1a1fe4e
permissions -rw-r--r--
Close of build 122.

Solaris studio doesn't seem to define __builtin_trap() function, so raise SIGTRAP as a workaround.
Will not send upstream.

--- Iex/IexBaseExc.cpp	2016-11-08 15:34:26.104711329 +0000
+++ Iex/IexBaseExc.cpp	2016-11-10 13:30:11.505215478 +0000
@@ -146,11 +146,12 @@
         ::DebugBreak();
 }
 #else
+#include <signal.h>
 void
 iex_debugTrap()
 {
     // how to in Linux?
     if (0 != ::getenv("IEXDEBUGTHROW"))
-        __builtin_trap();
+        raise(SIGTRAP);
 }
 #endif