[pkg-boost-commits] r14532 - in boost/trunk/debian: . patches
Steven Michael Robbins
smr at alioth.debian.org
Sun Nov 15 04:44:56 UTC 2009
Author: smr
Date: 2009-11-15 04:44:55 +0000 (Sun, 15 Nov 2009)
New Revision: 14532
Added:
boost/trunk/debian/patches/hurd-ellint_rd.patch
boost/trunk/debian/patches/hurd-execution_monitor.patch
Modified:
boost/trunk/debian/changelog
boost/trunk/debian/patches/series
Log:
Apply patches of Pino Toscano to build on Hurd.
Modified: boost/trunk/debian/changelog
===================================================================
--- boost/trunk/debian/changelog 2009-11-15 04:29:15 UTC (rev 14531)
+++ boost/trunk/debian/changelog 2009-11-15 04:44:55 UTC (rev 14532)
@@ -17,8 +17,12 @@
* rules: Build libboost-mpi-python1.40.0 and
libboost-mpi-python1.40-dev. Thanks again to Gaudenz Steinlin.
Closes: #552014.
+
+ * patches/hurd-ellint_rd.patch:
+ * patches/hurd-execution_monitor.patch: New (thanks, Pino Toscano).
+ Patches for building on hurd. Closes: #552383.
- -- Steve M. Robbins <smr at debian.org> Sat, 14 Nov 2009 13:57:09 -0600
+ -- Steve M. Robbins <smr at debian.org> Sat, 14 Nov 2009 22:44:30 -0600
boost1.40 (1.40.0-2) unstable; urgency=low
Added: boost/trunk/debian/patches/hurd-ellint_rd.patch
===================================================================
--- boost/trunk/debian/patches/hurd-ellint_rd.patch (rev 0)
+++ boost/trunk/debian/patches/hurd-ellint_rd.patch 2009-11-15 04:44:55 UTC (rev 14532)
@@ -0,0 +1,32 @@
+Description: Avoid build problem on hurd
+ Hurd's bits/errno.h defines constant ED, so rename
+ a local variable to avoid the clash.
+Author: Pino Toscano <pino at kde.org>
+Bug: 552383
+Forwarded: not yet
+
+
+--- boost1.40-1.40.0.orig/boost/math/special_functions/ellint_rd.hpp
++++ boost1.40-1.40.0/boost/math/special_functions/ellint_rd.hpp
+@@ -29,7 +29,7 @@
+ T ellint_rd_imp(T x, T y, T z, const Policy& pol)
+ {
+ T value, u, lambda, sigma, factor, tolerance;
+- T X, Y, Z, EA, EB, EC, ED, EE, S1, S2;
++ T X, Y, Z, EA, EB, EC, ED_, EE, S1, S2;
+ unsigned long k;
+
+ BOOST_MATH_STD_USING
+@@ -93,9 +93,9 @@
+ EA = X * Y;
+ EB = Z * Z;
+ EC = EA - EB;
+- ED = EA - 6 * EB;
+- EE = ED + EC + EC;
+- S1 = ED * (ED * T(9) / 88 - Z * EE * T(9) / 52 - T(3) / 14);
++ ED_ = EA - 6 * EB;
++ EE = ED_ + EC + EC;
++ S1 = ED_ * (ED_ * T(9) / 88 - Z * EE * T(9) / 52 - T(3) / 14);
+ S2 = Z * (EE / 6 + Z * (-EC * T(9) / 22 + Z * EA * T(3) / 26));
+ value = 3 * sigma + factor * (1 + S1 + S2) / (u * sqrt(u));
+
Added: boost/trunk/debian/patches/hurd-execution_monitor.patch
===================================================================
--- boost/trunk/debian/patches/hurd-execution_monitor.patch (rev 0)
+++ boost/trunk/debian/patches/hurd-execution_monitor.patch 2009-11-15 04:44:55 UTC (rev 14532)
@@ -0,0 +1,204 @@
+Description: Avoid build problem on hurd
+ Hurd does not define sigaction::sa_handler so
+ implement logic using basic sa_handler.
+Author: Pino Toscano <pino at kde.org>
+Bug: 552383
+Forwarded: not yet
+
+--- boost1.40-1.40.0.orig/boost/test/impl/execution_monitor.ipp
++++ boost1.40-1.40.0/boost/test/impl/execution_monitor.ipp
+@@ -264,22 +264,37 @@
+ public:
+ // Constructor
+ system_signal_exception()
++#ifdef SA_SIGINFO
+ : m_sig_info( 0 )
+ , m_context( 0 )
++#else
++ : m_sig( 0 )
++#endif
+ {}
+
+ // Access methods
++#ifdef SA_SIGINFO
+ void operator()( siginfo_t* i, void* c )
+ {
+ m_sig_info = i;
+ m_context = c;
+ }
++#else
++ void operator()( int s )
++ {
++ m_sig = s;
++ }
++#endif
+ void report() const;
+
+ private:
+ // Data members
++#ifdef SA_SIGINFO
+ siginfo_t* m_sig_info; // system signal detailed info
+ void* m_context; // signal context
++#else
++ int m_sig; // sistem signal
++#endif
+ };
+
+ //____________________________________________________________________________//
+@@ -287,6 +302,7 @@
+ void
+ system_signal_exception::report() const
+ {
++#ifdef SA_SIGINFO
+ if( !m_sig_info )
+ return; // no error actually occur?
+
+@@ -571,6 +587,59 @@
+ default:
+ report_error( execution_exception::system_error, "unrecognized signal" );
+ }
++#else
++ if( !m_sig )
++ return; // no error actually occur?
++
++ switch( m_sig ) {
++ case SIGILL:
++ report_error( execution_exception::system_fatal_error,
++ "signal: SIGILL (illegal instruction)" );
++ break;
++
++ case SIGFPE:
++ report_error( execution_exception::system_error,
++ "signal: SIGFPE (errnoneous arithmetic operations)" );
++ break;
++
++ case SIGSEGV:
++ report_error( execution_exception::system_fatal_error,
++ "signal: SIGSEGV (memory access violation)" );
++ break;
++
++ case SIGBUS:
++ report_error( execution_exception::system_fatal_error,
++ "signal: SIGSEGV (memory access violation)" );
++ break;
++
++ case SIGCHLD:
++ report_error( execution_exception::system_fatal_error,
++ "signal: SIGCHLD (child process has terminated)" );
++ break;
++
++#if defined(BOOST_TEST_CATCH_SIGPOLL)
++
++ case SIGPOLL:
++ report_error( execution_exception::system_error,
++ "signal: SIGPOLL (asynchronous I/O event occured)" );
++ break;
++
++#endif
++
++ case SIGABRT:
++ report_error( execution_exception::system_error,
++ "signal: SIGABRT (application abort requested)" );
++ break;
++
++ case SIGALRM:
++ report_error( execution_exception::timeout_error,
++ "signal: SIGALRM (timeout while executing function)" );
++ break;
++
++ default:
++ report_error( execution_exception::system_error, "unrecognized signal" );
++ }
++#endif
+ }
+
+ //____________________________________________________________________________//
+@@ -581,8 +650,13 @@
+
+ // Forward declaration
+ extern "C" {
++#ifdef SA_SIGINFO
+ static void execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context );
+ static void execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context );
++#else
++static void execution_monitor_jumping_signal_handler( int sig );
++static void execution_monitor_attaching_signal_handler( int sig );
++#endif
+ }
+
+ class signal_action {
+@@ -625,9 +699,14 @@
+ return;
+ }
+
++#ifdef SA_SIGINFO
+ m_new_action.sa_flags |= SA_SIGINFO;
+ m_new_action.sa_sigaction = attach_dbg ? &execution_monitor_attaching_signal_handler
+ : &execution_monitor_jumping_signal_handler;
++#else
++ m_new_action.sa_handler = attach_dbg ? &execution_monitor_attaching_signal_handler
++ : &execution_monitor_jumping_signal_handler;
++#endif
+ BOOST_TEST_SYS_ASSERT( sigemptyset( &m_new_action.sa_mask ) != -1 );
+
+ #ifdef BOOST_TEST_USE_ALT_STACK
+@@ -769,6 +848,7 @@
+
+ extern "C" {
+
++#ifdef SA_SIGINFO
+ static bool ignore_sigchild( siginfo_t* info )
+ {
+ return info->si_signo == SIGCHLD
+@@ -781,9 +861,16 @@
+ && (int)info->si_status == 0;
+ #endif
+ }
++#else
++static bool ignore_sigchild( int sig )
++{
++ return sig == SIGCHLD;
++}
++#endif
+
+ //____________________________________________________________________________//
+
++#ifdef SA_SIGINFO
+ static void execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context )
+ {
+ if( ignore_sigchild( info ) )
+@@ -810,6 +897,34 @@
+
+ //____________________________________________________________________________//
+
++#else
++static void execution_monitor_jumping_signal_handler( int sig )
++{
++ if( ignore_sigchild( sig ) )
++ return;
++
++ signal_handler::sys_sig()( sig );
++
++ siglongjmp( signal_handler::jump_buffer(), sig );
++}
++
++//____________________________________________________________________________//
++
++static void execution_monitor_attaching_signal_handler( int sig )
++{
++ if( ignore_sigchild( sig ) )
++ return;
++
++ if( !debug::attach_debugger( false ) )
++ execution_monitor_jumping_signal_handler( sig );
++
++ // debugger attached; it will handle the signal
++ BOOST_TEST_SYS_ASSERT( ::signal( sig, SIG_DFL ) != SIG_ERR );
++}
++#endif
++
++//____________________________________________________________________________//
++
+ }
+
+ } // namespace detail
Modified: boost/trunk/debian/patches/series
===================================================================
--- boost/trunk/debian/patches/series 2009-11-15 04:29:15 UTC (rev 14531)
+++ boost/trunk/debian/patches/series 2009-11-15 04:44:55 UTC (rev 14532)
@@ -8,3 +8,5 @@
jam-wall-clean.patch
sh4.patch
boost-build-pythonid.patch
+hurd-ellint_rd.patch
+hurd-execution_monitor.patch
More information about the pkg-boost-commits
mailing list