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
|
$NetBSD: patch-aa,v 1.2 2011/02/25 12:21:09 he Exp $
Provide portability to newer versions of DragonFly.
--- os/dragonfly/ccconfig.h.orig 2008-06-03 05:58:22.000000000 +0000
+++ os/dragonfly/ccconfig.h
@@ -31,14 +31,26 @@
* Various settings that controls how the C compiler works.
*/
+#include <sys/param.h>
+
/* common cpp predefines */
#define CPPADD { "-D__DragonFly__", "-D__ELF__", NULL, }
#define DYNLINKER { "-dynamic-linker", "/usr/libexec/ld-elf.so.2", NULL }
+
+#if __DragonFly_version < 200202
#define CRT0FILE "/usr/lib/gcc34/crt1.o"
#define CRT0FILE_PROFILE "/usr/lib/gcc34/gcrt1.o"
#define STARTFILES { "/usr/lib/gcc34/crti.o", "/usr/lib/gcc34/crtbegin.o", NULL }
#define LIBCLIBS { "-lc", "-L/usr/lib/gcc34", "-lgcc", NULL }
#define ENDFILES { "/usr/lib/gcc34/crtend.o", "/usr/lib/gcc34/crtn.o", NULL }
+#else
+#define CRT0FILE "/usr/lib/crt1.o"
+#define CRT0FILE_PROFILE "/usr/lib/gcrt1.o"
+#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/gcc41/crtbegin.o", NULL }
+#define LIBCLIBS { "-lc", "-L/usr/lib/gcc41", "-lgcc", NULL }
+#define ENDFILES { "/usr/lib/gcc41/crtend.o", "/usr/lib/crtn.o", NULL }
+#endif
+
#define STARTLABEL "_start"
#if defined(mach_i386)
|