Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TPF
jack2
Commits
4429cbe4
Commit
4429cbe4
authored
Dec 17, 2016
by
Stéphane Letz
Committed by
GitHub
Dec 17, 2016
Browse files
Merge pull request #241 from tpetazzoni/fix-arch-checks
wscript: improve check for ucontext
parents
f2ece241
e2cba86e
Changes
2
Hide whitespace changes
Inline
Side-by-side
dbus/sigsegv.c
View file @
4429cbe4
...
...
@@ -104,20 +104,20 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
jack_error
(
"info.si_errno = %d"
,
info
->
si_errno
);
jack_error
(
"info.si_code = %d (%s)"
,
info
->
si_code
,
si_code_str
);
jack_error
(
"info.si_addr = %p"
,
info
->
si_addr
);
#if
!
defined(
__alpha__
) &&
!
defined(
__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) && !defined(nios2
)
#if defined(
HAVE_UCONTEXT
) && defined(
HAVE_NGREG
)
for
(
i
=
0
;
i
<
NGREG
;
i
++
)
jack_error
(
"reg[%02d] = 0x"
REGFORMAT
,
i
,
#if defined(
__powerpc64__
)
#if defined(
HAVE_UCONTEXT_GP_REGS
)
ucontext
->
uc_mcontext
.
gp_regs
[
i
]
#elif defined(
__powerpc__
)
#elif defined(
HAVE_UCONTEXT_UC_REGS
)
ucontext
->
uc_mcontext
.
uc_regs
[
i
]
#elif defined(
__sparc__) && defined(__arch64__
)
#elif defined(
HAVE_UCONTEXT_MC_GREGS
)
ucontext
->
uc_mcontext
.
mc_gregs
[
i
]
#el
se
#el
if defined(HAVE_UCONTEXT_GREGS)
ucontext
->
uc_mcontext
.
gregs
[
i
]
#endif
);
#endif
/*
alpha, ia64, kFreeBSD, arm, hppa
*/
#endif
/*
defined(HAVE_UCONTEXT) && defined(HAVE_NGREG)
*/
#if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64)
# if defined(SIGSEGV_STACK_IA64)
...
...
wscript
View file @
4429cbe4
...
...
@@ -496,6 +496,21 @@ def configure(conf):
conf
.
recurse
(
'example-clients'
)
# test for the availability of ucontext, and how it should be used
for
t
in
(
"gp_regs"
,
"uc_regs"
,
"mc_gregs"
,
"gregs"
):
fragment
=
"#include <ucontext.h>
\n
"
fragment
+=
"int main() { ucontext_t *ucontext; return (int) ucontext->uc_mcontext.%s[0]; }"
%
t
confvar
=
"HAVE_UCONTEXT_%s"
%
t
.
upper
()
conf
.
check_cc
(
fragment
=
fragment
,
define_name
=
confvar
,
mandatory
=
False
,
msg
=
"Checking for ucontext->uc_mcontext.%s"
%
t
)
if
conf
.
is_defined
(
confvar
):
conf
.
define
(
'HAVE_UCONTEXT'
,
1
)
fragment
=
"#include <ucontext.h>
\n
"
fragment
+=
"int main() { return NGREG; }"
conf
.
check_cc
(
fragment
=
fragment
,
define_name
=
"HAVE_NGREG"
,
mandatory
=
False
,
msg
=
"Checking for NGREG"
)
conf
.
env
[
'LIB_PTHREAD'
]
=
[
'pthread'
]
conf
.
env
[
'LIB_DL'
]
=
[
'dl'
]
conf
.
env
[
'LIB_RT'
]
=
[
'rt'
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment