blob: 6a2a49ca957363f6ebc34171d688d0103eeb799e (
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
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
|
$NetBSD: patch-aa,v 1.6 2013/03/15 22:45:00 wiz Exp $
Add DragonFly
--- configure.ac.orig 2013-03-05 08:24:59.000000000 +0000
+++ configure.ac
@@ -476,6 +476,14 @@ case "${canonical}" in
powerpc-ibm-aix[56]* )
opsys=aix4-2
;;
+ ## DragonFly ports
+ *-*-dragonfly*)
+ opsys=dragonfly
+ case "${canonical}" in
+ i[3456]86-*-dragonfly*) machine=intel386 ;;
+ amd64-*-dragonfly*|x86_64-*-dragonfly*) machine=amdx86-64 ;;
+ esac
+ ;;
## Silicon Graphics machines
## Iris 4D
@@ -992,7 +1000,7 @@ case "$opsys" in
## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
- freebsd) LIBS_SYSTEM="-lutil" ;;
+ freebsd|netbsd|openbsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
@@ -1038,6 +1046,11 @@ case $opsys in
LIB_MATH=
START_FILES='pre-crt0.o'
;;
+ dragonfly )
+ # This base version is appended below
+ LIB_STANDARD='-lc $(CRT_DIR)/crtn.o'
+ START_FILES='$(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
+ ;;
freebsd )
LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
@@ -1143,6 +1156,28 @@ fi # crt_fi
AC_SUBST(CRT_DIR)
case $opsys in
+ dragonfly )
+ if test "x${GCC}" = xyes ; then
+ libgcc_file=`$CC --print-libgcc-file-name 2>/dev/null`
+ case "$libgcc_file" in
+ */*)
+ crt_gcc_subdir=`AS_DIRNAME(["$libgcc_file"])`
+ ;;
+ *)
+ AC_MSG_ERROR([Cannot determine CRT $CC subdirectory.])
+ ;;
+ esac
+ for f in crtbegin.o crtend.o; do
+ if test ! -f $crt_gcc_subdir/$f; then
+ AC_MSG_ERROR([Required file not found: $f])
+ fi
+ done
+ LIB_STANDARD="$crt_gcc_subdir/crtend.o $LIB_STANDARD"
+ START_FILES="$START_FILES $crt_gcc_subdir/crtbegin.o"
+ else
+ AC_MSG_WARN([Correct CRT file list unknown for ${CC}.])
+ fi
+ ;;
netbsd | openbsd )
if test -f $CRT_DIR/crti.o; then
|