blob: e1754f8e0a52b72c574e724495d9825c0f4646db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
$NetBSD: patch-ad,v 1.5 2012/01/31 11:53:52 ryoon Exp $
*BSD and qnx are identified as linux.
--- build/make/configure.sh.orig 2012-01-27 18:36:39.000000000 +0000
+++ build/make/configure.sh
@@ -573,7 +573,7 @@ process_common_toolchain() {
[ -z "$tgt_isa" ] && tgt_isa=x86
tgt_os=win32
;;
- *linux*|*bsd*)
+ *linux*|*bsd*|*qnx6*)
tgt_os=linux
;;
*solaris2.10)
@@ -1019,10 +1019,29 @@ EOF
case ${toolchain} in
*-win*);;
*-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
+ ;;
+ *)
+ add_extralibs -lm -lrt
+ ;;
+ esac
+ ;;
+ esac
+
# for sysconf(3) and friends.
check_header unistd.h
|