summaryrefslogtreecommitdiff
path: root/lang/gcc45/patches/patch-aa
blob: 39ac5bf1fc6f51107590f5aa7b20a4172cbd5f42 (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
72
73
$NetBSD: patch-aa,v 1.1.1.1 2011/05/14 20:19:47 wiz Exp $

--- gcc/config.gcc.orig	2010-10-09 09:35:53.000000000 +0000
+++ gcc/config.gcc
@@ -499,6 +499,33 @@ case ${target} in
   # need_64bit_hwint=yes # system compiler has this for all arch!
   use_gcc_stdint=wrap
   ;;
+*-*-dragonfly*)
+  gas=yes
+  gnu_ld=yes
+  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+  case ${target} in
+    *-*-dragonfly1 | *-*-dragonfly[1].*)
+      tm_defines="${tm_defines} DFBSD_MAJOR=1" ;;
+    *-*-dragonfly2 | *-*-dragonfly[2].*)
+      tm_defines="${tm_defines} DFBSD_MAJOR=2" ;;
+    *-*-dragonfly3 | *-*-dragonfly[3].*)
+      tm_defines="${tm_defines} DFBSD_MAJOR=3" ;;
+    *-*-dragonfly4 | *-*-dragonfly[4].*)
+      tm_defines="${tm_defines} DFBSD_MAJOR=4" ;;
+    *)
+      echo 'Please update *-*-dragonfly* in gcc/config.gcc'
+      exit 1
+      ;;
+  esac
+  tmake_file="t-slibgcc-elf-ver t-dragonfly"
+  case ${enable_threads} in
+    "" | yes | posix)
+      thread_file='posix'
+      tmake_file="${tmake_file} t-dragonfly-thread"
+      ;;
+  esac
+  dfbsd_tm_file="${dfbsd_tm_file} dragonfly-spec.h dragonfly.h"
+  ;;
 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
   extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
   gas=yes
@@ -572,6 +599,7 @@ case ${target} in
       default_use_cxa_atexit=yes
       ;;
   esac
+  use_gcc_stdint=wrap
   ;;
 *-*-openbsd*)
   tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
@@ -1117,17 +1145,23 @@ x86_64-*-freebsd*)
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
 	tmake_file="${tmake_file} i386/t-crtstuff"
 	;;
+x86_64-*-dragonfly*)
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${dfbsd_tm_file} i386/x86-64.h i386/dragonfly.h i386/dragonfly64.h"
+	;;
+i[34567]86-*-dragonfly*)
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${dfbsd_tm_file} i386/dragonfly.h"
+	;;
 i[34567]86-*-netbsdelf*)
-	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h netbsd-stdint.h"
 	;;
 i[34567]86-*-netbsd*)
-	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
+	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h netbsd-stdint.h"
 	tmake_file="${tmake_file} t-netbsd"
 	extra_parts=""
 	use_collect2=yes
 	;;
 x86_64-*-netbsd*)
-	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h netbsd-stdint.h"
 	tmake_file="${tmake_file} i386/t-crtstuff"
 	;;
 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])