pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/editors/xemacs Fix build on DragonFly 1.8+



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bb5701fdfbb9
branches:  trunk
changeset: 528083:bb5701fdfbb9
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Apr 20 15:05:22 2007 +0000

description:
Fix build on DragonFly 1.8+

diffstat:

 editors/xemacs/Makefile.common   |   6 +++++-
 editors/xemacs/files/dragonfly.h |  13 ++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r 2f79a4a7f04b -r bb5701fdfbb9 editors/xemacs/Makefile.common
--- a/editors/xemacs/Makefile.common    Fri Apr 20 14:44:11 2007 +0000
+++ b/editors/xemacs/Makefile.common    Fri Apr 20 15:05:22 2007 +0000
@@ -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 @@
 .  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 -r 2f79a4a7f04b -r bb5701fdfbb9 editors/xemacs/files/dragonfly.h
--- a/editors/xemacs/files/dragonfly.h  Fri Apr 20 14:44:11 2007 +0000
+++ b/editors/xemacs/files/dragonfly.h  Fri Apr 20 15:05:22 2007 +0000
@@ -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 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 LIB_STANDARD -L/usr/lib/gcc34 -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
 #define LINKER "$(CC) -nostdlib"
 #undef LIB_GCC
 #define LIB_GCC



Home | Main Index | Thread Index | Old Index