summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cross/COMMON/PLIST-binutils26
-rw-r--r--cross/COMMON/PLIST-egcs (renamed from cross/COMMON/PLIST-egcs-ss)16
-rw-r--r--cross/COMMON/buwrapper.c50
-rw-r--r--cross/COMMON/cross.mk216
-rw-r--r--cross/COMMON/exclude11
-rw-r--r--cross/COMMON/patches-binutils/patch-aa21
-rw-r--r--cross/COMMON/patches-binutils/patch-arrays22
-rw-r--r--cross/COMMON/patches-egcs-ss/patch-ab10
-rw-r--r--cross/COMMON/patches-egcs/patch-aa (renamed from cross/COMMON/patches-egcs-ss/patch-aa)2
-rw-r--r--cross/Makefile3
-rw-r--r--cross/binutils/Makefile62
-rw-r--r--cross/binutils/files/exclude3
-rw-r--r--cross/binutils/files/md53
-rw-r--r--cross/binutils/patches/patch-aa45
-rw-r--r--cross/binutils/patches/patch-ab37
-rw-r--r--cross/binutils/patches/patch-ac151
-rw-r--r--cross/binutils/patches/patch-ad21
-rw-r--r--cross/binutils/patches/patch-ae21
-rw-r--r--cross/binutils/patches/patch-af13
-rw-r--r--cross/binutils/patches/patch-ag21
-rw-r--r--cross/binutils/patches/patch-ah21
-rw-r--r--cross/binutils/patches/patch-ai (renamed from cross/i386-msdosdjgpp/patches/patch-aa)4
-rw-r--r--cross/binutils/patches/patch-aj14
-rw-r--r--cross/binutils/patches/patch-archive155
-rw-r--r--cross/binutils/patches/patch-arrays81
-rw-r--r--cross/binutils/pkg/COMMENT1
-rw-r--r--cross/binutils/pkg/DESCR3
-rw-r--r--cross/binutils/pkg/PLIST115
-rw-r--r--cross/i386-linux/Makefile16
-rw-r--r--cross/i386-linux/patches/patch-aa6
-rw-r--r--cross/i386-linux/pkg/PLIST16
-rw-r--r--cross/i386-linuxglibc1/Makefile14
-rw-r--r--cross/i386-linuxglibc1/files/md55
-rw-r--r--cross/i386-linuxglibc1/pkg/PLIST40
-rw-r--r--cross/i386-msdosdjgpp/Makefile40
-rw-r--r--cross/i386-msdosdjgpp/files/md57
-rw-r--r--cross/i386-msdosdjgpp/patches/patch-ab19
-rw-r--r--cross/i386-msdosdjgpp/pkg/PLIST10
38 files changed, 1141 insertions, 180 deletions
diff --git a/cross/COMMON/PLIST-binutils b/cross/COMMON/PLIST-binutils
index ad65a1000b3..48e750e7a33 100644
--- a/cross/COMMON/PLIST-binutils
+++ b/cross/COMMON/PLIST-binutils
@@ -1,20 +1,7 @@
-@comment $NetBSD: PLIST-binutils,v 1.1 1998/08/12 02:42:28 tv Exp $
-${TARGET_ARCH}/bin/addr2line
-${TARGET_ARCH}/bin/ar
-${TARGET_ARCH}/bin/as
-${TARGET_ARCH}/bin/gasp
-${TARGET_ARCH}/bin/ld
-${TARGET_ARCH}/bin/nm
-${TARGET_ARCH}/bin/objcopy
-${TARGET_ARCH}/bin/objdump
-${TARGET_ARCH}/bin/ranlib
-${TARGET_ARCH}/bin/size
-${TARGET_ARCH}/bin/strings
-${TARGET_ARCH}/bin/strip
+@comment $NetBSD: PLIST-binutils,v 1.2 1999/01/04 22:37:30 tv Exp $
bin/${TARGET_ARCH}-addr2line
bin/${TARGET_ARCH}-ar
bin/${TARGET_ARCH}-as
-bin/${TARGET_ARCH}-gasp
bin/${TARGET_ARCH}-ld
bin/${TARGET_ARCH}-nm
bin/${TARGET_ARCH}-objcopy
@@ -23,3 +10,14 @@ bin/${TARGET_ARCH}-ranlib
bin/${TARGET_ARCH}-size
bin/${TARGET_ARCH}-strings
bin/${TARGET_ARCH}-strip
+${TARGET_ARCH}/bin/addr2line
+${TARGET_ARCH}/bin/ar
+${TARGET_ARCH}/bin/as
+${TARGET_ARCH}/bin/ld
+${TARGET_ARCH}/bin/nm
+${TARGET_ARCH}/bin/objcopy
+${TARGET_ARCH}/bin/objdump
+${TARGET_ARCH}/bin/ranlib
+${TARGET_ARCH}/bin/size
+${TARGET_ARCH}/bin/strings
+${TARGET_ARCH}/bin/strip
diff --git a/cross/COMMON/PLIST-egcs-ss b/cross/COMMON/PLIST-egcs
index 079cdf41c68..65e49831f63 100644
--- a/cross/COMMON/PLIST-egcs-ss
+++ b/cross/COMMON/PLIST-egcs
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST-egcs-ss,v 1.1 1998/08/12 02:42:28 tv Exp $
+@comment $NetBSD: PLIST-egcs,v 1.1 1999/01/04 22:37:30 tv Exp $
${TARGET_ARCH}/bin/c++
${TARGET_ARCH}/bin/c++filt
${TARGET_ARCH}/bin/cc
${TARGET_ARCH}/bin/f77
+${TARGET_ARCH}/bin/fort77
${TARGET_ARCH}/bin/g++
${TARGET_ARCH}/bin/g77
${TARGET_ARCH}/bin/gcc
@@ -11,6 +12,7 @@ bin/${TARGET_ARCH}-c++
bin/${TARGET_ARCH}-c++filt
bin/${TARGET_ARCH}-cc
bin/${TARGET_ARCH}-f77
+bin/${TARGET_ARCH}-fort77
bin/${TARGET_ARCH}-g++
bin/${TARGET_ARCH}-g77
bin/${TARGET_ARCH}-gcc
@@ -179,9 +181,9 @@ lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/varargs.h
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/libg2c.a
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/libgcc.a
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/specs
-@dirrm lib/gcc-lib/i386-linuxglibc1/egcs-2.91.53/include/objc
-@dirrm lib/gcc-lib/i386-linuxglibc1/egcs-2.91.53/include/g++/std
-@dirrm lib/gcc-lib/i386-linuxglibc1/egcs-2.91.53/include/g++
-@dirrm lib/gcc-lib/i386-linuxglibc1/egcs-2.91.53/include
-@dirrm lib/gcc-lib/i386-linuxglibc1/egcs-2.91.53
-@dirrm lib/gcc-lib/i386-linuxglibc1
+@dirrm lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc
+@dirrm lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/g++/std
+@dirrm lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/g++
+@dirrm lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include
+@dirrm lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}
+@dirrm lib/gcc-lib/${TARGET_ARCH}
diff --git a/cross/COMMON/buwrapper.c b/cross/COMMON/buwrapper.c
new file mode 100644
index 00000000000..0617513a720
--- /dev/null
+++ b/cross/COMMON/buwrapper.c
@@ -0,0 +1,50 @@
+/* $NetBSD: buwrapper.c,v 1.1 1999/01/04 22:37:30 tv Exp $ */
+
+#include <err.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+/*
+ * Wrapper for binutils programs.
+ *
+ * This frontend sets the appropriate environment variables that tell
+ * binutils programs which target will be used.
+ */
+
+static const char binsubdir[] = "libexec/binutils";
+
+#define PATHLEN sizeof(PREFIX) + sizeof(binsubdir) + 20
+
+int main(int argc, char **argv) {
+ char path[PATHLEN], *p, *prog;
+
+ /* quickly find last part of path component */
+ if (p = strrchr(argv[0], '/'))
+ p++;
+ else
+ p = argv[0];
+ if (prog = strrchr(p, '-'))
+ prog++;
+ else
+ prog = p;
+
+ /* make program pathname */
+ snprintf(path, PATHLEN, "%s/%s/%s", PREFIX, binsubdir, prog);
+
+ /* set up environment */
+ setenv("GNUTARGET", GNUTARGET, 1);
+#ifdef LDEMULATION
+ setenv("LDEMULATION", LDEMULATION, 1);
+#endif
+#ifdef LD_RPATH_LINK
+ setenv("LD_RPATH_LINK", LD_RPATH_LINK, 1);
+#endif
+
+ /* run it! */
+ execv(path, argv);
+
+ /* we shouldn't get here. */
+ err(EX_OSERR, "(buwrapper): exec %s", path);
+}
diff --git a/cross/COMMON/cross.mk b/cross/COMMON/cross.mk
index 9a3cd147d17..b618c5e05a9 100644
--- a/cross/COMMON/cross.mk
+++ b/cross/COMMON/cross.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cross.mk,v 1.3 1998/08/20 15:16:44 tsarna Exp $
+# $NetBSD: cross.mk,v 1.4 1999/01/04 22:37:30 tv Exp $
# Shared definitions for building a cross-compile environment.
@@ -13,8 +13,8 @@ TARGET_DIR= ${PREFIX}/${TARGET_ARCH}
COMMON_DIR= ${PKGSRCDIR}/cross/COMMON
PLIST_PRE?= ${PKGDIR}/PLIST
-do-install: do-install-dirs
-do-install-dirs:
+pre-install: pre-install-dirs
+pre-install-dirs:
${INSTALL_DATA_DIR} ${PREFIX}
${INSTALL_DATA_DIR} ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/lib
@@ -23,67 +23,100 @@ do-install-dirs:
${INSTALL_DATA_DIR} ${TARGET_DIR}/include
${INSTALL_DATA_DIR} ${TARGET_DIR}/lib
-.if defined(USE_CROSS_GNU)
+.if defined(USE_CROSS_BINUTILS)
BINUTILS_DISTNAME= binutils-2.9.1
+BINUTILS_WRKSRC= ${WRKDIR}/${BINUTILS_DISTNAME}
+
CROSS_DISTFILES+= ${BINUTILS_DISTNAME}.tar.gz
MASTER_SITES+= ${MASTER_SITE_GNU}
CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld
+DEPENDS+= cross-binutils-2.9.1.0:../../cross/binutils
PLIST_PRE+= ${COMMON_DIR}/PLIST-binutils
-#CROSS_PATCHFILES+= ${COMMON_DIR}/patches-binutils/patch-*
-USE_CROSS_EGCS= yes
-
-post-extract: post-extract-binutils
-post-extract-binutils:
- @cd ${WRKSRC} && \
- ${LN} -sf ../${BINUTILS_DISTNAME}/bfd && \
- ${LN} -sf ../${BINUTILS_DISTNAME}/binutils && \
- ${LN} -sf ../${BINUTILS_DISTNAME}/gas && \
- ${LN} -sf ../${BINUTILS_DISTNAME}/ld && \
- ${LN} -sf ../${BINUTILS_DISTNAME}/opcodes && \
- ${LN} -sf ../gas/as-new gcc/as && \
- ${LN} -sf ../ld/ld-new gcc/ld
- @cd ${WRKDIR}/${BINUTILS_DISTNAME} && \
- ${RM} -rf libiberty texinfo && \
- ${LN} -sf ../${EGCS_DISTNAME}/libiberty
-
-do-install: do-install-binutils
-do-install-binutils:
- @cd ${WRKSRC}/binutils && ${GMAKE} install-exec
- @cd ${WRKSRC}/gas && ${GMAKE} install-exec
- @cd ${WRKSRC}/ld && ${GMAKE} install-exec
- for file in addr2line c++filt gasp objcopy objdump size strings; do \
- ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-$$file ${TARGET_DIR}/bin/$$file; \
+
+AS_FOR_TARGET= ${BINUTILS_WRKSRC}/gas/as-new
+AR_FOR_TARGET= ${WRKDIR}/ar
+NM_FOR_TARGET= ${WRKDIR}/nm
+RANLIB_FOR_TARGET= ${WRKDIR}/ranlib
+LD_FOR_TARGET= ${WRKDIR}/ld
+
+pre-patch: binutils-patch
+pre-configure: binutils-configure
+do-build: binutils-build
+do-install: binutils-install
+
+binutils-patch:
+ @for i in ${COMMON_DIR}/patches-binutils/patch-*; do \
+ ${PATCH} -d ${BINUTILS_WRKSRC} --forward --quiet -E < $$i; \
+ done
+
+binutils-configure:
+ @cd ${BINUTILS_WRKSRC} && ${SETENV} CC="${CC}" ac_cv_path_CC="${CC}" \
+ CFLAGS="${CFLAGS}" ${CONFIGURE_ENV} ./configure \
+ --prefix=${PREFIX} --host=${MACHINE_GNU_ARCH}--netbsd \
+ --target=${TARGET_ARCH}
+
+binutils-build:
+ @cd ${BINUTILS_WRKSRC}/bfd && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} bfd.h
+ @cd ${BINUTILS_WRKSRC}/libiberty && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} all
+ @cd ${BINUTILS_WRKSRC}/gas && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} as-new
+ ${LINK.c} -o ${WRKDIR}/ar \
+ -DPREFIX=\"${PREFIX}\" \
+ -DGNUTARGET=\"${BINUTILS_GNUTARGET}\" \
+ ${COMMON_DIR}/buwrapper.c
+ @cd ${WRKDIR} && \
+ ${LN} -f ar nm && \
+ ${LN} -f ar ranlib
+ ${LINK.c} -o ${WRKDIR}/ld \
+ -DPREFIX=\"${PREFIX}\" \
+ -DGNUTARGET=\"${BINUTILS_GNUTARGET}\" \
+ -DLDEMULATION=\"${BINUTILS_LDEMULATION}\" \
+ -DLD_RPATH_LINK=\"${TARGET_DIR}/lib\" \
+ ${COMMON_DIR}/buwrapper.c
+
+binutils-install:
+ ${INSTALL_PROGRAM} ${BINUTILS_WRKSRC}/gas/as-new ${TARGET_DIR}/bin/as
+ ${INSTALL_PROGRAM} ${WRKDIR}/ar ${TARGET_DIR}/bin/ar
+ ${INSTALL_PROGRAM} ${WRKDIR}/ld ${TARGET_DIR}/bin/ld
+ for i in addr2line nm objcopy objdump ranlib size strings strip ${BINUTILS_EXTRAS}; do \
+ ${LN} -f ${TARGET_DIR}/bin/ar ${TARGET_DIR}/bin/$$i; \
+ done
+ for i in addr2line ar as ld nm objcopy objdump ranlib size strings strip ${BINUTILS_EXTRAS}; do \
+ ${LN} -f ${TARGET_DIR}/bin/$$i ${PREFIX}/bin/${TARGET_ARCH}-$$i; \
done
.endif
.if defined(USE_CROSS_EGCS)
-#.if defined(USE_CROSS_EGCS_SNAPSHOT)
-EGCS_DISTNAME= egcs-19980803
-EGCS_DISTDIR= snapshots/1998-08-03
-EGCS_INTVERSION= egcs-2.91.53
-EGCS_PLIST_PRE= ${COMMON_DIR}/PLIST-egcs-ss
-CROSS_PATCHFILES+= ${COMMON_DIR}/patches-egcs-ss/patch-*
-#.else
-#EGCS_DISTNAME= egcs-1.1
-#EGCS_DISTDIR= releases/egcs-1.1
-#EGCS_INTVERSION= egcs-2.??.??
-#.endif
-
-CROSS_DISTFILES+= ${EGCS_DISTNAME}.tar.gz
-MASTER_SITES+= ftp://egcs.cygnus.com/pub/egcs/${EGCS_DISTDIR}/
-WRKSRC= ${WRKDIR}/${EGCS_DISTNAME}
-PLIST_PRE+= ${EGCS_PLIST_PRE}
-
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --target=${TARGET_ARCH} \
- --enable-version-specific-runtime-libs
-CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS}"
+EGCS_DISTNAME= egcs-1.1.1
+EGCS_DISTDIR= releases/${EGCS_DISTNAME}
+EGCS_INTVERSION= egcs-2.91.60
+EGCS_PATCHBUNDLE= ${EGCS_DISTNAME}-NetBSD-19980104.diff.gz
+EGCS_WRKSRC= ${WRKDIR}/${EGCS_DISTNAME}
+# XXX PLIST support for fewer languages not yet complete
+EGCS_LANGUAGES?= c c++ f77 objc
+
+CROSS_DISTFILES+= ${EGCS_DISTNAME}.tar.gz ${EGCS_PATCHBUNDLE}
+MASTER_SITES+= ftp://egcs.cygnus.com/pub/egcs/${EGCS_DISTDIR}/ \
+ ${MASTER_SITE_LOCAL}
+PLIST_PRE+= ${COMMON_DIR}/PLIST-egcs
USE_GMAKE= yes
-MAKE_FLAGS+= CC_FOR_TARGET="${WRKSRC}/gcc/xgcc -B${WRKSRC}/gcc/ ${CFLAGS_FOR_TARGET}" \
- GCC_FOR_TARGET='$${CC_FOR_TARGET}' \
- CXX_FOR_TARGET='$${CC_FOR_TARGET}' \
+
+CC_FOR_TARGET= ${EGCS_WRKSRC}/gcc/xgcc -B${EGCS_WRKSRC}/gcc/ ${CFLAGS_FOR_TARGET}
+CXX_FOR_TARGET= ${CC_FOR_TARGET}
+
+EGCS_MAKE_FLAGS= CC_FOR_TARGET="${CC_FOR_TARGET}" \
+ GCC_FOR_TARGET="${CC_FOR_TARGET}" \
+ CXX_FOR_TARGET="${CXX_FOR_TARGET}" \
+ AS_FOR_TARGET="${AS_FOR_TARGET}" \
+ AR_FOR_TARGET="${AR_FOR_TARGET}" \
+ NM_FOR_TARGET="${NM_FOR_TARGET}" \
+ RANLIB_FOR_TARGET="${RANLIB_FOR_TARGET}" \
LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET}" \
- LANGUAGES="c c++ f77 objc"
+ LANGUAGES="${EGCS_LANGUAGES}" \
+ INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}"
.if defined(SYS_INCLUDE)
CFLAGS_FOR_TARGET+= -idirafter ${SYS_INCLUDE}
@@ -93,33 +126,72 @@ MAKE_FLAGS+= SYSTEM_HEADER_DIR="${SYS_INCLUDE}"
LDFLAGS_FOR_TARGET+= -L${SYS_LIB}
.endif
-post-extract: post-extract-egcs
-post-extract-egcs:
- @cd ${WRKSRC} && ${RM} -rf texinfo
+pre-patch: egcs-patch
+pre-configure: egcs-configure
+do-build: egcs-build
+do-install: egcs-install
-do-install: do-install-egcs
-do-install-egcs:
- @cd ${WRKSRC}/gcc && ${GMAKE} ${MAKE_FLAGS} install-common install-headers install-libgcc install-driver
+egcs-patch:
+ @${GZCAT} ${_DISTDIR}/${EGCS_PATCHBUNDLE} | \
+ ${PATCH} -d ${EGCS_WRKSRC} --forward --quiet -E
+ @for i in ${COMMON_DIR}/patches-egcs/patch-*; do \
+ ${PATCH} -d ${EGCS_WRKSRC} --forward --quiet -E < $$i; \
+ done
+
+egcs-configure:
+ @cd ${EGCS_WRKSRC} && ${SETENV} CC="${CC}" ac_cv_path_CC="${CC}" \
+ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" \
+ INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+ ./configure --prefix=${PREFIX} \
+ --host=${MACHINE_GNU_ARCH}--netbsd --target=${TARGET_ARCH} \
+ --enable-version-specific-runtime-libs
+
+egcs-build:
+ @${LN} -sf ${AS_FOR_TARGET} ${EGCS_WRKSRC}/gcc/as
+ @${LN} -sf ${LD_FOR_TARGET} ${EGCS_WRKSRC}/gcc/ld
+ @cd ${EGCS_WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} ${EGCS_MAKE_FLAGS} all
+
+egcs-install:
+ @cd ${EGCS_WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} ${EGCS_MAKE_FLAGS} \
+ install-common install-headers install-libgcc install-driver
chown -R ${BINOWN}:${BINGRP} ${PREFIX}/lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}
- @cd ${WRKSRC} && ${GMAKE} ${MAKE_FLAGS} install-target-libf2c install-target-libstdc++
+ @cd ${EGCS_WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} ${EGCS_MAKE_FLAGS} install-target-libf2c
+ @${MKDIR} ${PREFIX}/lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/g++/std
+ @cd ${EGCS_WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} ${EGCS_MAKE_FLAGS} install-target-libstdc++
+ ${LN} -f ${TARGET_DIR}/bin/gcc ${TARGET_DIR}/bin/cc
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-gcc ${PREFIX}/bin/${TARGET_ARCH}-cc
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-g77 ${PREFIX}/bin/${TARGET_ARCH}-f77
- for file in cc c++ f77 g++ g77; do \
+ ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-g77 ${PREFIX}/bin/${TARGET_ARCH}-fort77
+ for file in cc c++ c++filt f77 fort77 g++ g77; do \
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-$$file ${TARGET_DIR}/bin/$$file; \
done
@${RMDIR} -p ${PREFIX}/info 2>/dev/null || ${TRUE}
@${RMDIR} -p ${PREFIX}/man/man1 2>/dev/null || ${TRUE}
.endif
+.if defined(CROSS_DISTFILES)
+DISTFILES+= ${CROSS_DISTFILES}
+.if defined(EXTRACT_ONLY)
+EXTRACT_ONLY+= ${CROSS_DISTFILES:N*.diff.gz}
+.else
+EXTRACT_ONLY= ${DISTFILES:N*.diff.gz}
+.endif
+.endif
+
.if defined(SYS_INCLUDE)
-do-install: do-install-includes
-do-install-includes:
+pre-install: pre-install-includes
+pre-install-includes:
cd ${SYS_INCLUDE} && pax -rw . ${TARGET_DIR}/include
.endif
.if defined(SYS_LIB)
-do-install: do-install-lib
-do-install-lib:
+pre-install: pre-install-lib
+pre-install-lib:
cd ${SYS_LIB} && pax -rw . ${TARGET_DIR}/lib
.endif
@@ -133,16 +205,6 @@ post-install-plist:
@${ECHO} '@dirrm ${TARGET_ARCH}/lib' >>${PLIST_SRC}
@${ECHO} '@dirrm ${TARGET_ARCH}' >>${PLIST_SRC}
-.if defined(CROSS_PATCHFILES)
-PATCHFILES+= ${CROSS_PATCHFILES}
-ALLFILES= ${DISTFILES} # don't checksum shared patches
-.endif
-
-.if defined(CROSS_DISTFILES)
-DISTFILES+= ${CROSS_DISTFILES}
-.if defined(EXTRACT_ONLY)
-EXTRACT_ONLY+= ${CROSS_DISTFILES}
-.endif
-.endif
-
.include "../../mk/bsd.pkg.mk"
+
+EXTRACT_BEFORE_ARGS:= -X ${COMMON_DIR}/exclude ${EXTRACT_BEFORE_ARGS}
diff --git a/cross/COMMON/exclude b/cross/COMMON/exclude
new file mode 100644
index 00000000000..a3be5a8c5ab
--- /dev/null
+++ b/cross/COMMON/exclude
@@ -0,0 +1,11 @@
+egcs-*/*/tests/*
+egcs-*/*/testsuite/*
+egcs-*/gcc/*/tests/*
+egcs-*/gcc/*/testsuite/*
+egcs-*/texinfo/*
+binutils-*/*/tests/*
+binutils-*/*/testsuite/*
+binutils-*/binutils/*
+binutils-*/etc/*
+binutils-*/gprof/*
+binutils-*/ld/*
diff --git a/cross/COMMON/patches-binutils/patch-aa b/cross/COMMON/patches-binutils/patch-aa
new file mode 100644
index 00000000000..6201c47aacc
--- /dev/null
+++ b/cross/COMMON/patches-binutils/patch-aa
@@ -0,0 +1,21 @@
+$NetBSD: patch-aa,v 1.1 1999/01/04 22:37:30 tv Exp $
+
+--- gas/Makefile.in.orig Mon Jan 4 00:34:23 1999
++++ gas/Makefile.in Mon Jan 4 00:37:14 1999
+@@ -452,14 +452,14 @@
+ # How to link with both our special library facilities
+ # and the system's installed libraries.
+
+-GASLIBS = @OPCODES_LIB@ @BFDLIB@ ../libiberty/libiberty.a
++GASLIBS = ../libiberty/libiberty.a
+
+ # Files to be copied away after each stage in building.
+ STAGESTUFF = *.o $(noinst_PROGRAMS)
+
+ as_new_SOURCES = $(GAS_CFILES)
+ as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
+- $(extra_objects) $(GASLIBS)
++ $(extra_objects) -Wl,-R${PREFIX}/lib -L${PREFIX}/lib -lopcodes-2.9.1 -lbfd-2.9.1 $(GASLIBS)
+ as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
+ $(extra_objects) $(GASLIBS)
+
diff --git a/cross/COMMON/patches-binutils/patch-arrays b/cross/COMMON/patches-binutils/patch-arrays
new file mode 100644
index 00000000000..f283f155c63
--- /dev/null
+++ b/cross/COMMON/patches-binutils/patch-arrays
@@ -0,0 +1,22 @@
+--- ./bfd/libbfd-in.h.orig Fri May 1 11:48:12 1998
++++ ./bfd/libbfd-in.h Mon Dec 28 17:43:21 1998
+@@ -496,7 +498,7 @@
+
+ /* List of supported target vectors, and the default vector (if
+ bfd_default_vector[0] is NULL, there is no default). */
+-extern const bfd_target * const bfd_target_vector[];
++extern const bfd_target * const *bfd_target_vector;
+ extern const bfd_target *bfd_default_vector[];
+
+ /* Functions shared by the ECOFF and MIPS ELF backends, which have no
+--- ./bfd/libbfd.h.orig Fri May 1 11:48:12 1998
++++ ./bfd/libbfd.h Mon Dec 28 17:43:21 1998
+@@ -496,7 +498,7 @@
+
+ /* List of supported target vectors, and the default vector (if
+ bfd_default_vector[0] is NULL, there is no default). */
+-extern const bfd_target * const bfd_target_vector[];
++extern const bfd_target * const *bfd_target_vector;
+ extern const bfd_target *bfd_default_vector[];
+
+ /* Functions shared by the ECOFF and MIPS ELF backends, which have no
diff --git a/cross/COMMON/patches-egcs-ss/patch-ab b/cross/COMMON/patches-egcs-ss/patch-ab
deleted file mode 100644
index 6ddc6a8e0f1..00000000000
--- a/cross/COMMON/patches-egcs-ss/patch-ab
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-ab,v 1.1 1998/08/12 17:12:09 tv Exp $
-
---- gcc/config/xm-netbsd.h.orig Wed Aug 12 10:36:54 1998
-+++ gcc/config/xm-netbsd.h Wed Aug 12 10:37:01 1998
-@@ -22,5 +22,3 @@
- running NetBSD. This file should not be specified as $xm_file itself;
- instead $xm_file should be CPU/xm-netbsd.h, which should include both
- CPU/xm-CPU.h and this file xm-netbsd.h. */
--
--#define HAVE_VPRINTF
diff --git a/cross/COMMON/patches-egcs-ss/patch-aa b/cross/COMMON/patches-egcs/patch-aa
index 5441504dfe8..59a1287551b 100644
--- a/cross/COMMON/patches-egcs-ss/patch-aa
+++ b/cross/COMMON/patches-egcs/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 1998/08/14 00:12:53 tv Exp $
+$NetBSD: patch-aa,v 1.1 1999/01/04 22:37:30 tv Exp $
--- Makefile.in.orig Sat Jun 27 18:08:28 1998
+++ Makefile.in Thu Aug 13 17:32:08 1998
diff --git a/cross/Makefile b/cross/Makefile
index e6e4864ee8b..23361335766 100644
--- a/cross/Makefile
+++ b/cross/Makefile
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.3 1998/08/14 00:10:44 tv Exp $
+# $NetBSD: Makefile,v 1.4 1999/01/04 22:37:29 tv Exp $
+ SUBDIR += binutils
SUBDIR += i386-linux
SUBDIR += i386-linuxglibc1
SUBDIR += i386-msdosdjgpp
diff --git a/cross/binutils/Makefile b/cross/binutils/Makefile
new file mode 100644
index 00000000000..60c2648dd26
--- /dev/null
+++ b/cross/binutils/Makefile
@@ -0,0 +1,62 @@
+# $NetBSD: Makefile,v 1.1 1999/01/04 22:37:31 tv Exp $
+#
+# GNU binutils configured to hold `as many targets as the cross system is
+# capable of using'. Configures and builds everything except gas, which
+# gets built at cross-pkg build time (it's target specific).
+
+DISTNAME= binutils-2.9.1
+PKGNAME= cross-binutils-2.9.1.0
+CATEGORIES= cross lang
+MASTER_SITES= ${MASTER_SITE_GNU}
+
+MAINTAINER= tv@netbsd.org
+HOMEPAGE= http://www.gnu.org/
+
+USE_CROSSBASE= yes
+USE_LIBTOOL= yes
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --enable-64-bit-bfd \
+ --enable-targets=${ENABLE_TARGETS_LIST}
+MAKE_ARGS+= CFLAGS="${CFLAGS}"
+ALL_TARGET= all-binutils all-gprof all-ld
+
+BINDIR= ${PREFIX}/libexec/binutils
+
+ENABLE_TARGETS= alpha-netbsd \
+ i386-cygwin32 i386-elf i386-go32 i386-linux \
+ i386-netbsd i386-netware \
+ m68k-elf m68k-netbsd m68k-sunos4 \
+ mips-dec-netbsd \
+ powerpc-eabi powerpcle-eabi \
+ sparc-netbsd sparc-solaris2 sparc-sunos4 \
+ sparc64-elf
+
+post-extract:
+ @${RM} -rf ${WRKSRC}/gas
+
+# we use MKDIR, not INSTALL_PROGRAM_DIR, deliberately.
+do-install:
+ ${MKDIR} ${BINDIR} ${PREFIX}/lib/ldscripts
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/addr2line ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/ar ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/dlltool ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/gprof/gprof ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/ld/ld-new ${BINDIR}/ld
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/nlmconv ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/nm-new ${BINDIR}/nm
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/objcopy ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/objdump ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/ranlib ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/size ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/strings ${BINDIR}
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/strip-new ${BINDIR}/strip
+ @${LIBTOOL} ${INSTALL_PROGRAM} ${WRKSRC}/binutils/windres ${BINDIR}
+ @${LIBTOOL} ${INSTALL_DATA} ${WRKSRC}/bfd/libbfd.la ${PREFIX}/lib
+ @${LIBTOOL} ${INSTALL_DATA} ${WRKSRC}/opcodes/libopcodes.la ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/ld/ldscripts/* ${PREFIX}/lib/ldscripts
+
+.include "../../mk/bsd.pkg.mk"
+
+ENABLE_TARGETS_LIST!= ${ECHO} "${ENABLE_TARGETS}" | ${SED} "s/[ ][ ]*/,/g;s/^,*//"
+EXTRACT_BEFORE_ARGS:= -X ${FILESDIR}/exclude ${EXTRACT_BEFORE_ARGS}
diff --git a/cross/binutils/files/exclude b/cross/binutils/files/exclude
new file mode 100644
index 00000000000..b0349ef5bdf
--- /dev/null
+++ b/cross/binutils/files/exclude
@@ -0,0 +1,3 @@
+binutils-*/*/tests/*
+binutils-*/*/testsuite/*
+binutils-*/etc/*
diff --git a/cross/binutils/files/md5 b/cross/binutils/files/md5
new file mode 100644
index 00000000000..52e97ae6adb
--- /dev/null
+++ b/cross/binutils/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1 1999/01/04 22:37:31 tv Exp $
+
+MD5 (binutils-2.9.1.tar.gz) = 8f9ad1a6e96742fd3069479171a63c22
diff --git a/cross/binutils/patches/patch-aa b/cross/binutils/patches/patch-aa
new file mode 100644
index 00000000000..42765bf3c16
--- /dev/null
+++ b/cross/binutils/patches/patch-aa
@@ -0,0 +1,45 @@
+$NetBSD: patch-aa,v 1.1 1999/01/04 22:37:31 tv Exp $
+
+--- ./bfd/elf64-alpha.c.orig Fri May 1 11:48:09 1998
++++ ./bfd/elf64-alpha.c Tue Dec 29 15:31:36 1998
+@@ -1012,9 +1012,16 @@
+ #define PLT_HEADER_WORD4 0x6b7b0000 /* jmp $27,($27) */
+
+ #define PLT_ENTRY_SIZE 12
++#ifdef __NetBSD__
++/* XXX. XXX. For NetBSD 1.3 compatibility - should be fixed better */
++#define PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */
++#define PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */
++#define PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */
++#else
+ #define PLT_ENTRY_WORD1 0xc3800000 /* br $28, plt0 */
+ #define PLT_ENTRY_WORD2 0
+ #define PLT_ENTRY_WORD3 0
++#endif
+
+ #define MAX_GOT_ENTRIES (64*1024 / 8)
+
+@@ -3118,9 +3125,23 @@
+ {
+ unsigned insn1, insn2, insn3;
+
++#ifdef __NetBSD__
++/* XXX. XXX. For NetBSD 1.3 compatibility - should be fixed better */
++ long hi, lo;
++
++ /* decompose the reloc offset for the plt for ldah+lda */
++ hi = plt_index * sizeof(Elf64_External_Rela);
++ lo = ((hi & 0xffff) ^ 0x8000) - 0x8000;
++ hi = (hi - lo) >> 16;
++
++ insn1 = PLT_ENTRY_WORD1 | (hi & 0xffff);
++ insn2 = PLT_ENTRY_WORD2 | (lo & 0xffff);
++ insn3 = PLT_ENTRY_WORD3 | ((-(h->plt_offset + 12) >> 2) & 0x1fffff);
++#else
+ insn1 = PLT_ENTRY_WORD1 | ((-(h->plt_offset + 4) >> 2) & 0x1fffff);
+ insn2 = PLT_ENTRY_WORD2;
+ insn3 = PLT_ENTRY_WORD3;
++#endif
+
+ bfd_put_32 (output_bfd, insn1, splt->contents + h->plt_offset);
+ bfd_put_32 (output_bfd, insn2, splt->contents + h->plt_offset + 4);
diff --git a/cross/binutils/patches/patch-ab b/cross/binutils/patches/patch-ab
new file mode 100644
index 00000000000..049645c1c4c
--- /dev/null
+++ b/cross/binutils/patches/patch-ab
@@ -0,0 +1,37 @@
+$NetBSD: patch-ab,v 1.1 1999/01/04 22:37:31 tv Exp $
+
+--- ./ld/configure.host.orig Fri May 1 11:48:48 1998
++++ ./ld/configure.host Wed Dec 22 09:52:16 1999
+@@ -16,12 +16,7 @@
+
+ case "${host}" in
+
+-alpha*-*-linux-gnu*)
+- HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`gcc --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `gcc --print-file-name=crt1.o` `gcc --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
+- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L`dirname \`gcc --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` `gcc --print-file-name=crtn.o`'
+- ;;
+-
+-alpha*-*-netbsd*)
++*-*-netbsd*)
+ # The new BSD `make' has a bug: it doesn't pass empty arguments in
+ # shell commands. So we need to make this value non-empty in order
+ # for the genscripts.sh call to work. There's nothing magic about
+@@ -30,12 +25,17 @@
+ HOSTING_CRT0=/usr/lib/crt0.o
+ ;;
+
++alpha*-*-linux-gnu*)
++ HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`gcc --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `gcc --print-file-name=crt1.o` `gcc --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
++ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L`dirname \`gcc --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` `gcc --print-file-name=crtn.o`'
++ ;;
++
+ alpha*-*-*)
+ HOSTING_CRT0=/usr/ccs/lib/crt0.o
+ NATIVE_LIB_DIRS=/usr/ccs/lib
+ ;;
+
+-i[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]86-*-netbsd*)
++i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
+ # The new BSD `make' has a bug: it doesn't pass empty arguments in
+ # shell commands. So we need to make this value non-empty in order
+ # for the genscripts.sh call to work. There's nothing magic about
diff --git a/cross/binutils/patches/patch-ac b/cross/binutils/patches/patch-ac
new file mode 100644
index 00000000000..30a0d7d7e80
--- /dev/null
+++ b/cross/binutils/patches/patch-ac
@@ -0,0 +1,151 @@
+$NetBSD: patch-ac,v 1.1 1999/01/04 22:37:31 tv Exp $
+
+--- ./bfd/elf32-mips.c.orig Fri May 1 11:48:09 1998
++++ ./bfd/elf32-mips.c Mon Dec 28 17:43:20 1998
+@@ -155,6 +155,11 @@
+ #define STUB_LI16 0x34180000 /* ori t8,zero,0 */
+ #define MIPS_FUNCTION_STUB_SIZE (16)
+
++#if 0
++/* We no longer try to identify particular sections for the .dynsym
++ section. When we do, we wind up crashing if there are other random
++ sections with relocations. */
++
+ /* Names of sections which appear in the .dynsym section in an Irix 5
+ executable. */
+
+@@ -179,6 +184,8 @@
+
+ #define MIPS_TEXT_DYNSYM_SECNO (3)
+
++#endif /* 0 */
++
+ /* The names of the runtime procedure table symbols used on Irix 5. */
+
+ static const char * const mips_elf_dynsym_rtproc_names[] =
+@@ -2314,7 +2321,10 @@
+ || strcmp (name, ".dynstr") == 0))
+ {
+ hdr->sh_entsize = 0;
++#if 0
++ /* This isn't how the Irix 6 linker behaves. */
+ hdr->sh_info = SIZEOF_MIPS_DYNSYM_SECNAMES;
++#endif
+ }
+ else if (strcmp (name, ".got") == 0
+ || strcmp (name, ".sdata") == 0
+@@ -3178,8 +3188,11 @@
+ struct mips_elf_link_hash_table
+ {
+ struct elf_link_hash_table root;
++#if 0
++ /* We no longer use this. */
+ /* String section indices for the dynamic section symbols. */
+ bfd_size_type dynsym_sec_strindex[SIZEOF_MIPS_DYNSYM_SECNAMES];
++#endif
+ /* The number of .rtproc entries. */
+ bfd_size_type procedure_count;
+ /* The size of the .compact_rel section (if SGI_COMPAT). */
+@@ -3264,7 +3277,6 @@
+ bfd *abfd;
+ {
+ struct mips_elf_link_hash_table *ret;
+- unsigned int i;
+
+ ret = ((struct mips_elf_link_hash_table *)
+ bfd_alloc (abfd, sizeof (struct mips_elf_link_hash_table)));
+@@ -3278,8 +3290,11 @@
+ return NULL;
+ }
+
++#if 0
++ /* We no longer use this. */
+ for (i = 0; i < SIZEOF_MIPS_DYNSYM_SECNAMES; i++)
+ ret->dynsym_sec_strindex[i] = (bfd_size_type) -1;
++#endif
+ ret->procedure_count = 0;
+ ret->compact_rel_size = 0;
+ ret->use_rld_obj_head = false;
+@@ -6570,15 +6585,20 @@
+ That means we must increment the dynamic symbol index of every
+ other dynamic symbol. */
+ {
+- const char * const *namep;
+ unsigned int c, i;
+- bfd_size_type strindex;
+- struct bfd_strtab_hash *dynstr;
+ struct mips_got_info *g;
+
+ c = 0;
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
++#if 0
++ /* We no longer try to restrict the set of sections which get
++ dynamic symbol table entries, since it fails if we have
++ other random sections which need dynamic relocations. */
++ const char * const *namep;
++ bfd_size_type strindex;
++ struct bfd_strtab_hash *dynstr;
++
+ if (SGI_COMPAT (output_bfd))
+ {
+ c = SIZEOF_MIPS_DYNSYM_SECNAMES - 1;
+@@ -6606,6 +6626,7 @@
+ }
+ }
+ else
++#endif /* 0 */
+ {
+ c = bfd_count_sections (output_bfd);
+ elf_link_hash_traverse (elf_hash_table (info),
+@@ -6962,8 +6983,11 @@
+ break;
+
+ case DT_MIPS_UNREFEXTNO:
+- /* XXX FIXME: */
++#if 0
+ dyn.d_un.d_val = SIZEOF_MIPS_DYNSYM_SECNAMES;
++#else
++ dyn.d_un.d_val = bfd_count_sections (output_bfd);
++#endif
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+@@ -7001,12 +7025,7 @@
+ {
+ asection *sdynsym;
+ asection *s;
+- unsigned int i;
+- bfd_vma last;
+ Elf_Internal_Sym sym;
+- long dindx;
+- const char *name;
+- const char * const * namep = mips_elf_dynsym_sec_names;
+ Elf32_compact_rel cpt;
+
+ /* Set up the section symbols for the output sections. SGI sets
+@@ -7015,6 +7034,16 @@
+ sdynsym = bfd_get_section_by_name (dynobj, ".dynsym");
+ if (sdynsym != NULL)
+ {
++#if 0
++ const char *name;
++ const char * const * namep = mips_elf_dynsym_sec_names;
++ unsigned int i;
++ bfd_vma last;
++ long dindx;
++
++ /* We no longer try to restrict the set of sections which get
++ dynamic symbol table entries, since it fails if we have
++ other random sections which need dynamic relocations. */
+ if (SGI_COMPAT (output_bfd))
+ {
+ sym.st_size = 0;
+@@ -7059,6 +7088,7 @@
+ SIZEOF_MIPS_DYNSYM_SECNAMES;
+ }
+ else
++#endif /* 0 */
+ {
+ sym.st_size = 0;
+ sym.st_name = 0;
diff --git a/cross/binutils/patches/patch-ad b/cross/binutils/patches/patch-ad
new file mode 100644
index 00000000000..dd0b32c7ab4
--- /dev/null
+++ b/cross/binutils/patches/patch-ad
@@ -0,0 +1,21 @@
+$NetBSD: patch-ad,v 1.1 1999/01/04 22:37:31 tv Exp $
+
+--- bfd/configure.orig Thu Dec 31 14:13:13 1998
++++ bfd/configure Thu Dec 31 14:13:32 1998
+@@ -1398,6 +1398,7 @@
+ echo "$ac_t""no" 1>&6
+ fi
+
++if false; then
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+@@ -1443,7 +1444,7 @@
+ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+-
++fi
+
+ # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
+ if test "${enable_64_bit_bfd+set}" = set; then
diff --git a/cross/binutils/patches/patch-ae b/cross/binutils/patches/patch-ae
new file mode 100644
index 00000000000..67765e7f0a2
--- /dev/null
+++ b/cross/binutils/patches/patch-ae
@@ -0,0 +1,21 @@
+$NetBSD: patch-ae,v 1.1 1999/01/04 22:37:32 tv Exp $
+
+--- opcodes/configure.orig Thu Dec 31 14:13:46 1998
++++ opcodes/configure Thu Dec 31 14:14:00 1998
+@@ -1380,6 +1380,7 @@
+ echo "$ac_t""no" 1>&6
+ fi
+
++if false; then
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+@@ -1425,7 +1426,7 @@
+ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+-
++fi
+
+ # Check whether --enable-targets or --disable-targets was given.
+ if test "${enable_targets+set}" = set; then
diff --git a/cross/binutils/patches/patch-af b/cross/binutils/patches/patch-af
new file mode 100644
index 00000000000..be7d76331fc
--- /dev/null
+++ b/cross/binutils/patches/patch-af
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1 1999/01/04 22:37:32 tv Exp $
+
+--- ld/Makefile.in.orig Thu Dec 31 15:03:33 1998
++++ ld/Makefile.in Thu Dec 31 15:03:43 1998
+@@ -87,7 +87,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(prefix)/lib
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/cross/binutils/patches/patch-ag b/cross/binutils/patches/patch-ag
new file mode 100644
index 00000000000..72a289028c3
--- /dev/null
+++ b/cross/binutils/patches/patch-ag
@@ -0,0 +1,21 @@
+$NetBSD: patch-ag,v 1.1 1999/01/04 22:37:32 tv Exp $
+
+--- ld/configure.orig Thu Dec 31 15:21:31 1998
++++ ld/configure Thu Dec 31 15:21:46 1998
+@@ -1269,6 +1269,7 @@
+ echo "$ac_t""no" 1>&6
+ fi
+
++if false; then
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+@@ -1314,7 +1315,7 @@
+ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+-
++fi
+
+ # Check whether --enable-targets or --disable-targets was given.
+ if test "${enable_targets+set}" = set; then
diff --git a/cross/binutils/patches/patch-ah b/cross/binutils/patches/patch-ah
new file mode 100644
index 00000000000..755e4673018
--- /dev/null
+++ b/cross/binutils/patches/patch-ah
@@ -0,0 +1,21 @@
+$NetBSD: patch-ah,v 1.1 1999/01/04 22:37:32 tv Exp $
+
+--- binutils/configure.orig Thu Dec 31 15:22:04 1998
++++ binutils/configure Thu Dec 31 15:22:17 1998
+@@ -1269,6 +1269,7 @@
+ echo "$ac_t""no" 1>&6
+ fi
+
++if false; then
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+@@ -1314,7 +1315,7 @@
+ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+-
++fi
+
+ # Check whether --enable-targets or --disable-targets was given.
+ if test "${enable_targets+set}" = set; then
diff --git a/cross/i386-msdosdjgpp/patches/patch-aa b/cross/binutils/patches/patch-ai
index 0af0e12301b..a8ba285bd0d 100644
--- a/cross/i386-msdosdjgpp/patches/patch-aa
+++ b/cross/binutils/patches/patch-ai
@@ -1,4 +1,6 @@
-$NetBSD: patch-aa,v 1.1 1998/08/12 12:30:59 tv Exp $
+$NetBSD: patch-ai,v 1.1 1999/01/04 22:37:32 tv Exp $
+
+XXX - this isn't quite right, but is necessary for now to make DJGPP work.
--- ld/scripttempl/i386go32.sc.orig Sun Aug 2 15:02:47 1998
+++ ld/scripttempl/i386go32.sc Sun Aug 2 15:02:59 1998
diff --git a/cross/binutils/patches/patch-aj b/cross/binutils/patches/patch-aj
new file mode 100644
index 00000000000..dedd43edfe5
--- /dev/null
+++ b/cross/binutils/patches/patch-aj
@@ -0,0 +1,14 @@
+$NetBSD: patch-aj,v 1.1 1999/01/04 22:37:32 tv Exp $
+
+--- ld/emultempl/elf32.em.orig Fri May 1 11:48:55 1998
++++ ld/emultempl/elf32.em Mon Jan 4 14:11:48 1999
+@@ -342,6 +342,9 @@
+ fi
+ fi
+ cat >>e${EMULATION_NAME}.c <<EOF
++ lib_path = (const char *) getenv ("LD_RPATH_LINK");
++ if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
++ break;
+ }
+
+ if (force < 2)
diff --git a/cross/binutils/patches/patch-archive b/cross/binutils/patches/patch-archive
new file mode 100644
index 00000000000..b3f9feaa4a9
--- /dev/null
+++ b/cross/binutils/patches/patch-archive
@@ -0,0 +1,155 @@
+$NetBSD: patch-archive,v 1.1 1999/01/04 22:37:32 tv Exp $
+
+--- ./bfd/archive.c.orig Fri May 1 11:48:01 1998
++++ ./bfd/archive.c Mon Dec 28 17:43:17 1998
+@@ -595,7 +595,9 @@
+ Note that last_file->origin can be odd in the case of
+ BSD-4.4-style element with a long odd size. */
+ filestart = last_file->origin + size;
+- filestart += filestart % 2;
++ if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3))
++ size += strlen(normalize(last_file, last_file->filename));
++ filestart += size % 2;
+ }
+
+ return _bfd_get_elt_at_filepos (archive, filestart);
+@@ -1202,6 +1204,44 @@
+ return _bfd_construct_extended_name_table (abfd, false, tabloc, tablen);
+ }
+
++/* 4.4BSD: frob short names, but leave extended name until write time. */
++
++boolean
++_bfd_archive_bsd44_construct_extended_name_table (abfd, tabloc, tablen, name)
++ bfd *abfd;
++ char **tabloc;
++ bfd_size_type *tablen;
++ const char **name;
++{
++ unsigned int maxname = abfd->xvec->ar_max_namelen;
++ bfd *current;
++
++ for (current = abfd->archive_head; current != NULL; current = current->next)
++ {
++ const char *normal;
++ unsigned int thislen;
++
++ normal = normalize (current, current->filename);
++ if (normal == NULL)
++ return false;
++
++ thislen = strlen (normal);
++ if (((thislen > maxname) || (strchr(normal, ' ') != NULL))
++ && ((bfd_get_file_flags (abfd) & BFD_TRADITIONAL_FORMAT) == 0))
++ {
++ struct ar_hdr *hdr = arch_hdr (current);
++ sprintf ((hdr->ar_name), "#1/%-12ld", (long) thislen);
++ hdr->ar_name[15] = ' ';
++ sprintf ((hdr->ar_size), "%-9ld", (long) arelt_size(current) + thislen);
++ hdr->ar_size[9] = ' ';
++ }
++ }
++
++ *name = *tabloc = NULL;
++ *tablen = 0;
++ return true;
++}
++
+ /* Build an SVR4 style extended name table. */
+
+ boolean
+@@ -1371,8 +1411,12 @@
+
+ /* Goddamned sprintf doesn't permit MAXIMUM field lengths */
+ sprintf ((hdr->ar_date), "%-12ld", (long) status.st_mtime);
+- sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid);
+- sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid);
++ if (status.st_uid > 65535U)
++ fprintf (stderr, "%s: uid %ld truncated to 16 bits\n", filename, status.st_uid);
++ sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid & 0xffffU);
++ if (status.st_gid > 65535U)
++ fprintf (stderr, "%s: gid %ld truncated to 16 bits\n", filename, status.st_gid);
++ sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid & 0xffffU);
+ sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode);
+ sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size);
+ /* Correct for a lossage in sprintf whereby it null-terminates. I cannot
+@@ -1654,12 +1698,22 @@
+ for (current = arch->archive_head; current; current = current->next)
+ {
+ char buffer[DEFAULT_BUFFERSIZE];
+- unsigned int remaining = arelt_size (current);
++ unsigned int saved_size = arelt_size (current);
++ unsigned int remaining = saved_size;
+ struct ar_hdr *hdr = arch_hdr (current);
+
+ /* write ar header */
+ if (bfd_write ((char *) hdr, 1, sizeof (*hdr), arch) != sizeof (*hdr))
+ return false;
++ /* write filename if it is a 4.4BSD extended file, and add to size */
++ if (!strncmp (hdr->ar_name, "#1/", 3))
++ {
++ const char *normal = normalize (current, current->filename);
++ unsigned int thislen = strlen (normal);
++ if (bfd_write (normal, 1, thislen, arch) != thislen)
++ return false;
++ saved_size += thislen;
++ }
+ if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
+ return false;
+ while (remaining)
+@@ -1678,7 +1732,7 @@
+ return false;
+ remaining -= amt;
+ }
+- if ((arelt_size (current) % 2) == 1)
++ if ((saved_size % 2) == 1)
+ {
+ if (bfd_write ("\012", 1, 1, arch) != 1)
+ return false;
+@@ -1914,8 +1968,11 @@
+ {
+ do
+ {
+- firstreal += arelt_size (current) + sizeof (struct ar_hdr);
+- firstreal += firstreal % 2;
++ unsigned int size = arelt_size (current);
++ if (!strncmp(arch_hdr (current)->ar_name, "#1/", 3))
++ size += strlen(normalize(current, current->filename));
++ firstreal += size + sizeof (struct ar_hdr);
++ firstreal += size % 2;
+ current = current->next;
+ }
+ while (current != (bfd *) (map[count]).pos);
+--- ./bfd/libbfd-in.h.orig Fri May 1 11:48:12 1998
++++ ./bfd/libbfd-in.h Mon Dec 28 17:43:21 1998
+@@ -219,6 +219,8 @@
+ _bfd_slurp_extended_name_table
+ extern boolean _bfd_archive_bsd_construct_extended_name_table
+ PARAMS ((bfd *, char **, bfd_size_type *, const char **));
++extern boolean _bfd_archive_bsd44_construct_extended_name_table
++ PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+ #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
+ #define _bfd_archive_bsd_write_armap bsd_write_armap
+ #define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
+--- ./bfd/libbfd.h.orig Fri May 1 11:48:12 1998
++++ ./bfd/libbfd.h Mon Dec 28 17:43:21 1998
+@@ -219,6 +219,8 @@
+ _bfd_slurp_extended_name_table
+ extern boolean _bfd_archive_bsd_construct_extended_name_table
+ PARAMS ((bfd *, char **, bfd_size_type *, const char **));
++extern boolean _bfd_archive_bsd44_construct_extended_name_table
++ PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+ #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
+ #define _bfd_archive_bsd_write_armap bsd_write_armap
+ #define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
+--- bfd/netbsd.h.orig Mon Jan 4 09:58:12 1999
++++ bfd/netbsd.h Mon Jan 4 09:58:37 1999
+@@ -66,6 +66,8 @@
+ #define MY_write_object_contents MY(write_object_contents)
+ static boolean MY(write_object_contents) PARAMS ((bfd *abfd));
+ #define MY_text_includes_header 1
++#define MY_construct_extended_name_table \
++ _bfd_archive_bsd44_construct_extended_name_table
+
+ #include "aout-target.h"
+
diff --git a/cross/binutils/patches/patch-arrays b/cross/binutils/patches/patch-arrays
new file mode 100644
index 00000000000..81d785810c8
--- /dev/null
+++ b/cross/binutils/patches/patch-arrays
@@ -0,0 +1,81 @@
+--- ./bfd/libbfd-in.h.orig Fri May 1 11:48:12 1998
++++ ./bfd/libbfd-in.h Mon Dec 28 17:43:21 1998
+@@ -496,7 +498,7 @@
+
+ /* List of supported target vectors, and the default vector (if
+ bfd_default_vector[0] is NULL, there is no default). */
+-extern const bfd_target * const bfd_target_vector[];
++extern const bfd_target * const *bfd_target_vector;
+ extern const bfd_target *bfd_default_vector[];
+
+ /* Functions shared by the ECOFF and MIPS ELF backends, which have no
+--- ./bfd/libbfd.h.orig Fri May 1 11:48:12 1998
++++ ./bfd/libbfd.h Mon Dec 28 17:43:21 1998
+@@ -496,7 +498,7 @@
+
+ /* List of supported target vectors, and the default vector (if
+ bfd_default_vector[0] is NULL, there is no default). */
+-extern const bfd_target * const bfd_target_vector[];
++extern const bfd_target * const *bfd_target_vector;
+ extern const bfd_target *bfd_default_vector[];
+
+ /* Functions shared by the ECOFF and MIPS ELF backends, which have no
+--- ./bfd/targets.c.orig Fri May 1 11:48:16 1998
++++ ./bfd/targets.c Mon Dec 28 17:43:23 1998
+@@ -611,7 +612,7 @@
+ extern const bfd_target trad_core_vec;
+ extern const bfd_target ptrace_core_vec;
+
+-const bfd_target * const bfd_target_vector[] = {
++static const bfd_target * const _bfd_target_vector[] = {
+
+ #ifdef SELECT_VECS
+
+@@ -841,6 +846,7 @@
+
+ NULL /* end of list marker */
+ };
++const bfd_target * const *bfd_target_vector = _bfd_target_vector;
+
+ /* bfd_default_vector[0] contains either the address of the default vector,
+ if there is one, or zero if there isn't. */
+--- ./binutils/bucomm.c.orig Fri May 1 11:49:31 1998
++++ ./binutils/bucomm.c Tue Dec 21 07:30:13 1999
+@@ -137,7 +137,7 @@
+ const char *name;
+ FILE *f;
+ {
+- extern bfd_target *bfd_target_vector[];
++ extern bfd_target **bfd_target_vector;
+ int t;
+
+ if (name == NULL)
+--- ./binutils/objdump.c.orig Fri May 1 11:49:34 1998
++++ ./binutils/objdump.c Tue Dec 21 07:30:13 1999
+@@ -2466,7 +2466,7 @@
+ static void
+ display_target_list ()
+ {
+- extern bfd_target *bfd_target_vector[];
++ extern bfd_target **bfd_target_vector;
+ char *dummy_name;
+ int t;
+
+@@ -2512,7 +2512,7 @@
+ int first;
+ int last;
+ {
+- extern bfd_target *bfd_target_vector[];
++ extern bfd_target **bfd_target_vector;
+ int t, a;
+ char *dummy_name;
+
+@@ -2579,7 +2579,7 @@
+ display_target_tables ()
+ {
+ int t, columns;
+- extern bfd_target *bfd_target_vector[];
++ extern bfd_target **bfd_target_vector;
+ char *colum;
+
+ columns = 0;
diff --git a/cross/binutils/pkg/COMMENT b/cross/binutils/pkg/COMMENT
new file mode 100644
index 00000000000..24bffdaff19
--- /dev/null
+++ b/cross/binutils/pkg/COMMENT
@@ -0,0 +1 @@
+Unified GNU binutils for cross build environments
diff --git a/cross/binutils/pkg/DESCR b/cross/binutils/pkg/DESCR
new file mode 100644
index 00000000000..5fd5e962f46
--- /dev/null
+++ b/cross/binutils/pkg/DESCR
@@ -0,0 +1,3 @@
+The cross-binutils pkg is used only by the other `cross' pkgs. The
+binutils provides various binary manipulation utilities as well as the GNU
+linker. (The assembler is bundled with each individual cross pkg.)
diff --git a/cross/binutils/pkg/PLIST b/cross/binutils/pkg/PLIST
new file mode 100644
index 00000000000..c377ecae0c6
--- /dev/null
+++ b/cross/binutils/pkg/PLIST
@@ -0,0 +1,115 @@
+@comment $NetBSD: PLIST,v 1.1 1999/01/04 22:37:32 tv Exp $
+lib/ldscripts/elf32_sparc.x
+lib/ldscripts/elf32_sparc.xbn
+lib/ldscripts/elf32_sparc.xn
+lib/ldscripts/elf32_sparc.xr
+lib/ldscripts/elf32_sparc.xs
+lib/ldscripts/elf32_sparc.xu
+lib/ldscripts/elf32lmip.x
+lib/ldscripts/elf32lmip.xbn
+lib/ldscripts/elf32lmip.xn
+lib/ldscripts/elf32lmip.xr
+lib/ldscripts/elf32lmip.xs
+lib/ldscripts/elf32lmip.xu
+lib/ldscripts/elf32lppc.x
+lib/ldscripts/elf32lppc.xbn
+lib/ldscripts/elf32lppc.xn
+lib/ldscripts/elf32lppc.xr
+lib/ldscripts/elf32lppc.xs
+lib/ldscripts/elf32lppc.xu
+lib/ldscripts/elf32ppc.x
+lib/ldscripts/elf32ppc.xbn
+lib/ldscripts/elf32ppc.xn
+lib/ldscripts/elf32ppc.xr
+lib/ldscripts/elf32ppc.xs
+lib/ldscripts/elf32ppc.xu
+lib/ldscripts/elf64_sparc.x
+lib/ldscripts/elf64_sparc.xbn
+lib/ldscripts/elf64_sparc.xn
+lib/ldscripts/elf64_sparc.xr
+lib/ldscripts/elf64_sparc.xs
+lib/ldscripts/elf64_sparc.xu
+lib/ldscripts/elf64alpha.x
+lib/ldscripts/elf64alpha.xbn
+lib/ldscripts/elf64alpha.xn
+lib/ldscripts/elf64alpha.xr
+lib/ldscripts/elf64alpha.xs
+lib/ldscripts/elf64alpha.xu
+lib/ldscripts/elf_i386.x
+lib/ldscripts/elf_i386.xbn
+lib/ldscripts/elf_i386.xn
+lib/ldscripts/elf_i386.xr
+lib/ldscripts/elf_i386.xs
+lib/ldscripts/elf_i386.xu
+lib/ldscripts/i386go32.x
+lib/ldscripts/i386go32.xbn
+lib/ldscripts/i386go32.xn
+lib/ldscripts/i386go32.xr
+lib/ldscripts/i386go32.xu
+lib/ldscripts/i386linux.x
+lib/ldscripts/i386linux.xbn
+lib/ldscripts/i386linux.xn
+lib/ldscripts/i386linux.xr
+lib/ldscripts/i386linux.xu
+lib/ldscripts/i386nbsd.x
+lib/ldscripts/i386nbsd.xbn
+lib/ldscripts/i386nbsd.xn
+lib/ldscripts/i386nbsd.xr
+lib/ldscripts/i386nbsd.xu
+lib/ldscripts/i386nw.x
+lib/ldscripts/i386nw.xbn
+lib/ldscripts/i386nw.xn
+lib/ldscripts/i386nw.xr
+lib/ldscripts/i386nw.xs
+lib/ldscripts/i386nw.xu
+lib/ldscripts/i386pe.x
+lib/ldscripts/i386pe.xbn
+lib/ldscripts/i386pe.xn
+lib/ldscripts/i386pe.xr
+lib/ldscripts/i386pe.xu
+lib/ldscripts/m68kelf.x
+lib/ldscripts/m68kelf.xbn
+lib/ldscripts/m68kelf.xn
+lib/ldscripts/m68kelf.xr
+lib/ldscripts/m68kelf.xs
+lib/ldscripts/m68kelf.xu
+lib/ldscripts/m68knbsd.x
+lib/ldscripts/m68knbsd.xbn
+lib/ldscripts/m68knbsd.xn
+lib/ldscripts/m68knbsd.xr
+lib/ldscripts/m68knbsd.xu
+lib/ldscripts/sparcnbsd.x
+lib/ldscripts/sparcnbsd.xbn
+lib/ldscripts/sparcnbsd.xn
+lib/ldscripts/sparcnbsd.xr
+lib/ldscripts/sparcnbsd.xu
+lib/ldscripts/sun3.x
+lib/ldscripts/sun3.xbn
+lib/ldscripts/sun3.xn
+lib/ldscripts/sun3.xr
+lib/ldscripts/sun3.xu
+lib/ldscripts/sun4.x
+lib/ldscripts/sun4.xbn
+lib/ldscripts/sun4.xn
+lib/ldscripts/sun4.xr
+lib/ldscripts/sun4.xu
+@unexec rmdir %D/lib/ldscripts 2>/dev/null || true
+lib/libbfd-2.9.1.so.0.0
+lib/libbfd.a
+lib/libopcodes-2.9.1.so.0.0
+lib/libopcodes.a
+libexec/binutils/addr2line
+libexec/binutils/ar
+libexec/binutils/dlltool
+libexec/binutils/gprof
+libexec/binutils/ld
+libexec/binutils/nlmconv
+libexec/binutils/nm
+libexec/binutils/objcopy
+libexec/binutils/objdump
+libexec/binutils/ranlib
+libexec/binutils/size
+libexec/binutils/strings
+libexec/binutils/strip
+libexec/binutils/windres
+@dirrm libexec/binutils
diff --git a/cross/i386-linux/Makefile b/cross/i386-linux/Makefile
index 8e3570db00e..3e37a6dbd08 100644
--- a/cross/i386-linux/Makefile
+++ b/cross/i386-linux/Makefile
@@ -1,17 +1,21 @@
-# $NetBSD: Makefile,v 1.2 1998/08/23 20:40:23 frueauf Exp $
+# $NetBSD: Makefile,v 1.3 1999/01/04 22:37:32 tv Exp $
#
-DISTVERSION= 2.0.7.0
+DISTVERSION= 2.0.7.1
DISTFILES= ${LINUXDEVEL_FILES}
EXTRACT_ONLY= # none of the RPM files
-MASTER_SITES= ftp://ftp.redhat.com/pub/redhat/redhat-5.1/i386/RedHat/RPMS/ \
- ftp://ftp.digital.com/pub/linux/redhat/redhat-5.1/i386/RedHat/RPMS/
+MASTER_SITES= ftp://ftp.cdrom.com/pub/linux/redhat/redhat-5.1/i386/RedHat/RPMS/
MAINTAINER= packages@netbsd.org
BUILD_DEPENDS= rpm2cpio:../../misc/rpm
-USE_CROSS_GNU= yes
+WRKSRC= ${WRKDIR}
+
+USE_CROSS_BINUTILS= yes
+BINUTILS_GNUTARGET= elf32-i386
+BINUTILS_LDEMULATION= elf-i386
+USE_CROSS_EGCS= yes
LINUXDEVEL_FILES= glibc-2.0.7-13.i386.rpm \
glibc-devel-2.0.7-13.i386.rpm \
@@ -40,7 +44,7 @@ post-extract:
libutil; do \
${LN} -sf $$so.so.* $$so.so; \
done
- @${LN} -f ${SYS_LIB}/crt* ${WRKSRC}/gcc/
+ @${LN} -f ${SYS_LIB}/crt* ${EGCS_WRKSRC}/gcc/
post-patch:
@${RM} -f ${SYS_LIB}/*.orig
diff --git a/cross/i386-linux/patches/patch-aa b/cross/i386-linux/patches/patch-aa
index 40a93fb69ae..6031ebaf71e 100644
--- a/cross/i386-linux/patches/patch-aa
+++ b/cross/i386-linux/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.1 1998/08/14 00:10:45 tv Exp $
+$NetBSD: patch-aa,v 1.2 1999/01/04 22:37:33 tv Exp $
---- ../usr/lib/libc.so.orig Thu Aug 13 12:00:12 1998
-+++ ../usr/lib/libc.so Thu Aug 13 12:00:53 1998
+--- usr/lib/libc.so.orig Thu Aug 13 12:00:12 1998
++++ usr/lib/libc.so Thu Aug 13 12:00:53 1998
@@ -1,4 +1,4 @@
/* GNU ld script
Use the shared library, but some functions are only in
diff --git a/cross/i386-linux/pkg/PLIST b/cross/i386-linux/pkg/PLIST
index 0b7c1fc3b48..800c9fc5920 100644
--- a/cross/i386-linux/pkg/PLIST
+++ b/cross/i386-linux/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 1998/08/23 20:23:54 frueauf Exp $
+@comment $NetBSD: PLIST,v 1.3 1999/01/04 22:37:33 tv Exp $
${TARGET_ARCH}/include/_G_config.h
${TARGET_ARCH}/include/__math.h
${TARGET_ARCH}/include/a.out.h
@@ -687,3 +687,17 @@ lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/crtbegin.o
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/crtbeginS.o
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/crtend.o
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/crtendS.o
+@dirrm ${TARGET_ARCH}/include/arpa
+@dirrm ${TARGET_ARCH}/include/gnu
+@dirrm ${TARGET_ARCH}/include/net
+@dirrm ${TARGET_ARCH}/include/netinet
+@dirrm ${TARGET_ARCH}/include/netipx
+@dirrm ${TARGET_ARCH}/include/nfs
+@dirrm ${TARGET_ARCH}/include/protocols
+@dirrm ${TARGET_ARCH}/include/rpc
+@dirrm ${TARGET_ARCH}/include/rpcsvc
+@dirrm ${TARGET_ARCH}/include/sys
+@dirrm ${TARGET_ARCH}/include/asm
+@dirrm ${TARGET_ARCH}/include/linux/modules
+@dirrm ${TARGET_ARCH}/include/linux
+@dirrm ${TARGET_ARCH}/include/scsi
diff --git a/cross/i386-linuxglibc1/Makefile b/cross/i386-linuxglibc1/Makefile
index 05fdacd9e0a..beb1b8fc701 100644
--- a/cross/i386-linuxglibc1/Makefile
+++ b/cross/i386-linuxglibc1/Makefile
@@ -1,17 +1,19 @@
-# $NetBSD: Makefile,v 1.2 1998/08/23 20:43:41 frueauf Exp $
+# $NetBSD: Makefile,v 1.3 1999/01/04 22:37:33 tv Exp $
#
-DISTVERSION= 5.3.12.0
+DISTVERSION= 5.3.12.1
DISTFILES= ${LINUXDEVEL_FILES}
EXTRACT_ONLY= # none of the RPM files
-MASTER_SITES= ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/ \
- ftp://ftp.digital.com/pub/linux/redhat/redhat-4.2/i386/RedHat/RPMS/
+MASTER_SITES= ftp://ftp.cdrom.com/pub/linux/redhat/redhat-4.2/i386/RedHat/RPMS/
MAINTAINER= packages@netbsd.org
BUILD_DEPENDS= rpm2cpio:../../misc/rpm
-USE_CROSS_GNU= yes
+USE_CROSS_BINUTILS= yes
+BINUTILS_GNUTARGET= elf32-i386
+BINUTILS_LDEMULATION= elf_i386
+USE_CROSS_EGCS= yes
LINUXDEVEL_FILES= libc-5.3.12-18.i386.rpm \
libc-devel-5.3.12-18.i386.rpm \
@@ -36,6 +38,6 @@ post-extract:
@cd ${WRKDIR}/usr/src/linux-2.0.30/include && \
${MV} -f asm-i386 ${WRKDIR}/usr/include/asm && \
${MV} -f linux scsi ${WRKDIR}/usr/include/
- @${LN} -f ${WRKDIR}/usr/lib/crt*.o ${WRKSRC}/gcc/
+ @${LN} -f ${WRKDIR}/usr/lib/crt*.o ${EGCS_WRKSRC}/gcc/
.include "../COMMON/cross.mk"
diff --git a/cross/i386-linuxglibc1/files/md5 b/cross/i386-linuxglibc1/files/md5
index ace4c3e3dc8..4708bcacb54 100644
--- a/cross/i386-linuxglibc1/files/md5
+++ b/cross/i386-linuxglibc1/files/md5
@@ -1,8 +1,9 @@
-$NetBSD: md5,v 1.1 1998/08/12 02:44:16 tv Exp $
+$NetBSD: md5,v 1.2 1999/01/04 22:37:33 tv Exp $
MD5 (libc-5.3.12-18.i386.rpm) = 0f14dc6e43739d10148af57423a14c53
MD5 (libc-devel-5.3.12-18.i386.rpm) = c03ad5d961928d56cf90be35e827ef6e
MD5 (libc-static-5.3.12-18.i386.rpm) = 0662b25878f2c4bb3c10ded7fcb79c92
MD5 (kernel-headers-2.0.30-2.i386.rpm) = cc3a5ce8114f7885b483e057180eabee
MD5 (binutils-2.9.1.tar.gz) = 8f9ad1a6e96742fd3069479171a63c22
-MD5 (egcs-19980803.tar.gz) = 3c6e28dd25140187e322c890231bfc72
+MD5 (egcs-1.1.1.tar.gz) = 0b3f0e856dcbb2241c183081fc7271af
+MD5 (egcs-1.1.1-NetBSD-19980104.diff.gz) = f6496aa337d9e7289b91cc834d7d3401
diff --git a/cross/i386-linuxglibc1/pkg/PLIST b/cross/i386-linuxglibc1/pkg/PLIST
index 18e62766c75..939a3d0107f 100644
--- a/cross/i386-linuxglibc1/pkg/PLIST
+++ b/cross/i386-linuxglibc1/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 1998/08/12 02:44:16 tv Exp $
+@comment $NetBSD: PLIST,v 1.2 1999/01/04 22:37:33 tv Exp $
${TARGET_ARCH}/include/_G_config.h
${TARGET_ARCH}/include/a.out.h
${TARGET_ARCH}/include/alloca.h
@@ -583,22 +583,22 @@ lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/crtbegin.o
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/crtbeginS.o
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/crtend.o
lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/crtendS.o
-@dirrm i386-linuxglibc1/include/arpa
-@dirrm i386-linuxglibc1/include/bsd/sys
-@dirrm i386-linuxglibc1/include/bsd
-@dirrm i386-linuxglibc1/include/gnu
-@dirrm i386-linuxglibc1/include/net
-@dirrm i386-linuxglibc1/include/i386
-@dirrm i386-linuxglibc1/include/m68k
-@dirrm i386-linuxglibc1/include/netinet
-@dirrm i386-linuxglibc1/include/pthread/mit/sys
-@dirrm i386-linuxglibc1/include/pthread/mit
-@dirrm i386-linuxglibc1/include/pthread
-@dirrm i386-linuxglibc1/include/protocols
-@dirrm i386-linuxglibc1/include/rpc
-@dirrm i386-linuxglibc1/include/rpcsvc
-@dirrm i386-linuxglibc1/include/sys
-@dirrm i386-linuxglibc1/include/asm
-@dirrm i386-linuxglibc1/include/linux/modules
-@dirrm i386-linuxglibc1/include/linux
-@dirrm i386-linuxglibc1/include/scsi
+@dirrm ${TARGET_ARCH}/include/arpa
+@dirrm ${TARGET_ARCH}/include/bsd/sys
+@dirrm ${TARGET_ARCH}/include/bsd
+@dirrm ${TARGET_ARCH}/include/gnu
+@dirrm ${TARGET_ARCH}/include/net
+@dirrm ${TARGET_ARCH}/include/i386
+@dirrm ${TARGET_ARCH}/include/m68k
+@dirrm ${TARGET_ARCH}/include/netinet
+@dirrm ${TARGET_ARCH}/include/pthread/mit/sys
+@dirrm ${TARGET_ARCH}/include/pthread/mit
+@dirrm ${TARGET_ARCH}/include/pthread
+@dirrm ${TARGET_ARCH}/include/protocols
+@dirrm ${TARGET_ARCH}/include/rpc
+@dirrm ${TARGET_ARCH}/include/rpcsvc
+@dirrm ${TARGET_ARCH}/include/sys
+@dirrm ${TARGET_ARCH}/include/asm
+@dirrm ${TARGET_ARCH}/include/linux/modules
+@dirrm ${TARGET_ARCH}/include/linux
+@dirrm ${TARGET_ARCH}/include/scsi
diff --git a/cross/i386-msdosdjgpp/Makefile b/cross/i386-msdosdjgpp/Makefile
index a0ca7dca2ab..6cf1aac2a0e 100644
--- a/cross/i386-msdosdjgpp/Makefile
+++ b/cross/i386-msdosdjgpp/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.5 1998/08/26 19:35:37 tv Exp $
+# $NetBSD: Makefile,v 1.6 1999/01/04 22:37:33 tv Exp $
#
-DISTVERSION= 2.01.1
+DISTVERSION= 2.02.0
DISTFILES= ${DJGPP_FILES}
EXTRACT_ONLY= # none of the djgpp files
MASTER_SITES= ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/ \
@@ -12,40 +12,44 @@ HOMEPAGE= http://www.delorie.com/djgpp/
BUILD_DEPENDS= unzip:../../archivers/unzip
-USE_CROSS_GNU= yes
+WRKSRC= ${WRKDIR}/djgpp
-DJGPP_FILES= djcrx201.zip wmemu2b.zip
+USE_CROSS_BINUTILS= yes
+BINUTILS_GNUTARGET= coff-go32
+BINUTILS_LDEMULATION= i386go32
+USE_CROSS_EGCS= yes
+
+DJGPP_FILES= djcrx202.zip wmemu2b.zip
TARGET_ARCH= i386-msdosdjgpp
-SYS_INCLUDE= ${WRKDIR}/djgpp/include
-SYS_LIB= ${WRKDIR}/djgpp/lib
+SYS_INCLUDE= ${WRKSRC}/include
+SYS_LIB= ${WRKSRC}/lib
post-extract:
- @${MKDIR} ${WRKDIR}/djgpp
- @cd ${WRKDIR}/djgpp; \
+ @${MKDIR} ${WRKSRC}
+ @cd ${WRKSRC}; \
for file in ${DJGPP_FILES}; do \
unzip -Loq ${_DISTDIR}/$$file; \
done; \
- echo 'Stripping CR-LF in includes...'; \
for file in `find include -type f`; do \
${CAT} $$file | col >$$file.new; \
${MV} -f $$file.new $$file; \
done
- @${LN} -f ${SYS_LIB}/crt0.o ${WRKSRC}/gcc/
+ @${LN} -f ${SYS_LIB}/crt0.o ${EGCS_WRKSRC}/gcc/
@${RM} -f ${SYS_LIB}/djgpp.djl ${SYS_LIB}/specs
post-patch:
- @${RM} -f ${SYS_INCLUDE}/sys/djtypes.h.orig
+ @${RM} -f ${SYS_INCLUDE}/sys/*.orig
-post-build:
- cd ${WRKDIR}/djgpp/src/stub && ${LINK.c} -o stubedit stubedit.c
- cd ${WRKDIR}/djgpp/src/stub && ${LINK.c} -o stubify stubify.c
+do-build:
+ cd ${WRKSRC}/src/stub && ${LINK.c} -o stubedit stubedit.c
+ cd ${WRKSRC}/src/stub && ${LINK.c} -o stubify stubify.c
-post-install:
- ${INSTALL_PROGRAM} ${WRKDIR}/djgpp/src/stub/stubedit ${TARGET_DIR}/bin/
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/stub/stubedit ${TARGET_DIR}/bin/
${LN} -f ${TARGET_DIR}/bin/stubedit ${PREFIX}/bin/${TARGET_ARCH}-stubedit
- ${INSTALL_PROGRAM} ${WRKDIR}/djgpp/src/stub/stubify ${TARGET_DIR}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/stub/stubify ${TARGET_DIR}/bin/
${LN} -f ${TARGET_DIR}/bin/stubedit ${PREFIX}/bin/${TARGET_ARCH}-stubify
- ${INSTALL_DATA} ${WRKDIR}/djgpp/bin/wmemu387.dxe ${TARGET_DIR}/lib/
+ ${INSTALL_DATA} ${WRKSRC}/bin/wmemu387.dxe ${TARGET_DIR}/lib/
.include "../COMMON/cross.mk"
diff --git a/cross/i386-msdosdjgpp/files/md5 b/cross/i386-msdosdjgpp/files/md5
index a98bb40a69b..12936425049 100644
--- a/cross/i386-msdosdjgpp/files/md5
+++ b/cross/i386-msdosdjgpp/files/md5
@@ -1,7 +1,6 @@
-$NetBSD: md5,v 1.1 1998/08/12 12:30:59 tv Exp $
+$NetBSD: md5,v 1.2 1999/01/04 22:37:33 tv Exp $
-MD5 (csdpmi4b.zip) = ef5ecf6cb7911a12bade9b2081ce82ab
-MD5 (djcrx201.zip) = 384d9b738457892fe35cdee159a425ee
+MD5 (djcrx202.zip) = 109544675694dcf8ea2511e5942eaf44
MD5 (wmemu2b.zip) = 463860356d5d7a48777f606dbae95b91
+MD5 (egcs-1.1.1.tar.gz) = 0b3f0e856dcbb2241c183081fc7271af
MD5 (binutils-2.9.1.tar.gz) = 8f9ad1a6e96742fd3069479171a63c22
-MD5 (egcs-19980803.tar.gz) = 3c6e28dd25140187e322c890231bfc72
diff --git a/cross/i386-msdosdjgpp/patches/patch-ab b/cross/i386-msdosdjgpp/patches/patch-ab
index 714aa58f398..aca3ffd39dc 100644
--- a/cross/i386-msdosdjgpp/patches/patch-ab
+++ b/cross/i386-msdosdjgpp/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 1998/08/13 13:30:57 tv Exp $
+$NetBSD: patch-ab,v 1.3 1999/01/04 22:37:34 tv Exp $
---- ../djgpp/include/sys/djtypes.h.orig Mon Aug 3 09:21:37 1998
-+++ ../djgpp/include/sys/djtypes.h Mon Aug 3 09:36:57 1998
-@@ -2,15 +2,21 @@
+--- include/sys/djtypes.h.orig Sun Jan 3 15:57:01 1999
++++ include/sys/djtypes.h Sun Jan 3 15:57:51 1999
+@@ -3,22 +3,28 @@
#ifndef __DJ_sys_djtypes_h_
#define __DJ_sys_djtypes_h_
@@ -22,8 +22,15 @@ $NetBSD: patch-ab,v 1.2 1998/08/13 13:30:57 tv Exp $
#define __DJ_time_t typedef unsigned int time_t;
#define __DJ_uid_t typedef int uid_t;
-#define __DJ_va_list typedef void *va_list;
--#define __DJ_wchar_t typedef int wchar_t;
+#define __DJ_va_list /* provided by gcc stddef.h */
-+#define __DJ_wchar_t /* provided by gcc stddef.h */
+ #if defined(__cplusplus) && ( (__GNUC_MINOR__ >= 8 && __GNUC__ == 2 ) || __GNUC__ >= 3 )
+ /* wchar_t is now a keyword in C++ */
+ #define __DJ_wchar_t
+ #else
+ /* but remains a typedef in C */
+-#define __DJ_wchar_t typedef int wchar_t;
++#define __DJ_wchar_t /* provided by gcc stddef.h */
#endif
+
+ #define __DJ_wint_t typedef int wint_t;
diff --git a/cross/i386-msdosdjgpp/pkg/PLIST b/cross/i386-msdosdjgpp/pkg/PLIST
index e79f5a5d06f..277bd8ea5f4 100644
--- a/cross/i386-msdosdjgpp/pkg/PLIST
+++ b/cross/i386-msdosdjgpp/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 1998/08/12 12:31:00 tv Exp $
+@comment $NetBSD: PLIST,v 1.2 1999/01/04 22:37:34 tv Exp $
${TARGET_ARCH}/bin/stubedit
${TARGET_ARCH}/bin/stubify
${TARGET_ARCH}/include/_ansi
@@ -28,11 +28,12 @@ ${TARGET_ARCH}/include/flexlexe.h
${TARGET_ARCH}/include/float.h
${TARGET_ARCH}/include/fnmatch.h
${TARGET_ARCH}/include/ftw.h
-${TARGET_ARCH}/include/getpages.h
+${TARGET_ARCH}/include/getpagesize.h
${TARGET_ARCH}/include/glob.h
${TARGET_ARCH}/include/go32.h
${TARGET_ARCH}/include/gppconio.h
${TARGET_ARCH}/include/grp.h
+${TARGET_ARCH}/include/ieeefp.h
${TARGET_ARCH}/include/inlines/_inline
${TARGET_ARCH}/include/inlines/ctype.ha
${TARGET_ARCH}/include/inlines/ctype.hd
@@ -107,12 +108,14 @@ ${TARGET_ARCH}/include/sys/param.h
${TARGET_ARCH}/include/sys/resource.h
${TARGET_ARCH}/include/sys/segments.h
${TARGET_ARCH}/include/sys/stat.h
+${TARGET_ARCH}/include/sys/sysmacros.h
${TARGET_ARCH}/include/sys/system.h
${TARGET_ARCH}/include/sys/time.h
${TARGET_ARCH}/include/sys/timeb.h
${TARGET_ARCH}/include/sys/times.h
${TARGET_ARCH}/include/sys/types.h
${TARGET_ARCH}/include/sys/utsname.h
+${TARGET_ARCH}/include/sys/version.h
${TARGET_ARCH}/include/sys/vfs.h
${TARGET_ARCH}/include/sys/wait.h
${TARGET_ARCH}/include/termios.h
@@ -122,6 +125,8 @@ ${TARGET_ARCH}/include/unistd.h
${TARGET_ARCH}/include/utime.h
${TARGET_ARCH}/include/values.h
${TARGET_ARCH}/include/varargs.h
+${TARGET_ARCH}/include/wchar.h
+${TARGET_ARCH}/include/wctype.h
${TARGET_ARCH}/lib/crt0.o
${TARGET_ARCH}/lib/dxe.ld
${TARGET_ARCH}/lib/gcrt0.o
@@ -129,7 +134,6 @@ ${TARGET_ARCH}/lib/libc.a
${TARGET_ARCH}/lib/libdbg.a
${TARGET_ARCH}/lib/libemu.a
${TARGET_ARCH}/lib/libg.a
-${TARGET_ARCH}/lib/libgcc.a
${TARGET_ARCH}/lib/libm.a
${TARGET_ARCH}/lib/libpc.a
${TARGET_ARCH}/lib/libwmemu.a