public
Created

patch for bringing pcc 1.0.0-BETA up to date on DragonFly BSD

  • Download Gist
pcc-1.0.0-dragonfly.patch
Diff
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
diff --git a/configure b/configure
index 9395d88..406f602 100755
--- a/configure
+++ b/configure
@@ -1944,6 +1944,7 @@ case "$target_os" in
tls=yes
case "$target_cpu" in
i?86) targmach=i386 ;;
+ x86_64) targmach=amd64 ;;
esac
;;
diff --git a/configure.ac b/configure.ac
index 6394ab9..6ea40c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,7 @@ case "$target_os" in
tls=yes
case "$target_cpu" in
i?86) targmach=i386 ;;
+ x86_64) targmach=amd64 ;;
esac
;;
diff --git a/os/dragonfly/ccconfig.h b/os/dragonfly/ccconfig.h
index 865166a..4cc0aaa 100644
--- a/os/dragonfly/ccconfig.h
+++ b/os/dragonfly/ccconfig.h
@@ -34,15 +34,19 @@
/* common cpp predefines */
#define CPPADD { "-D__DragonFly__", "-D__ELF__", NULL, }
#define DYNLINKER { "-dynamic-linker", "/usr/libexec/ld-elf.so.2", NULL }
-#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 }
+#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 }
#define STARTLABEL "_start"
#if defined(mach_i386)
#define CPPMDADD { "-D__i386__", NULL, }
+#elif defined(mach_amd64)
+#define CPPMDADD \
+ { "-D__x86_64__", "-D__x86_64", "-D__amd64__", "-D__amd64", \
+ "-D__LP64__=1", "-D_LP64=1", NULL, }
#else
#error defines for arch missing
#endif

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.