86 lines
2.4 KiB
Text
86 lines
2.4 KiB
Text
$NetBSD: patch-ad,v 1.15 2014/05/15 12:00:04 martin Exp $
|
|
|
|
*BSD and qnx are identified as linux.
|
|
Add another SDK path on Mac OS X.
|
|
All sparc cpus can not do unaligned access.
|
|
|
|
--- build/make/configure.sh.orig 2013-12-17 18:05:18.000000000 +0100
|
|
+++ build/make/configure.sh 2014-05-15 13:11:08.000000000 +0200
|
|
@@ -665,7 +665,7 @@
|
|
[ -z "$tgt_isa" ] && tgt_isa=x86
|
|
tgt_os=win32
|
|
;;
|
|
- *linux*|*bsd*)
|
|
+ *linux*|*bsd*|*qnx6*)
|
|
tgt_os=linux
|
|
;;
|
|
*solaris2.10)
|
|
@@ -704,6 +704,7 @@
|
|
case ${tgt_isa} in
|
|
arm*) enable_feature arm;;
|
|
mips*) enable_feature mips;;
|
|
+ sparc) disable_feature fast_unaligned;;
|
|
esac
|
|
|
|
# PIC is probably what we want when building shared libs
|
|
@@ -799,7 +800,7 @@
|
|
|
|
case ${tgt_cc} in
|
|
gcc)
|
|
- CROSS=${CROSS:-arm-none-linux-gnueabi-}
|
|
+# CROSS=${CROSS:-arm-none-linux-gnueabi-}
|
|
link_with_cc=gcc
|
|
setup_gnu_toolchain
|
|
arch_int=${tgt_isa##armv}
|
|
@@ -988,8 +989,6 @@
|
|
check_add_cflags -mips32r2 -mdspr2
|
|
disable_feature fast_unaligned
|
|
fi
|
|
- check_add_cflags -march=${tgt_isa}
|
|
- check_add_asflags -march=${tgt_isa}
|
|
check_add_asflags -KPIC
|
|
;;
|
|
ppc*)
|
|
@@ -1219,7 +1218,7 @@
|
|
check_cc <<EOF
|
|
unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E';
|
|
EOF
|
|
- [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' |
|
|
+ [ -f "${TMP_O}" ] && od -t x1 "${TMP_O}" | cut -c 8- | tr -d '\n' |
|
|
grep '4f *32 *42 *45' >/dev/null 2>&1 && enable_feature big_endian
|
|
|
|
# Try to find which inline keywords are supported
|
|
@@ -1235,10 +1234,32 @@
|
|
case ${toolchain} in
|
|
*-win*-vs*);;
|
|
*-android-gcc);;
|
|
- *) check_header pthread.h && add_extralibs -lpthread
|
|
+ *) check_header pthread.h && add_extralibs ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
|
|
esac
|
|
fi
|
|
|
|
+ case ${tgt_os} in
|
|
+ darwin*)
|
|
+ add_extralibs -lm
|
|
+ ;;
|
|
+ solaris*)
|
|
+ add_extralibs -lm -lrt
|
|
+ ;;
|
|
+ linux*)
|
|
+ case ${gcctarget} in
|
|
+ *qnx6*)
|
|
+ add_extralibs -lm
|
|
+ ;;
|
|
+ *openbsd*)
|
|
+ add_extralibs -lm
|
|
+ ;;
|
|
+ *)
|
|
+ add_extralibs -lm -lrt
|
|
+ ;;
|
|
+ esac
|
|
+ ;;
|
|
+ esac
|
|
+
|
|
# only for MIPS platforms
|
|
case ${toolchain} in
|
|
mips*)
|