summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-04-20 15:05:22 +0000
committerjoerg <joerg@pkgsrc.org>2007-04-20 15:05:22 +0000
commitddc67390fad41085c390afbb9117d7e43b388015 (patch)
treec0f3e26e2f5f717eb190642d4a4efc1425f48d3f
parent85375b0345df2db0d385c7c6fc2f1a7a51f591d8 (diff)
downloadpkgsrc-ddc67390fad41085c390afbb9117d7e43b388015.tar.gz
Fix build on DragonFly 1.8+
-rw-r--r--editors/xemacs/Makefile.common6
-rw-r--r--editors/xemacs/files/dragonfly.h13
2 files changed, 17 insertions, 2 deletions
diff --git a/editors/xemacs/Makefile.common b/editors/xemacs/Makefile.common
index ae7077dcce0..408c0a77014 100644
--- a/editors/xemacs/Makefile.common
+++ b/editors/xemacs/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.18 2007/02/15 14:27:48 joerg Exp $
+# $NetBSD: Makefile.common,v 1.19 2007/04/20 15:05:22 joerg Exp $
DISTNAME= xemacs-21.4.17
CATEGORIES= editors
@@ -72,6 +72,10 @@ CONFIGURE_ARGS+= --with_sound=none
. endif
.endif
+.if ${OPSYS} == "DragonFly" && exists(/usr/lib/crtbegin.o)
+CPPFLAGS+= -DDFLY_PRE_17_CRT
+.endif
+
.if defined(MANZ)
PLIST_SUBST+= ELSUFX='.gz'
.else
diff --git a/editors/xemacs/files/dragonfly.h b/editors/xemacs/files/dragonfly.h
index 742fce1e649..7c6a4e4df33 100644
--- a/editors/xemacs/files/dragonfly.h
+++ b/editors/xemacs/files/dragonfly.h
@@ -33,9 +33,20 @@
#include <stddef.h>
#endif
#define LD_SWITCH_SYSTEM
+
+#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 4
+# ifndef DFLY_PRE_17_CRT
+#define START_FILES pre-crt0.o /usr/lib/gcc34/crt1.o /usr/lib/gcc34/crti.o /usr/lib/gcc34/crtbegin.o
+#define LIB_STANDARD -L/usr/lib/gcc34 -lgcc -lc -lgcc /usr/lib/gcc34/crtend.o /usr/lib/gcc34/crtn.o
+# else
#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o
-#define UNEXEC "unexelf.o"
#define LIB_STANDARD -L/usr/lib/gcc34 -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
+# endif
+#else
+#error "Add compiler version magic"
+#endif
+
+#define UNEXEC "unexelf.o"
#define LINKER "$(CC) -nostdlib"
#undef LIB_GCC
#define LIB_GCC