Extend FPU POINTER test in configure.ac to check for fpregs 70/5070/2
authorJuan Galvez <jjgalvez@illinois.edu>
Wed, 10 Apr 2019 14:55:22 +0000 (09:55 -0500)
committerEvan Ramos <evan@hpccharm.com>
Wed, 10 Apr 2019 16:15:46 +0000 (11:15 -0500)
On some systems, like Raspberry Pi 32 bit, the fpregs field
does not exist, and compiling conv-core/threads.c with
CMK_CONTEXT_FPU_POINTER=1 will fail.

Change-Id: I61ef166e989ec25622fb31328e185d00c3b515bb

src/scripts/configure.ac

index 14a598bb30061ca86599ac58df4ed4eab8cb925a..36a171c80399816d7a3d276a34786ca747192a90 100644 (file)
@@ -1162,6 +1162,10 @@ cat > $t <<EOT
 #include <ucontext.h>
 struct _libc_fpstate   fpstate;
 fpregset_t *fp;
+int main() {
+  ucontext_t context;
+  context.uc_mcontext.fpregs = 0;
+}
 EOT
 test_cxx "whether ucontext has FPU pointer" "yes" "no" ""
 AC_DEFINE_UNQUOTED(CMK_CONTEXT_FPU_POINTER, $pass, [whether ucontext has pointer])