#
#
+.warning MACHINE_ARCH is first ${MACHINE_ARCH}
+
+.if ${MACHINE_ARCH} == "unknown"
+MACHINE_ARCH:= ${MACHINE}
+.endif
+
+.warning MACHINE_ARCH is now ${MACHINE_ARCH}
+
#
# There are two options in making libm at fdlibm compile time:
# _IEEE_LIBM --- IEEE libm; smaller, and somewhat faster
size_t oldlen = sizeof(__HAS_SSE);
int rv;
+#ifndef __minix
rv = sysctlbyname("machdep.sse", &__HAS_SSE, &oldlen, NULL, 0);
if (rv == -1)
+#endif
__HAS_SSE = 0;
}
GCC?=gcc
CFLAGS= -O0 -D_MINIX -D_POSIX_SOURCE
-CFLAGS-GCC= $(CFLAGS) -Wall
-CFLAGS-GCCFPU= $(CFLAGS) -Wall -mhard-float
+CFLAGS-GCC= $(CFLAGS) -Wall -D_NETBSD_SOURCE
+CFLAGS-GCCFPU= $(CFLAGS) -Wall -mhard-float
CFLAGS-GCCFPU= $(CFLAGS-GCC) -W -mhard-float
OBJ= test1 test2 test3 test4 test5 test6 test7 test8 test9 \
if which $(GCC) >/dev/null 2>&1; then $(GCC) $(CFLAGS-GCC) -o $@ ${@:S/-gcc//}.c; fi
$(GCCFPUOBJ):
- if which $(GCC) >/dev/null 2>&1; then $(GCC) $(CFLAGS-GCCFPU) -o $@ ${@:S/-gcc//}.c; fi
+ if which $(GCC) >/dev/null 2>&1; then $(GCC) $(CFLAGS-GCCFPU) -o $@ ${@:S/-gcc//}.c -lm; fi
$(ROOTOBJ):
$(CC) $(CFLAGS) $@.c
* Part of this test is somewhat based on the GNU GCC ucontext test set.
*
*/
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <fenv.h>
+#include <sys/signal.h>
+
_PROTOTYPE( void do_calcs, (void) );
_PROTOTYPE( void do_child, (void) );
_PROTOTYPE( void do_parent, (void) );