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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
--- configure.orig 2013-08-23 06:22:36.000000000 +0000
+++ configure
@@ -545,9 +545,10 @@ if test $withsharedlibs = "yes"; then
mksharedlib="$flexlink"
mkmaindll="$flexlink -maindll"
shared_libraries_supported=true;;
- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
+ *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*| \
+ *-*-dragonfly*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
sharedcccompopts="-fPIC"
- mksharedlib="$bytecc -shared"
+ mksharedlib="$bytecc $bytecclinkopts -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
byteccrpath="-Wl,-rpath,"
mksharedlibrpath="-Wl,-rpath,"
@@ -557,7 +558,7 @@ if test $withsharedlibs = "yes"; then
case "$bytecc" in
gcc*)
sharedcccompopts="-fPIC"
- mksharedlib="$bytecc -shared"
+ mksharedlib="$bytecc $bytecclinkopts -shared"
byteccrpath="-Wl,-rpath,"
mksharedlibrpath="-Wl,-rpath,"
shared_libraries_supported=true;;
@@ -573,11 +574,11 @@ if test $withsharedlibs = "yes"; then
gcc*)
sharedcccompopts="-fPIC"
if sh ./solaris-ld; then
- mksharedlib="$bytecc -shared"
+ mksharedlib="$bytecc $bytecclinkopts -shared"
byteccrpath="-R"
mksharedlibrpath="-R"
else
- mksharedlib="$bytecc -shared"
+ mksharedlib="$bytecc $bytecclinkopts -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
natdynlinkopts="-Wl,-E"
byteccrpath="-Wl,-rpath,"
@@ -601,12 +602,12 @@ if test $withsharedlibs = "yes"; then
mksharedlibrpath="-rpath "
shared_libraries_supported=true;;
i[3456]86-*-darwin[89].*)
- mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
+ mksharedlib="$bytecc $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
bytecccompopts="$dl_defs $bytecccompopts"
dl_needs_underscore=false
shared_libraries_supported=true;;
*-apple-darwin*)
- mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
+ mksharedlib="$bytecc $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
bytecccompopts="$dl_defs $bytecccompopts"
dl_needs_underscore=false
shared_libraries_supported=true;;
@@ -616,7 +617,7 @@ if test $withsharedlibs = "yes"; then
shared_libraries_supported=false;;
*-*-openbsd*)
sharedcccompopts="-fPIC"
- mksharedlib="$bytecc -shared"
+ mksharedlib="$bytecc $bytecclinkopts -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
natdynlinkopts="-Wl,-E"
byteccrpath="-Wl,-rpath,"
@@ -651,6 +652,8 @@ if test $withsharedlibs = "yes"; then
x86_64-*-kfreebsd*) natdynlink=true;;
i[345]86-*-freebsd*) natdynlink=true;;
x86_64-*-freebsd*) natdynlink=true;;
+ i[345]86-*-dragonfly*) natdynlink=true;;
+ x86_64-*-dragonfly*) natdynlink=true;;
i[345]86-*-openbsd*) natdynlink=true;;
x86_64-*-openbsd*) natdynlink=true;;
i[345]86-*-netbsd*) natdynlink=true;;
@@ -680,6 +683,7 @@ case "$host" in
sparc*-*-gnu*) arch=sparc; system=gnu;;
i[3456]86-*-linux*) arch=i386; system=linux_`sh ./runtest elf.c`;;
i[3456]86-*-*bsd*) arch=i386; system=bsd_`sh ./runtest elf.c`;;
+ i[3456]86-*-dragonfly*) arch=i386; system=bsd_elf;;
i[3456]86-*-nextstep*) arch=i386; system=nextstep;;
i[3456]86-*-solaris*) if $arch64; then
arch=amd64; system=solaris
@@ -695,6 +699,7 @@ case "$host" in
fi;;
i[3456]86-*-gnu*) arch=i386; system=gnu;;
powerpc*-*-linux*) arch=power; model=ppc; system=elf;;
+ powerpc*-*-freebsd*) arch=power; model=ppc; system=elf;;
powerpc-*-netbsd*) arch=power; model=ppc; system=elf;;
powerpc-*-openbsd*) arch=power; model=ppc; system=bsd_elf;;
powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
@@ -714,6 +719,7 @@ case "$host" in
x86_64-*-netbsd*) arch=amd64; system=netbsd;;
x86_64-*-openbsd*) arch=amd64; system=openbsd;;
x86_64-*-darwin*) arch=amd64; system=macosx;;
+ x86_64-*-dragonfly*) arch=amd64; system=dragonfly;;
esac
# Some platforms exist both in 32-bit and 64-bit variants, not distinguished
@@ -734,7 +740,7 @@ else
fi
nativecccompopts=''
-nativecclinkopts=''
+nativecclinkopts=""
# FIXME the naming of nativecclinkopts is broken: these are options for
# ld (for shared libs), not for cc
nativeccrpath="$byteccrpath"
@@ -803,6 +809,8 @@ case "$arch,$model,$system" in
amd64,*,linux) profiling='prof';;
amd64,*,gnu) profiling='prof';;
arm,*,linux*) profiling='prof';;
+ *,*,freebsd) profiling='prof';;
+ *,*,dragonfly) profiling='prof';;
*) profiling='noprof';;
esac
@@ -1204,7 +1212,7 @@ if test "$pthread_wanted" = "yes"; then
case "$host" in
*-*-solaris*) pthread_link="-lpthread -lposix4"
pthread_caml_link="-cclib -lpthread -cclib -lposix4";;
- *-*-freebsd*) pthread_link="-pthread"
+ *-*-freebsd*|*-*-dragonfly*) pthread_link="-pthread"
pthread_caml_link="-cclib -pthread";;
*-*-openbsd*) pthread_link="-pthread"
pthread_caml_link="-cclib -pthread";;
@@ -1218,7 +1226,7 @@ if test "$pthread_wanted" = "yes"; then
bytecccompopts="$bytecccompopts -D_REENTRANT"
nativecccompopts="$nativecccompopts -D_REENTRANT"
case "$host" in
- *-*-freebsd*)
+ *-*-freebsd*|*-*-dragonfly*)
bytecccompopts="$bytecccompopts -D_THREAD_SAFE"
nativecccompopts="$nativecccompopts -D_THREAD_SAFE";;
*-*-openbsd*)
@@ -1388,7 +1396,6 @@ if test "$x11_include" = "not found"; th
x11_libs="-L$dir"
case "$host" in
*-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
- *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
*) x11_link="-L$dir -lX11";;
esac
fi
@@ -1514,7 +1521,7 @@ if test $has_tk = true; then
Tcl_DoOneEvent
then
case "$host" in
- *-*-*bsd*) tk_libs="-R/usr/pkg/lib -L/usr/pkg/lib $tk_libs $tk_x11_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin -lpthread $tkauxlibs";;
+ *-*-*bsd*|*-*-dragonfly*) tk_libs="-R/usr/pkg/lib -L/usr/pkg/lib $tk_libs $tk_x11_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin -lpthread $tkauxlibs";;
*) tk_libs="-L/usr/pkg/lib $tk_libs $tk_x11_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin -lpthread $tkauxlibs";;
esac
else
@@ -1528,14 +1535,14 @@ if test $has_tk = true; then
echo "Tcl/Tk libraries found."
elif sh ./hasgot -L/sw/lib $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid; then
case "$host" in
- *-*-*bsd*) tk_libs="-R/sw/lib -L/sw/lib $tk_libs";;
+ *-*-*bsd*|*-*-dragonfly*) tk_libs="-R/sw/lib -L/sw/lib $tk_libs";;
*) tk_libs="-L/sw/lib $tk_libs";;
esac
echo "Tcl/Tk libraries found."
elif sh ./hasgot -L/usr/pkg/lib $tk_libs $tk_x11_libs $tkauxlibs \
Tk_SetGrid; then
case "$host" in
- *-*-*bsd*) tk_libs="-R/usr/pkg/lib -L/usr/pkg/lib $tk_libs";;
+ *-*-*bsd*|*-*-dragonfly*) tk_libs="-R/usr/pkg/lib -L/usr/pkg/lib $tk_libs";;
*) tk_libs="-L/usr/pkg/lib $tk_libs";;
esac
echo "Tcl/Tk libraries found."
@@ -1564,10 +1571,10 @@ fi
# Look for BFD library
if ./hasgot -i bfd.h && \
- ./hasgot -lbfd -ldl -liberty -lz bfd_openr; then
+ ./hasgot -lbfd $dllib -liberty -lz bfd_openr; then
echo "BFD library found."
echo "#define HAS_LIBBFD" >> s.h
- echo "LIBBFD_LINK=-lbfd -ldl -liberty -lz" >> Makefile
+ echo "LIBBFD_LINK=-lbfd $dllib -liberty -lz" >> Makefile
else
echo "BFD library not found, 'objinfo' will be unable to display info on .cmxs files"
echo "LIBBFD_LINK=" >> Makefile
|