summaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authorkent <kent@pkgsrc.org>2004-03-09 12:19:12 +0000
committerkent <kent@pkgsrc.org>2004-03-09 12:19:12 +0000
commit3fe65ac5381df9f615d651471ae97ba169c32e9d (patch)
tree254805e72bd19cae223ee4c4028247b29c1eebaf /cross
parenta8718bbf20ae514b636b9ac24626c58120622a48 (diff)
downloadpkgsrc-3fe65ac5381df9f615d651471ae97ba169c32e9d.tar.gz
update based gcc and binutils.
- gcc 2.95.2 -> 3.3.3 - binutils 030425 -> 2.15.90 (20040222)
Diffstat (limited to 'cross')
-rw-r--r--cross/i386-netbsdpe/Makefile129
-rw-r--r--cross/i386-netbsdpe/PLIST114
-rw-r--r--cross/i386-netbsdpe/distinfo33
-rw-r--r--cross/i386-netbsdpe/files/PLIST-gcc49
-rw-r--r--cross/i386-netbsdpe/files/PLIST-gcc-cxx13
-rw-r--r--cross/i386-netbsdpe/files/PLIST-gcc-cxx-runtime116
-rw-r--r--cross/i386-netbsdpe/files/cross.mk200
-rw-r--r--cross/i386-netbsdpe/files/featuretest.h21
-rw-r--r--cross/i386-netbsdpe/files/i386_limits.h98
-rw-r--r--cross/i386-netbsdpe/files/limits.h87
-rw-r--r--cross/i386-netbsdpe/files/syslimits.h85
-rw-r--r--cross/i386-netbsdpe/patches/binutils-af68
-rw-r--r--cross/i386-netbsdpe/patches/binutils-ag13
-rw-r--r--cross/i386-netbsdpe/patches/binutils-ah14
-rw-r--r--cross/i386-netbsdpe/patches/binutils-ai13
-rw-r--r--cross/i386-netbsdpe/patches/binutils-aj13
-rw-r--r--cross/i386-netbsdpe/patches/binutils-ak12
-rw-r--r--cross/i386-netbsdpe/patches/patch-aa763
-rw-r--r--cross/i386-netbsdpe/patches/patch-ab4
-rw-r--r--cross/i386-netbsdpe/patches/patch-ac13
-rw-r--r--cross/i386-netbsdpe/patches/patch-ad29
-rw-r--r--cross/i386-netbsdpe/patches/patch-ae22
-rw-r--r--cross/i386-netbsdpe/patches/patch-af13
-rw-r--r--cross/i386-netbsdpe/patches/patch-co99
-rw-r--r--cross/i386-netbsdpe/patches/patch-cp44
-rw-r--r--cross/i386-netbsdpe/patches/patch-cq44
-rw-r--r--cross/i386-netbsdpe/patches/patch-de46
-rw-r--r--cross/i386-netbsdpe/patches/patch-ma23
-rw-r--r--cross/i386-netbsdpe/patches/patch-pe610
29 files changed, 491 insertions, 2297 deletions
diff --git a/cross/i386-netbsdpe/Makefile b/cross/i386-netbsdpe/Makefile
index 66aeb9abf11..82ad68af01b 100644
--- a/cross/i386-netbsdpe/Makefile
+++ b/cross/i386-netbsdpe/Makefile
@@ -1,64 +1,121 @@
-# $NetBSD: Makefile,v 1.14 2003/08/25 05:47:12 kent Exp $
-
-DISTVERSION= 1.4.0
-CROSS_DISTFILES= # none
+# $NetBSD: Makefile,v 1.15 2004/03/09 12:19:12 kent Exp $
+DISTVERSION= 3.3.3
MAINTAINER= peace-sacrifice@hauN.org
HOMEPAGE= http://chiharu.hauN.org/peace/
COMMENT= Cross-compile environment for PEACE/i386
# Need NetBSD headers in /usr/include
ONLY_FOR_PLATFORM= NetBSD-1.6[Q-Z]*-* NetBSD-[2-9]*-*
+CONFLICTS= pth-[0-9]* pth-current-[0-9]* pth-syscall-[0-9]*
+DISTNAME= cross-${TARGET_ARCH}-${DISTVERSION}
+CATEGORIES+= cross lang
+USE_CROSSBASE= yes
WRKSRC= ${WRKDIR}/${GCC_DISTNAME}
BU_WRKSRC= ${WRKDIR}/${BINUTILS_DISTNAME}
-
-USE_CROSS_BINUTILS= yes
BINUTILS_GNUTARGET= pe-i386
BINUTILS_LDEMULATION= i386pe
-USE_CROSS_GCC= yes
-GCC_FAKE_RUNTIME= yes
-GCC_CXX= yes
-#GCC_CXX_RUNTIME= yes
-
TARGET_ARCH= i386-netbsdpe
GCC_CONFIGURE_ARGS+= --enable-threads
-CONFLICTS= pth-[0-9]* pth-current-[0-9]* pth-syscall-[0-9]*
-
BINUTILS_EXTRAS= dlltool dllwrap windres
# Mingw pathes
-GCC_WIN32_PATCHBUNDLE= ${GCC_DISTNAME}-x86-win32-patches.tar.gz
-GCC_WIN32_PATCH= ${WRKDIR}/${GCC_DISTNAME}-patches/${GCC_DISTNAME}-x86-win32.diff
-MASTER_SITES+= ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/${GCC_DISTNAME}/patches/
-DISTFILES+= ${GCC_WIN32_PATCHBUNDLE}
+DISTFILES+= gcc-3.3.3-20040217-1-src.diff.gz
+GCC_WIN32_PATCH= ${WRKDIR}/gcc-3.3.3-20040217-1-src.diff
+MASTER_SITES+= ${MASTER_SITE_SOURCEFORGE:=mingw/}
-# SSP patch
-MASTER_SITES+= http://www.trl.ibm.com/projects/security/ssp/gcc2_95_2/
-SSP_PATCH= protector-2.95.2-2.tar.gz
-DISTFILES+= ${SSP_PATCH}
+MESSAGE_SUBST+= CROSSBASE=${CROSSBASE}
+TARGET_DIR= ${PREFIX}/${TARGET_ARCH}
+
+GCC_DISTNAME= gcc-3.3.3
+GCC_INTVERSION= 3.3.3
+MASTER_SITES+= ${MASTER_SITE_GNU:=gcc/releases/gcc-3.3.3/}
+DISTFILES+= ${GCC_DISTNAME}.tar.gz
+USE_GMAKE= yes
+USE_MAKEINFO= YES
+GCC_LANGUAGES= c,c++
+CONFIGURE_ENV= ${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
+GCC_CONFIGURE_ARGS= --with-gnu-ld --with-gnu-as -disable-multilib \
+ --enable-threads=posix --disable-shared --with-system-zlib \
+ --enable-languages=${GCC_LANGUAGES} --with-headers=yes \
+ --target=${TARGET_ARCH} --datadir=${TARGET_DIR}/share
+GCC_MAKE_FLAGS= AS_FOR_TARGET="${AS_FOR_TARGET}" \
+ AR_FOR_TARGET="${AR_FOR_TARGET}" \
+ NM_FOR_TARGET="${NM_FOR_TARGET}" \
+ RANLIB_FOR_TARGET="${RANLIB_FOR_TARGET}"
+# INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
+# INSTALL_PROGRAM="${INSTALL_PROGRAM}"
+GCC_MAKE= ${SETENV} ${MAKE_ENV} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} ${GCC_MAKE_FLAGS}
+WRKOBJ= ${WRKDIR}/obj
+
+BINUTILS_DISTNAME= binutils-2.15.90-20040222-1
+DISTFILES+= ${BINUTILS_DISTNAME}-src.tar.gz
+MASTER_SITES+= ${MASTER_SITE_SOURCEFORGE:=mingw/}
+#MASTER_SITES+= ${MASTER_SITE_GNU:=binutils/}
+#MASTER_SITES+= http://prdownloads.sourceforge.net/mingw/
+#CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld --data-dir=${TARGET_DIR}/share
+BU_WRKSRC= ${WRKDIR}/${BINUTILS_DISTNAME}
+AS_FOR_TARGET= ${WRKOBJ}/gas/as-new
+AR_FOR_TARGET= ${WRKOBJ}/binutils/ar
+NM_FOR_TARGET= ${WRKOBJ}/binutils/nm-new
+RANLIB_FOR_TARGET= ${WRKOBJ}/binutils/ranlib
+LD_FOR_TARGET= ${WRKOBJ}/ld/ld-new
post-extract:
-# cd ${WRKDIR} && ${PAX} -O -rz -s /${GCC_DISTNAME}/toolchain/ \
-# -f ${_DISTDIR}/${GCC_DISTNAME}.tar.gz
- ${PATCH} -d ${WRKSRC} -p1 --forward --quiet -E < ${GCC_WIN32_PATCH}
-# cd ${WRKDIR} && ${PAX} -O -rz -s /${BINUTILS_DISTNAME}/toolchain/ \
-# -f ${_DISTDIR}/${BINUTILS_DISTNAME}.tar.bz2
+ -${PATCH} -d ${WRKSRC} -p1 --forward --quiet -E < ${GCC_WIN32_PATCH}
+ ${CP} ${WRKSRC}/gcc/config/i386/mingw32.h ${WRKSRC}/gcc/config/i386/netbsdpe.h
+ ${CP} ${WRKSRC}/gcc/config/i386/t-cygming ${WRKSRC}/gcc/config/i386/t-netbsdpe
post-patch:
- for i in patches/binutils-*; do \
+ for i in patches/binutils-??; do \
${PATCH} -d ${BU_WRKSRC} --forward --quiet -E < $$i; \
done
- cd ${WRKSRC}/gcc && ${AUTOCONF}
- ${CP} ${WRKDIR}/protector.c ${WRKDIR}/protector.h ${WRKSRC}/gcc/
- ${PATCH} -d ${WRKSRC} --forward --quiet -E < ${WRKDIR}/protector.dif
-# ${PATCH} -d ${WRKSRC} --forward --quiet -E < ${WRKDIR}/protectonly.dif
CFLAGS_FOR_TARGET+= -I${WRKDIR}
post-configure:
- ${CP} ${FILESDIR}/i386_limits.h ${CROSS_SYS_INCLUDE}/machine/limits.h
- ${CP} ${FILESDIR}/syslimits.h ${CROSS_SYS_INCLUDE}/sys/
- ${CP} ${FILESDIR}/featuretest.h ${CROSS_SYS_INCLUDE}/sys/
- ${CP} ${FILESDIR}/limits.h ${CROSS_SYS_INCLUDE}/
${SED} "s/^extern FILE/__declspec(dllimport) FILE/" /usr/include/stdio.h > ${WRKDIR}/stdio.h
-.include "files/cross.mk"
+do-configure:
+# @-mkdir -p ${WRKOBJ}/libiberty
+# @cd ${WRKOBJ}/libiberty && ${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" \
+# CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" \
+# ${WRKSRC}/libiberty/configure --prefix=${PREFIX}
+ @-mkdir -p ${WRKOBJ} ${WRKOBJ}/binutils ${WRKOBJ}/gas ${WRKOBJ}/ld
+ cd ${WRKOBJ} && ${CONFIGURE_ENV} ${BU_WRKSRC}/configure \
+ --prefix=${PREFIX} ${GCC_CONFIGURE_ARGS} --disable-nls
+ cd ${WRKOBJ}/binutils && ${CONFIGURE_ENV} ${BU_WRKSRC}/binutils/configure \
+ --prefix=${PREFIX} ${GCC_CONFIGURE_ARGS} --disable-nls
+ cd ${WRKOBJ}/gas && ${CONFIGURE_ENV} ${BU_WRKSRC}/gas/configure \
+ --prefix=${PREFIX} ${GCC_CONFIGURE_ARGS} --disable-nls
+ cd ${WRKOBJ}/ld && ${CONFIGURE_ENV} ${BU_WRKSRC}/ld/configure \
+ --prefix=${PREFIX} ${GCC_CONFIGURE_ARGS} --disable-nls
+# Build binutils before configuring gcc so that gcc's configure works correctly
+ @cd ${WRKOBJ} && ${GCC_MAKE}
+ @-mkdir -p ${WRKOBJ}/gcc
+ @cd ${WRKOBJ}/gcc && ${CONFIGURE_ENV} ${WRKSRC}/gcc/configure \
+ --prefix=${PREFIX} ${GCC_CONFIGURE_ARGS}
+
+do-build:
+ ${LN} -sf ${AS_FOR_TARGET} ${WRKOBJ}/gcc/as
+ ${LN} -sf ${LD_FOR_TARGET} ${WRKOBJ}/gcc/ld
+ @cd ${WRKOBJ}/gcc && ${GCC_MAKE}
+
+do-install:
+ @cd ${WRKOBJ} && ${GCC_MAKE} installdirs install-binutils \
+ install-gas install-ld
+ @cd ${WRKOBJ}/gas/doc && ${GCC_MAKE} install-man1
+ @cd ${WRKOBJ}/gcc && ${GCC_MAKE} install-common \
+ install-libgcc install-cpp install-po \
+ lang.install-normal install-driver
+ ${INSTALL_DATA_DIR} ${PREFIX}/lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include
+ ${INSTALL_DATA} ${WRKOBJ}/gcc/include/mmintrin.h \
+ ${PREFIX}/lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include
+ ${INSTALL_DATA} ${WRKOBJ}/gcc/include/xmmintrin.h \
+ ${PREFIX}/lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include
+ ${INSTALL_DATA_DIR} ${TARGET_DIR}/include
+ cd ${PREFIX}/bin && ${LN} -sf ${TARGET_ARCH}-gcc ${TARGET_ARCH}-cc
+ cd ${TARGET_DIR}/bin && ${LN} -sf gcc cc
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/cross/i386-netbsdpe/PLIST b/cross/i386-netbsdpe/PLIST
index d4c480b769e..84f4df8f969 100644
--- a/cross/i386-netbsdpe/PLIST
+++ b/cross/i386-netbsdpe/PLIST
@@ -1,7 +1,107 @@
-@comment $NetBSD: PLIST,v 1.2 2002/08/21 12:42:44 kent Exp $
-bin/${TARGET_ARCH}-dlltool
-bin/${TARGET_ARCH}-dllwrap
-bin/${TARGET_ARCH}-windres
-${TARGET_ARCH}/bin/dlltool
-${TARGET_ARCH}/bin/dllwrap
-${TARGET_ARCH}/bin/windres
+@comment $NetBSD: PLIST,v 1.3 2004/03/09 12:19:12 kent Exp $
+bin/i386-netbsdpe-addr2line
+bin/i386-netbsdpe-ar
+bin/i386-netbsdpe-as
+bin/i386-netbsdpe-c++
+bin/i386-netbsdpe-c++filt
+bin/i386-netbsdpe-cc
+bin/i386-netbsdpe-cpp
+bin/i386-netbsdpe-dlltool
+bin/i386-netbsdpe-dllwrap
+bin/i386-netbsdpe-g++
+bin/i386-netbsdpe-gcc
+bin/i386-netbsdpe-gcc-3.3.3
+bin/i386-netbsdpe-gccbug
+bin/i386-netbsdpe-gcov
+bin/i386-netbsdpe-ld
+bin/i386-netbsdpe-nm
+bin/i386-netbsdpe-objcopy
+bin/i386-netbsdpe-objdump
+bin/i386-netbsdpe-ranlib
+bin/i386-netbsdpe-readelf
+bin/i386-netbsdpe-size
+bin/i386-netbsdpe-strings
+bin/i386-netbsdpe-strip
+bin/i386-netbsdpe-windres
+i386-netbsdpe/bin/ar
+i386-netbsdpe/bin/as
+i386-netbsdpe/bin/c++
+i386-netbsdpe/bin/cc
+i386-netbsdpe/bin/dlltool
+i386-netbsdpe/bin/g++
+i386-netbsdpe/bin/gcc
+i386-netbsdpe/bin/ld
+i386-netbsdpe/bin/nm
+i386-netbsdpe/bin/ranlib
+i386-netbsdpe/bin/strip
+i386-netbsdpe/lib/ldscripts/i386pe.x
+i386-netbsdpe/lib/ldscripts/i386pe.xbn
+i386-netbsdpe/lib/ldscripts/i386pe.xn
+i386-netbsdpe/lib/ldscripts/i386pe.xr
+i386-netbsdpe/lib/ldscripts/i386pe.xu
+i386-netbsdpe/share/locale/be/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/ca/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/da/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/de/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/el/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/es/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/fr/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/ja/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/nl/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/sv/LC_MESSAGES/gcc.mo
+i386-netbsdpe/share/locale/tr/LC_MESSAGES/gcc.mo
+lib/gcc-lib/i386-netbsdpe/3.3.3/cc1
+lib/gcc-lib/i386-netbsdpe/3.3.3/cc1plus
+lib/gcc-lib/i386-netbsdpe/3.3.3/collect2
+lib/gcc-lib/i386-netbsdpe/3.3.3/include/mmintrin.h
+lib/gcc-lib/i386-netbsdpe/3.3.3/include/xmmintrin.h
+lib/gcc-lib/i386-netbsdpe/3.3.3/libgcc.a
+lib/gcc-lib/i386-netbsdpe/3.3.3/specs
+man/man1/i386-netbsdpe-addr2line.1
+man/man1/i386-netbsdpe-ar.1
+man/man1/i386-netbsdpe-as.1
+man/man1/i386-netbsdpe-c++filt.1
+man/man1/i386-netbsdpe-dlltool.1
+man/man1/i386-netbsdpe-ld.1
+man/man1/i386-netbsdpe-nlmconv.1
+man/man1/i386-netbsdpe-nm.1
+man/man1/i386-netbsdpe-objcopy.1
+man/man1/i386-netbsdpe-objdump.1
+man/man1/i386-netbsdpe-ranlib.1
+man/man1/i386-netbsdpe-readelf.1
+man/man1/i386-netbsdpe-size.1
+man/man1/i386-netbsdpe-strings.1
+man/man1/i386-netbsdpe-strip.1
+man/man1/i386-netbsdpe-windres.1
+@dirrm lib/gcc-lib/i386-netbsdpe/3.3.3/include
+@dirrm lib/gcc-lib/i386-netbsdpe/3.3.3
+@dirrm lib/gcc-lib/i386-netbsdpe
+@dirrm i386-netbsdpe/share/locale/tr/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/tr
+@dirrm i386-netbsdpe/share/locale/sv/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/sv
+@dirrm i386-netbsdpe/share/locale/nl/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/nl
+@dirrm i386-netbsdpe/share/locale/ja/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/ja
+@dirrm i386-netbsdpe/share/locale/fr/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/fr
+@dirrm i386-netbsdpe/share/locale/es/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/es
+@dirrm i386-netbsdpe/share/locale/el/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/el
+@dirrm i386-netbsdpe/share/locale/de/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/de
+@dirrm i386-netbsdpe/share/locale/da/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/da
+@dirrm i386-netbsdpe/share/locale/ca/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/ca
+@dirrm i386-netbsdpe/share/locale/be/LC_MESSAGES
+@dirrm i386-netbsdpe/share/locale/be
+@dirrm i386-netbsdpe/share/locale
+@dirrm i386-netbsdpe/share
+@dirrm i386-netbsdpe/lib/ldscripts
+@dirrm i386-netbsdpe/lib
+@dirrm i386-netbsdpe/include
+@dirrm i386-netbsdpe/bin
+@dirrm i386-netbsdpe
diff --git a/cross/i386-netbsdpe/distinfo b/cross/i386-netbsdpe/distinfo
index ca0e7912e82..840251ecc62 100644
--- a/cross/i386-netbsdpe/distinfo
+++ b/cross/i386-netbsdpe/distinfo
@@ -1,20 +1,15 @@
-$NetBSD: distinfo,v 1.7 2003/04/27 13:50:09 kent Exp $
+$NetBSD: distinfo,v 1.8 2004/03/09 12:19:12 kent Exp $
-SHA1 (gcc-2.95.2-x86-win32-patches.tar.gz) = 8018d7a1c32211fc7a2f413cd49c422f7ccfd2ec
-Size (gcc-2.95.2-x86-win32-patches.tar.gz) = 217965 bytes
-SHA1 (protector-2.95.2-2.tar.gz) = 7b906b45e4e08e414ec8bca611d5371d82994401
-Size (protector-2.95.2-2.tar.gz) = 17034 bytes
-SHA1 (binutils-030425.tar.bz2) = a6355ca1482c8feb334c62726c2663213c15649c
-Size (binutils-030425.tar.bz2) = 10847130 bytes
-SHA1 (gcc-2.95.2.tar.gz) = c3da103de3fa97c78ccc1b4fdc29fa25bf26a6c8
-Size (gcc-2.95.2.tar.gz) = 12885815 bytes
-SHA1 (patch-aa) = cd270eb18e0b65641a416c1215388dc9fb91f33d
-SHA1 (patch-ab) = 67dca1c7321895f200de2527ec4195a120b6eab0
-SHA1 (patch-ac) = 03d5220ff8fb9e661069d08247fd5eab89b670e0
-SHA1 (patch-ad) = eed88816a84246659a9179d0cda6bc4ac967e4c2
-SHA1 (patch-co) = 8a6ca102d76ebda1dc4edf5d65da2a5d4cedb183
-SHA1 (patch-cp) = f94a5dfdb13cf00cc06854617defa56e8370d3b8
-SHA1 (patch-cq) = f897fef519f7966de094d25954073b9a2a793891
-SHA1 (patch-de) = 8618f7e14bc76cb0d45ebe52bbd8f71b5e64bb2a
-SHA1 (patch-ma) = 0af3fc37c168673daada463aca9c052f756a3c4f
-SHA1 (patch-pe) = 4875256eed89dcb9b635c97c70cbdfce49ddd1b9
+SHA1 (gcc-3.3.3-20040217-1-src.diff.gz) = 721674ff4b07397a3bd5570832bb89662aacee2a
+Size (gcc-3.3.3-20040217-1-src.diff.gz) = 122692 bytes
+SHA1 (gcc-3.3.3.tar.gz) = decb70e78f040850dbd41f18bb5ec992192ad28c
+Size (gcc-3.3.3.tar.gz) = 30747783 bytes
+SHA1 (binutils-2.15.90-20040222-1-src.tar.gz) = 49c81b65f288a8c849675da9ddf3536a24d8515f
+Size (binutils-2.15.90-20040222-1-src.tar.gz) = 14182109 bytes
+SHA1 (patch-ab) = fd94571856c4706b324307efa8e2cacec3021463
+SHA1 (patch-ac) = 848a290c56258ef76bb0c7534863097f1e53fa70
+SHA1 (patch-ad) = 609f33a5cc0804115ca969aab9b05cbc6162d9e9
+SHA1 (patch-ae) = d738f7f0ec4a0832270d9bc1fdd0f3e69b20b511
+SHA1 (patch-af) = f2a038037b040b8dabc5bdf9532e4ad7f958325b
+SHA1 (patch-co) = 70982f85adeaf6d1f0d0fed6cc6f76e774ad0296
+SHA1 (patch-pe) = dd206723655b95e970f545906dff923a7768728c
diff --git a/cross/i386-netbsdpe/files/PLIST-gcc b/cross/i386-netbsdpe/files/PLIST-gcc
deleted file mode 100644
index db83b21bbe0..00000000000
--- a/cross/i386-netbsdpe/files/PLIST-gcc
+++ /dev/null
@@ -1,49 +0,0 @@
-@comment $NetBSD: PLIST-gcc,v 1.1 2001/01/30 03:08:56 minoura Exp $
-${TARGET_ARCH}/bin/cc
-${TARGET_ARCH}/bin/gcc
-bin/${TARGET_ARCH}-cc
-bin/${TARGET_ARCH}-gcc
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/cc1
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/collect2
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/cpp
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/README
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/assert.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/exception
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/fixed
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/float.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/iso646.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/limits.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/new
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/new.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/proto.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/stdarg.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/stdbool.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/stddef.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/stdlib.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/syslimits.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/typeinfo
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-alpha.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-arc.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-c4x.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-clipper.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-h8300.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-i860.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-i960.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-m32r.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-m88k.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-mips.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-mn10200.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-mn10300.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-pa.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-ppc.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-pyr.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-sh.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-sparc.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-spur.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-v850.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/varargs.h
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/libgcc.a
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/specs
-@dirrm lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include
-@dirrm lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}
-@dirrm lib/gcc-lib/${TARGET_ARCH}
diff --git a/cross/i386-netbsdpe/files/PLIST-gcc-cxx b/cross/i386-netbsdpe/files/PLIST-gcc-cxx
deleted file mode 100644
index 7e99bf38df9..00000000000
--- a/cross/i386-netbsdpe/files/PLIST-gcc-cxx
+++ /dev/null
@@ -1,13 +0,0 @@
-@comment $NetBSD: PLIST-gcc-cxx,v 1.2 2001/03/01 05:59:46 minoura Exp $
-${TARGET_ARCH}/bin/c++
-${TARGET_ARCH}/bin/c++filt
-${TARGET_ARCH}/bin/g++
-${TARGET_ARCH}/include/c++/exception
-${TARGET_ARCH}/include/c++/new
-${TARGET_ARCH}/include/c++/new.h
-${TARGET_ARCH}/include/c++/typeinfo
-bin/${TARGET_ARCH}-c++
-bin/${TARGET_ARCH}-c++filt
-bin/${TARGET_ARCH}-g++
-lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/cc1plus
-@dirrm ${TARGET_ARCH}/include/c++
diff --git a/cross/i386-netbsdpe/files/PLIST-gcc-cxx-runtime b/cross/i386-netbsdpe/files/PLIST-gcc-cxx-runtime
deleted file mode 100644
index c8870fc1cf7..00000000000
--- a/cross/i386-netbsdpe/files/PLIST-gcc-cxx-runtime
+++ /dev/null
@@ -1,116 +0,0 @@
-@comment $NetBSD: PLIST-gcc-cxx-runtime,v 1.1 2001/01/30 03:08:57 minoura Exp $
-${TARGET_ARCH}/include/g++/algo.h
-${TARGET_ARCH}/include/g++/algobase.h
-${TARGET_ARCH}/include/g++/algorithm
-${TARGET_ARCH}/include/g++/alloc.h
-${TARGET_ARCH}/include/g++/bvector.h
-${TARGET_ARCH}/include/g++/cassert
-${TARGET_ARCH}/include/g++/cctype
-${TARGET_ARCH}/include/g++/cerrno
-${TARGET_ARCH}/include/g++/cfloat
-${TARGET_ARCH}/include/g++/ciso646
-${TARGET_ARCH}/include/g++/climits
-${TARGET_ARCH}/include/g++/clocale
-${TARGET_ARCH}/include/g++/cmath
-${TARGET_ARCH}/include/g++/complex
-${TARGET_ARCH}/include/g++/complex.h
-${TARGET_ARCH}/include/g++/csetjmp
-${TARGET_ARCH}/include/g++/csignal
-${TARGET_ARCH}/include/g++/cstdarg
-${TARGET_ARCH}/include/g++/cstddef
-${TARGET_ARCH}/include/g++/cstdio
-${TARGET_ARCH}/include/g++/cstdlib
-${TARGET_ARCH}/include/g++/cstring
-${TARGET_ARCH}/include/g++/ctime
-${TARGET_ARCH}/include/g++/cwchar
-${TARGET_ARCH}/include/g++/cwctype
-${TARGET_ARCH}/include/g++/defalloc.h
-${TARGET_ARCH}/include/g++/deque
-${TARGET_ARCH}/include/g++/deque.h
-${TARGET_ARCH}/include/g++/fstream
-${TARGET_ARCH}/include/g++/function.h
-${TARGET_ARCH}/include/g++/functional
-${TARGET_ARCH}/include/g++/hash_map
-${TARGET_ARCH}/include/g++/hash_map.h
-${TARGET_ARCH}/include/g++/hash_set
-${TARGET_ARCH}/include/g++/hash_set.h
-${TARGET_ARCH}/include/g++/hashtable.h
-${TARGET_ARCH}/include/g++/heap.h
-${TARGET_ARCH}/include/g++/iomanip
-${TARGET_ARCH}/include/g++/iosfwd
-${TARGET_ARCH}/include/g++/iostream
-${TARGET_ARCH}/include/g++/iterator
-${TARGET_ARCH}/include/g++/iterator.h
-${TARGET_ARCH}/include/g++/list
-${TARGET_ARCH}/include/g++/list.h
-${TARGET_ARCH}/include/g++/map
-${TARGET_ARCH}/include/g++/map.h
-${TARGET_ARCH}/include/g++/memory
-${TARGET_ARCH}/include/g++/multimap.h
-${TARGET_ARCH}/include/g++/multiset.h
-${TARGET_ARCH}/include/g++/numeric
-${TARGET_ARCH}/include/g++/pair.h
-${TARGET_ARCH}/include/g++/pthread_alloc
-${TARGET_ARCH}/include/g++/pthread_alloc.h
-${TARGET_ARCH}/include/g++/queue
-${TARGET_ARCH}/include/g++/rope
-${TARGET_ARCH}/include/g++/rope.h
-${TARGET_ARCH}/include/g++/ropeimpl.h
-${TARGET_ARCH}/include/g++/set
-${TARGET_ARCH}/include/g++/set.h
-${TARGET_ARCH}/include/g++/slist
-${TARGET_ARCH}/include/g++/slist.h
-${TARGET_ARCH}/include/g++/stack
-${TARGET_ARCH}/include/g++/stack.h
-${TARGET_ARCH}/include/g++/std/bastring.cc
-${TARGET_ARCH}/include/g++/std/bastring.h
-${TARGET_ARCH}/include/g++/std/complext.cc
-${TARGET_ARCH}/include/g++/std/complext.h
-${TARGET_ARCH}/include/g++/std/dcomplex.h
-${TARGET_ARCH}/include/g++/std/fcomplex.h
-${TARGET_ARCH}/include/g++/std/ldcomplex.h
-${TARGET_ARCH}/include/g++/std/straits.h
-${TARGET_ARCH}/include/g++/stdexcept
-${TARGET_ARCH}/include/g++/stl.h
-${TARGET_ARCH}/include/g++/stl_algo.h
-${TARGET_ARCH}/include/g++/stl_algobase.h
-${TARGET_ARCH}/include/g++/stl_alloc.h
-${TARGET_ARCH}/include/g++/stl_bvector.h
-${TARGET_ARCH}/include/g++/stl_config.h
-${TARGET_ARCH}/include/g++/stl_construct.h
-${TARGET_ARCH}/include/g++/stl_deque.h
-${TARGET_ARCH}/include/g++/stl_function.h
-${TARGET_ARCH}/include/g++/stl_hash_fun.h
-${TARGET_ARCH}/include/g++/stl_hash_map.h
-${TARGET_ARCH}/include/g++/stl_hash_set.h
-${TARGET_ARCH}/include/g++/stl_hashtable.h
-${TARGET_ARCH}/include/g++/stl_heap.h
-${TARGET_ARCH}/include/g++/stl_iterator.h
-${TARGET_ARCH}/include/g++/stl_list.h
-${TARGET_ARCH}/include/g++/stl_map.h
-${TARGET_ARCH}/include/g++/stl_multimap.h
-${TARGET_ARCH}/include/g++/stl_multiset.h
-${TARGET_ARCH}/include/g++/stl_numeric.h
-${TARGET_ARCH}/include/g++/stl_pair.h
-${TARGET_ARCH}/include/g++/stl_queue.h
-${TARGET_ARCH}/include/g++/stl_raw_storage_iter.h
-${TARGET_ARCH}/include/g++/stl_relops.h
-${TARGET_ARCH}/include/g++/stl_rope.h
-${TARGET_ARCH}/include/g++/stl_set.h
-${TARGET_ARCH}/include/g++/stl_slist.h
-${TARGET_ARCH}/include/g++/stl_stack.h
-${TARGET_ARCH}/include/g++/stl_tempbuf.h
-${TARGET_ARCH}/include/g++/stl_tree.h
-${TARGET_ARCH}/include/g++/stl_uninitialized.h
-${TARGET_ARCH}/include/g++/stl_vector.h
-${TARGET_ARCH}/include/g++/string
-${TARGET_ARCH}/include/g++/strstream
-${TARGET_ARCH}/include/g++/tempbuf.h
-${TARGET_ARCH}/include/g++/tree.h
-${TARGET_ARCH}/include/g++/type_traits.h
-${TARGET_ARCH}/include/g++/utility
-${TARGET_ARCH}/include/g++/vector
-${TARGET_ARCH}/include/g++/vector.h
-${TARGET_ARCH}/lib/libstdc++.a
-@dirrm ${TARGET_ARCH}/include/g++/std
-@dirrm ${TARGET_ARCH}/include/g++
diff --git a/cross/i386-netbsdpe/files/cross.mk b/cross/i386-netbsdpe/files/cross.mk
deleted file mode 100644
index 47f81a191b6..00000000000
--- a/cross/i386-netbsdpe/files/cross.mk
+++ /dev/null
@@ -1,200 +0,0 @@
-# $NetBSD: cross.mk,v 1.18 2004/01/25 02:36:11 grant Exp $
-# based on pkgsrc/cross/COMMON/cross.mk
-# NetBSD: cross.mk,v 1.16 2000/11/09 13:04:55 wiz Exp
-
-DISTNAME= cross-${TARGET_ARCH}-${DISTVERSION}
-CATEGORIES+= cross lang
-USE_CROSSBASE= yes
-PLIST_SRC= ${WRKDIR}/.PLIST_SRC
-MESSAGE_SUBST+= CROSSBASE=${CROSSBASE}
-
-HOMEPAGE?= http://gcc.gnu.org/
-
-TARGET_DIR= ${PREFIX}/${TARGET_ARCH}
-COMMON_DIR= ${_PKGSRCDIR}/cross/COMMON
-GCC_PLIST_DIR= files
-PLIST_PRE?= ${PKGDIR}/PLIST
-
-pre-install: pre-install-dirs
-pre-install-dirs:
- ${INSTALL_DATA_DIR} ${PREFIX}
- ${INSTALL_DATA_DIR} ${PREFIX}/bin
- ${INSTALL_DATA_DIR} ${PREFIX}/lib
- ${INSTALL_DATA_DIR} ${TARGET_DIR}
- ${INSTALL_DATA_DIR} ${TARGET_DIR}/bin
- ${INSTALL_DATA_DIR} ${TARGET_DIR}/include
- ${INSTALL_DATA_DIR} ${TARGET_DIR}/lib
-
-.if defined(USE_CROSS_BINUTILS)
-BINUTILS_DISTNAME= binutils-030425
-DISTFILES+= ${BINUTILS_DISTNAME}.tar.bz2
-SITES_binutils-030425.tar.bz2= ftp://ftp.netbsd.org/pub/NetBSD/misc/kent/
-MASTER_SITES+= ${MASTER_SITE_GNU:=binutils/}
-#MASTER_SITES+= http://prdownloads.sourceforge.net/mingw/
-CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld --data-dir=${TARGET_DIR}/share
-PLIST_PRE+= ${COMMON_DIR}/PLIST-binutils
-
-AS_FOR_TARGET= ${WRKOBJ}/gas/as-new
-AR_FOR_TARGET= ${WRKOBJ}/binutils/ar
-NM_FOR_TARGET= ${WRKOBJ}/binutils/nm-new
-RANLIB_FOR_TARGET= ${WRKOBJ}/binutils/ranlib
-LD_FOR_TARGET= ${WRKOBJ}/ld/ld-new
-
-do-install: binutils-install
-
-binutils-install:
- ${INSTALL_PROGRAM} ${WRKOBJ}/gas/as-new ${TARGET_DIR}/bin/as
- ${INSTALL_PROGRAM} ${WRKOBJ}/ld/ld-new ${TARGET_DIR}/bin/ld
- ${INSTALL_PROGRAM} ${WRKOBJ}/binutils/nm-new ${TARGET_DIR}/bin/nm
- ${INSTALL_PROGRAM} ${WRKOBJ}/binutils/strip-new ${TARGET_DIR}/bin/strip
- for i in addr2line ar objcopy objdump ranlib size strings ${BINUTILS_EXTRAS}; do \
- ${INSTALL_PROGRAM} ${WRKOBJ}/binutils/$$i ${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 # USE_CROSS_BINUTILS
-
-.if defined(USE_CROSS_GCC)
-GCC_DISTNAME= gcc-2.95.2
-GCC_INTVERSION= 2.95.2
-MASTER_SITES+= ${MASTER_SITE_GNU:=gcc/}
-GCC_LANGUAGES= c # add to these below
-AUTOCONF_REQD= 2.13
-USE_MAKEINFO= YES
-
-. if defined(GCC_CXX)
-CXX_CONFIGURE_ARGS+= --with-gxx-include-dir=${TARGET_DIR}/include/c++
-GCC_LANGUAGES+= c++
-PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc-cxx
-. if defined(GCC_CXX_RUNTIME)
-PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc-cxx-runtime
-. endif
-. endif # GCC_CXX
-
-# the main PLIST needs to go last to get the @dirrm's right
-PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc
-DISTFILES+= ${GCC_DISTNAME}.tar.gz
-USE_GNU_TOOLS+= make
-
-CC_FOR_TARGET= ${WRKOBJ}/gcc/xgcc -B${WRKOBJ}/gcc/ ${CFLAGS_FOR_TARGET}
-CXX_FOR_TARGET= ${CC_FOR_TARGET}
-
-GCC_MAKE_FLAGS= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
- 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="${GCC_LANGUAGES}" \
- INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
- INSTALL_PROGRAM="${INSTALL_PROGRAM}"
-GCC_MAKE= ${SETENV} ${MAKE_ENV} \
- ${MAKE_PROGRAM} ${MAKE_FLAGS} ${GCC_MAKE_FLAGS}
-
-. if defined(GCC_FAKE_RUNTIME)
-CROSS_SYS_INCLUDE= ${WRKDIR}/include
-. endif
-. if defined(CROSS_SYS_INCLUDE)
-CFLAGS_FOR_TARGET+= -idirafter ${CROSS_SYS_INCLUDE}
-GCC_MAKE_FLAGS+= SYSTEM_HEADER_DIR="${CROSS_SYS_INCLUDE}"
-. endif
-. if defined(SYS_LIB)
-LDFLAGS_FOR_TARGET+= -L${SYS_LIB}
-. endif
-
-pre-configure: gcc-configure
-do-build: gcc-build
-do-install: gcc-install
-
-WRKOBJ= ${WRKDIR}/obj
-gcc-configure:
- @-mkdir ${WRKOBJ}
- @cd ${WRKOBJ} && ${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}" \
- ${BU_WRKSRC}/configure --prefix=${PREFIX} \
- --host=${MACHINE_GNU_ARCH}--netbsd --target=${TARGET_ARCH} \
- ${GCC_CONFIGURE_ARGS} ${CXX_CONFIGURE_ARGS}
- @-mkdir ${WRKOBJ}/gcc
- @cd ${WRKOBJ}/gcc && ${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}" \
- ${WRKSRC}/gcc/configure --prefix=${PREFIX} \
- --host=${MACHINE_GNU_ARCH}--netbsd --target=${TARGET_ARCH} \
- ${GCC_CONFIGURE_ARGS} ${CXX_CONFIGURE_ARGS}
-. if defined(GCC_FAKE_RUNTIME)
- @${MKDIR} ${CROSS_SYS_INCLUDE} ${CROSS_SYS_INCLUDE}/machine ${CROSS_SYS_INCLUDE}/sys
- @cd ${CROSS_SYS_INCLUDE} && ${TOUCH} ${TOUCH_FLAGS} machine/ansi.h \
- sys/time.h stdlib.h unistd.h
-. endif
-
-gcc-build:
- ${LN} -s ${AS_FOR_TARGET} ${WRKOBJ}/gcc/as
- ${LN} -s ${LD_FOR_TARGET} ${WRKOBJ}/gcc/ld
- @cd ${WRKOBJ} && make all-libiberty all-binutils all-gas all-ld
- @cd ${WRKOBJ}/gcc && ${GCC_MAKE} all
-. if defined(GCC_CXX) && defined(GCC_CXX_RUNTIME)
- @cd ${WRKOBJ} && ${GCC_MAKE} configure-target-libio \
- configure-target-libstdc++ all-target-libio all-target-libstdc++
-. endif
-
-gcc-install:
- @cd ${WRKOBJ}/gcc && ${SETENV} ${MAKE_ENV} \
- ${MAKE_PROGRAM} ${MAKE_FLAGS} ${GCC_MAKE_FLAGS} \
- install-common install-headers install-libgcc install-driver
- ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}
- ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-gcc ${PREFIX}/bin/${TARGET_ARCH}-cc
- ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-gcc ${TARGET_DIR}/bin/cc
- ${RM} ${PREFIX}/bin/${TARGET_ARCH}-gcj # install-driver installs gcj but we need not it
-. if defined(GCC_CXX)
- @${MKDIR} ${TARGET_DIR}/include/c++
- @for file in exception new new.h typeinfo; do \
- ${INSTALL_DATA} ${WRKSRC}/gcc/cp/inc/$$file ${TARGET_DIR}/include/c++; \
- done
-. if defined(GCC_CXX_RUNTIME)
- @${MKDIR} ${TARGET_DIR}/include/g++/std
- @cd ${WRKSRC} && ${GCC_MAKE} install-target-libstdc++
-. endif
- for file in c++ c++filt g++; do \
- ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-$$file ${TARGET_DIR}/bin/$$file; \
- done
-. endif # GCC_CXX
- @${RMDIR} -p ${PREFIX}/info 2>/dev/null || ${TRUE}
- @${RMDIR} -p ${PREFIX}/man/man1 2>/dev/null || ${TRUE}
-.endif # USE_CROSS_GCC
-
-
-.if defined(CROSS_SYS_INCLUDE) && !defined(GCC_FAKE_RUNTIME)
-pre-install: pre-install-includes
-pre-install-includes:
- cd ${CROSS_SYS_INCLUDE} && ${PAX} -rw . ${TARGET_DIR}/include
-.endif
-
-.if defined(SYS_LIB)
-pre-install: pre-install-lib
-pre-install-lib:
- cd ${SYS_LIB} && ${PAX} -rw . ${TARGET_DIR}/lib
-.endif
-
-post-install: post-install-plist
-post-install-plist:
- @${SED} -e 's|$${TARGET_ARCH}|${TARGET_ARCH}|' \
- -e 's|$${GCC_INTVERSION}|${GCC_INTVERSION}|' \
- ${PLIST_PRE} >${PLIST_SRC}
- @${ECHO} '@dirrm ${TARGET_ARCH}/bin' >>${PLIST_SRC}
- @${ECHO} '@exec mkdir -p ${TARGET_ARCH}/include' >>${PLIST_SRC}
- @${ECHO} '@dirrm ${TARGET_ARCH}/include' >>${PLIST_SRC}
- @${ECHO} '@exec mkdir -p ${TARGET_ARCH}/lib' >>${PLIST_SRC}
- @${ECHO} '@dirrm ${TARGET_ARCH}/lib' >>${PLIST_SRC}
- @${ECHO} '@dirrm ${TARGET_ARCH}' >>${PLIST_SRC}
-
-.include "../../../mk/autoconf.mk"
-.include "../../../mk/bsd.pkg.mk"
-
-#EXTRACT_BEFORE_ARGS:= -X ${COMMON_DIR}/exclude ${EXTRACT_BEFORE_ARGS}
diff --git a/cross/i386-netbsdpe/files/featuretest.h b/cross/i386-netbsdpe/files/featuretest.h
deleted file mode 100644
index 35a6cd589b5..00000000000
--- a/cross/i386-netbsdpe/files/featuretest.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* $NetBSD: featuretest.h,v 1.2 2000/11/06 05:30:05 minoura Exp $ /*
-/* from: NetBSD: featuretest.h,v 1.2 1998/10/24 16:30:56 kleink Exp */
-
-/*
- * Written by Klaus Klein <kleink@NetBSD.ORG>, February 2, 1998.
- * Public domain.
- */
-
-#ifndef _SYS_FEATURETEST_H_
-#define _SYS_FEATURETEST_H_
-
-#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
-#define _POSIX_C_SOURCE 1L
-#endif
-
-#if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \
- !defined(_REENTRANT)
-#define _REENTRANT
-#endif
-
-#endif /* !defined(_SYS_FEATURETEST_H_) */
diff --git a/cross/i386-netbsdpe/files/i386_limits.h b/cross/i386-netbsdpe/files/i386_limits.h
deleted file mode 100644
index cce4253bded..00000000000
--- a/cross/i386-netbsdpe/files/i386_limits.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $NetBSD: i386_limits.h,v 1.2 2000/11/06 05:30:06 minoura Exp $ */
-/* from: NetBSD: limits.h,v 1.15 2000/08/08 22:31:13 tshiozak Exp */
-
-/*
- * Copyright (c) 1988 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)limits.h 7.2 (Berkeley) 6/28/90
- */
-
-#ifndef _MACHINE_LIMITS_H_
-#define _MACHINE_LIMITS_H_
-
-#define CHAR_BIT 8 /* number of bits in a char */
-#define MB_LEN_MAX 32 /* no multibyte characters */
-
-#define SCHAR_MAX 0x7f /* max value for a signed char */
-#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
-
-#define UCHAR_MAX 0xffU /* max value for an unsigned char */
-#define CHAR_MAX 0x7f /* max value for a char */
-#define CHAR_MIN (-0x7f-1) /* min value for a char */
-
-#define USHRT_MAX 0xffffU /* max value for an unsigned short */
-#define SHRT_MAX 0x7fff /* max value for a short */
-#define SHRT_MIN (-0x7fff-1) /* min value for a short */
-
-#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
-#define INT_MAX 0x7fffffff /* max value for an int */
-#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-
-#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
-#define LONG_MAX 0x7fffffffL /* max value for a long */
-#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
-
-#if !defined(_ANSI_SOURCE)
-#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
-
-#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
-#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
-#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
-#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
-#endif
-
-#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
-#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
-
-#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
-#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
-#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
-
-#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE */
-
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
- defined(_XOPEN_SOURCE)
-#define LONG_BIT 32
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
-
-#endif /* _MACHINE_LIMITS_H_ */
diff --git a/cross/i386-netbsdpe/files/limits.h b/cross/i386-netbsdpe/files/limits.h
deleted file mode 100644
index f54d111c534..00000000000
--- a/cross/i386-netbsdpe/files/limits.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* $NetBSD: limits.h,v 1.2 2000/11/06 05:30:06 minoura Exp $ */
-/* from: NetBSD: limits.h,v 1.13 1999/09/27 16:24:39 kleink Exp */
-
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)limits.h 8.2 (Berkeley) 1/4/94
- */
-
-#ifndef _LIMITS_H_
-#define _LIMITS_H_
-
-#if !defined(_ANSI_SOURCE)
-#define _POSIX_ARG_MAX 4096
-#define _POSIX_CHILD_MAX 6
-#define _POSIX_LINK_MAX 8
-#define _POSIX_LOGIN_NAME_MAX 9
-#define _POSIX_MAX_CANON 255
-#define _POSIX_MAX_INPUT 255
-#define _POSIX_NAME_MAX 14
-#define _POSIX_NGROUPS_MAX 0
-#define _POSIX_OPEN_MAX 16
-#define _POSIX_PATH_MAX 255
-#define _POSIX_PIPE_BUF 512
-#define _POSIX_SSIZE_MAX 32767
-#define _POSIX_STREAM_MAX 8
-#define _POSIX_TZNAME_MAX 3
-
-#define _POSIX2_BC_BASE_MAX 99
-#define _POSIX2_BC_DIM_MAX 2048
-#define _POSIX2_BC_SCALE_MAX 99
-#define _POSIX2_BC_STRING_MAX 1000
-#define _POSIX2_COLL_WEIGHTS_MAX 2
-#define _POSIX2_EXPR_NEST_MAX 32
-#define _POSIX2_LINE_MAX 2048
-#define _POSIX2_RE_DUP_MAX 255
-
-#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
-#define _XOPEN_IOV_MAX 16
-
-#define PASS_MAX 128
-
-#define NL_ARGMAX 9
-#define NL_LANGMAX 14
-#define NL_MSGMAX 32767
-#define NL_NMAX 1
-#define NL_SETMAX 255
-#define NL_TEXTMAX 2048
-
-#define TMP_MAX 308915776
-#endif /* !_POSIX_C_SOURCE || _XOPEN_SOURCE */
-
-#endif /* !_ANSI_SOURCE */
-
-#include <machine/limits.h>
-#include <sys/syslimits.h>
-
-#endif /* !_LIMITS_H_ */
diff --git a/cross/i386-netbsdpe/files/syslimits.h b/cross/i386-netbsdpe/files/syslimits.h
deleted file mode 100644
index dea50ec13a7..00000000000
--- a/cross/i386-netbsdpe/files/syslimits.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* $NetBSD: syslimits.h,v 1.2 2000/11/06 05:30:06 minoura Exp $ */
-/* from: NetBSD: syslimits.h,v 1.18 1999/09/27 16:24:40 kleink Exp */
-
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)syslimits.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _SYS_SYSLIMITS_H_
-#define _SYS_SYSLIMITS_H_
-
-#include <sys/featuretest.h>
-
-#if !defined(_ANSI_SOURCE)
-#define ARG_MAX (256 * 1024) /* max bytes for an exec function */
-#define CHILD_MAX 80 /* max simultaneous processes */
-#define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */
-#define LINK_MAX 32767 /* max file link count */
-#define MAX_CANON 255 /* max bytes in term canon input line */
-#define MAX_INPUT 255 /* max bytes in terminal input */
-#define NAME_MAX 255 /* max bytes in a file name */
-#define NGROUPS_MAX 16 /* max supplemental group id's */
-#define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */
-#define OPEN_MAX 64 /* max open files per process */
-#define PATH_MAX 1024 /* max bytes in pathname */
-#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
-
-#define BC_BASE_MAX INT_MAX /* max ibase/obase values in bc(1) */
-#define BC_DIM_MAX 65535 /* max array elements in bc(1) */
-#define BC_SCALE_MAX INT_MAX /* max scale value in bc(1) */
-#define BC_STRING_MAX INT_MAX /* max const string length in bc(1) */
-#define COLL_WEIGHTS_MAX 2 /* max weights for order keyword */
-#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */
-#define LINE_MAX 2048 /* max bytes in an input line */
-#define RE_DUP_MAX 255 /* max RE's in interval notation */
-
-/*
- * IEEE Std 1003.1c-95, adopted in X/Open CAE Specification Issue 5 Version 2
- */
-#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
- (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500
-#define LOGIN_NAME_MAX 17 /* max login name length incl. NUL */
-#endif
-
-/*
- * X/Open CAE Specification Issue 5 Version 2
- */
-#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
-#define IOV_MAX 1024 /* max # of iovec's for readv(2) etc. */
-#define NZERO 20 /* default "nice" */
-#endif /* !_POSIX_C_SOURCE || _XOPEN_SOURCE */
-
-#endif /* !_ANSI_SOURCE */
-
-#endif /* !_SYS_SYSLIMITS_H_ */
diff --git a/cross/i386-netbsdpe/patches/binutils-af b/cross/i386-netbsdpe/patches/binutils-af
index 5ef084e586e..a97a4903611 100644
--- a/cross/i386-netbsdpe/patches/binutils-af
+++ b/cross/i386-netbsdpe/patches/binutils-af
@@ -1,8 +1,8 @@
-$NetBSD: binutils-af,v 1.2 2003/04/27 13:50:10 kent Exp $
+$NetBSD: binutils-af,v 1.3 2004/03/09 12:19:12 kent Exp $
---- binutils/dlltool.c.orig Fri Dec 13 06:10:09 2002
+--- binutils/dlltool.c.orig 2003-07-08 12:35:36.000000000 +0900
+++ binutils/dlltool.c
-@@ -1403,6 +1403,8 @@
+@@ -1437,6 +1437,8 @@ match_exclude (string)
for (excl_item = excludes; excl_item; excl_item = excl_item->next)
if (strcmp (string, excl_item->string) == 0)
return TRUE;
@@ -11,3 +11,65 @@ $NetBSD: binutils-af,v 1.2 2003/04/27 13:50:10 kent Exp $
return FALSE;
}
+@@ -2351,6 +2353,7 @@ make_one_lib_file (exp, i)
+ asymbol * exp_label;
+ asymbol * iname = 0;
+ asymbol * iname2;
++ asymbol * iname_nm = 0;
+ asymbol * iname_lab;
+ asymbol ** iname_lab_pp;
+ asymbol ** iname_pp;
+@@ -2362,7 +2365,7 @@ make_one_lib_file (exp, i)
+ #ifndef EXTRA
+ #define EXTRA 0
+ #endif
+- asymbol * ptrs[NSECS + 4 + EXTRA + 1];
++ asymbol * ptrs[NSECS + 5 + EXTRA + 1];
+ flagword applicable;
+
+ char * outname = xmalloc (strlen (TMP_STUB) + 10);
+@@ -2460,6 +2463,15 @@ make_one_lib_file (exp, i)
+ iname2->flags = BSF_GLOBAL;
+ iname2->value = 0;
+
++ if (exp->data)
++ {
++ iname_nm = bfd_make_empty_symbol (abfd);
++ iname_nm->name = make_imp_label ("__nm_", exp->name);
++ iname_nm->section = secdata[IDATA6].sec;
++ iname_nm->flags = BSF_GLOBAL;
++ iname_nm->value = 0;
++ }
++
+ iname_lab = bfd_make_empty_symbol(abfd);
+
+ iname_lab->name = head_label;
+@@ -2471,6 +2483,8 @@ make_one_lib_file (exp, i)
+ if (create_compat_implib)
+ ptrs[oidx++] = iname;
+ ptrs[oidx++] = iname2;
++ if (exp->data)
++ ptrs[oidx++] = iname_nm;
+
+ iname_lab_pp = ptrs + oidx;
+ ptrs[oidx++] = iname_lab;
+@@ -2781,7 +2795,7 @@ make_head ()
+ fprintf (f, "\t%sdoesn't load DLLs when this is set.\n", ASM_C);
+ fprintf (f, "\t%s\t0\t%s loaded time\n", ASM_LONG, ASM_C);
+ fprintf (f, "\t%s\t0\t%s Forwarder chain\n", ASM_LONG, ASM_C);
+- fprintf (f, "\t%s__%s_iname%s\t%s imported dll's name\n",
++ fprintf (f, "\t%s_%s_iname%s\t%s imported dll's name\n",
+ ASM_RVA_BEFORE,
+ imp_name_lab,
+ ASM_RVA_AFTER,
+@@ -2862,8 +2876,8 @@ make_tail ()
+ fprintf (f, "\t.section .idata$7\n");
+ #endif
+
+- fprintf (f, "\t%s\t__%s_iname\n", ASM_GLOBAL, imp_name_lab);
+- fprintf (f, "__%s_iname:\t%s\t\"%s\"\n",
++ fprintf (f, "\t%s\t_%s_iname\n", ASM_GLOBAL, imp_name_lab);
++ fprintf (f, "_%s_iname:\t%s\t\"%s\"\n",
+ imp_name_lab, ASM_TEXT, dll_name);
+
+ fclose (f);
diff --git a/cross/i386-netbsdpe/patches/binutils-ag b/cross/i386-netbsdpe/patches/binutils-ag
new file mode 100644
index 00000000000..de13f969bca
--- /dev/null
+++ b/cross/i386-netbsdpe/patches/binutils-ag
@@ -0,0 +1,13 @@
+$NetBSD: binutils-ag,v 1.1 2004/03/09 12:19:12 kent Exp $
+
+--- binutils/doc/Makefile.in.orig 2003-10-27 00:45:51.000000000 +0900
++++ binutils/doc/Makefile.in
+@@ -552,7 +552,7 @@ $(DEMANGLER_NAME).1: cxxfilt.man Makefil
+
+ # We want install to imply install-info as per GNU standards, despite the
+ # cygnus option.
+-install: install-info
++#install: install-info
+
+ # Maintenance
+
diff --git a/cross/i386-netbsdpe/patches/binutils-ah b/cross/i386-netbsdpe/patches/binutils-ah
new file mode 100644
index 00000000000..a599c2c3b60
--- /dev/null
+++ b/cross/i386-netbsdpe/patches/binutils-ah
@@ -0,0 +1,14 @@
+$NetBSD: binutils-ah,v 1.1 2004/03/09 12:19:12 kent Exp $
+
+--- gas/doc/Makefile.in.orig 2003-11-25 07:01:36.000000000 +0900
++++ gas/doc/Makefile.in
+@@ -521,7 +521,7 @@ as.dvi: $(srcdir)/as.texinfo asconfig.te
+
+ # We want install to imply install-info as per GNU standards, despite the
+ # cygnus option.
+-install: install-info
+-install-info: install-info-am
++install:
++install-info:
+
+ # Maintenance
diff --git a/cross/i386-netbsdpe/patches/binutils-ai b/cross/i386-netbsdpe/patches/binutils-ai
new file mode 100644
index 00000000000..16109c7b9fd
--- /dev/null
+++ b/cross/i386-netbsdpe/patches/binutils-ai
@@ -0,0 +1,13 @@
+$NetBSD: binutils-ai,v 1.1 2004/03/09 12:19:12 kent Exp $
+
+--- ld/Makefile.in.orig 2003-10-27 00:47:14.000000000 +0900
++++ ld/Makefile.in
+@@ -2243,7 +2243,7 @@ install-data-local:
+
+ # We want install to imply install-info as per GNU standards, despite the
+ # cygnus option.
+-install: install-info
++#install: install-info
+ diststuff: info $(EXTRA_DIST)
+ distclean-local:
+ rm -rf ldscripts
diff --git a/cross/i386-netbsdpe/patches/binutils-aj b/cross/i386-netbsdpe/patches/binutils-aj
new file mode 100644
index 00000000000..f034ac2af6a
--- /dev/null
+++ b/cross/i386-netbsdpe/patches/binutils-aj
@@ -0,0 +1,13 @@
+$NetBSD: binutils-aj,v 1.1 2004/03/09 12:19:12 kent Exp $
+
+--- ld/pe-dll.c.orig 2003-11-09 03:47:30.000000000 +0900
++++ ld/pe-dll.c
+@@ -1934,7 +1934,7 @@ make_singleton_name_thunk (const char *i
+ quick_symbol (abfd, U ("_nm_"), import, "", UNDSEC, BSF_GLOBAL, 0);
+
+ bfd_set_section_size (abfd, id4, 8);
+- d4 = xmalloc (4);
++ d4 = xmalloc (8);
+ id4->contents = d4;
+ memset (d4, 0, 8);
+ quick_reloc (abfd, 0, BFD_RELOC_RVA, 2);
diff --git a/cross/i386-netbsdpe/patches/binutils-ak b/cross/i386-netbsdpe/patches/binutils-ak
new file mode 100644
index 00000000000..39f8e67fd0a
--- /dev/null
+++ b/cross/i386-netbsdpe/patches/binutils-ak
@@ -0,0 +1,12 @@
+$NetBSD: binutils-ak,v 1.1 2004/03/09 12:19:12 kent Exp $
+
+--- gas/Makefile.in.orig 2004-03-09 14:46:34.000000000 +0900
++++ gas/Makefile.in
+@@ -2866,6 +2866,7 @@ install-data-am:
+ install-exec-am: install-exec-local
+
+ install-info:
++install-info-am:
+
+ install-man:
+
diff --git a/cross/i386-netbsdpe/patches/patch-aa b/cross/i386-netbsdpe/patches/patch-aa
deleted file mode 100644
index 11dfa8ac410..00000000000
--- a/cross/i386-netbsdpe/patches/patch-aa
+++ /dev/null
@@ -1,763 +0,0 @@
-$NetBSD: patch-aa,v 1.1 2001/01/30 03:08:59 minoura Exp $
-
-diff -urN gcc-2.95.2/gcc/collect2.c gcc-patched/gcc/collect2.c
---- gcc/collect2.c Wed Oct 13 06:16:52 1999
-+++ gcc/collect2.c Thu Dec 14 20:00:19 2000
-@@ -53,7 +53,6 @@
- #define obstack_chunk_alloc xmalloc
- #define obstack_chunk_free free
-
--extern char *make_temp_file PROTO ((char *));
-
- /* On certain systems, we have code that works by scanning the object file
- directly. But this code uses system-specific header files and library
-diff -urN gcc-2.95.2/gcc/config/elfos.h gcc-patched/gcc/config/elfos.h
---- gcc/config/elfos.h Fri Mar 26 19:45:26 1999
-+++ gcc/config/elfos.h Thu Dec 14 20:00:19 2000
-@@ -48,6 +48,7 @@
-
- /* Output #ident as a .ident. */
-
-+#undef ASM_OUTPUT_IDENT
- #define ASM_OUTPUT_IDENT(FILE, NAME) \
- fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
-
-@@ -92,6 +93,10 @@
- #undef SET_ASM_OP
- #define SET_ASM_OP ".set"
-
-+/* We want local labels to start with period if made with asm_fprintf. */
-+#undef LOCAL_LABEL_PREFIX
-+#define LOCAL_LABEL_PREFIX "."
-+
- /* This is how to begin an assembly language file. Most svr4 assemblers want
- at least a .file directive to come first, and some want to see a .version
- directive come right after that. Here we just establish a default
-@@ -130,7 +135,7 @@
- #undef ASM_OUTPUT_INTERNAL_LABEL
- #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \
- do { \
-- fprintf (FILE, ".%s%d:\n", PREFIX, NUM); \
-+ fprintf (FILE, "%s%s%d:\n", LOCAL_LABEL_PREFIX, PREFIX, NUM); \
- } while (0)
-
- /* This is how to store into the string LABEL
-@@ -144,7 +149,7 @@
- #undef ASM_GENERATE_INTERNAL_LABEL
- #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
- do { \
-- sprintf (LABEL, "*.%s%d", PREFIX, NUM); \
-+ sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM); \
- } while (0)
-
- /* Output the label which precedes a jumptable. Note that for all svr4
-@@ -461,6 +466,7 @@
-
- /* This is how we tell the assembler that a symbol is weak. */
-
-+#undef ASM_WEAKEN_LABEL
- #define ASM_WEAKEN_LABEL(FILE,NAME) \
- do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
- fputc ('\n', FILE); } while (0)
-diff -urN gcc-2.95.2/gcc/config/i386/netbsd-elf.h gcc-patched/gcc/config/i386/netbsd-elf.h
---- gcc/config/i386/netbsd-elf.h Thu Jan 1 09:00:00 1970
-+++ gcc/config/i386/netbsd-elf.h Thu Dec 14 20:00:18 2000
-@@ -0,0 +1,161 @@
-+/* Definitions of target machine for GNU compiler,
-+ for i386 NetBSD systems.
-+ Copyright (C) 1998 Free Software Foundation, Inc.
-+
-+This file is part of GNU CC.
-+
-+GNU CC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2, or (at your option)
-+any later version.
-+
-+GNU CC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GNU CC; see the file COPYING. If not, write to
-+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-+
-+/* This is used on i386 platforms that use the ELF format.
-+ This was taken from the NetBSD/alpha configuration, and modified
-+ for NetBSD/i386 by Christos Zoulas <christos@netbsd.org> */
-+
-+/* Get generic i386 definitions. */
-+
-+/* This goes away when the math-emulator is fixed */
-+#define TARGET_CPU_DEFAULT 0400 /* TARGET_NO_FANCY_MATH_387 */
-+
-+#include <i386/gstabs.h>
-+
-+/* Get perform_* macros to build libgcc.a. */
-+#include <i386/perform.h>
-+
-+/* Get generic NetBSD ELF definitions. We will override these if necessary. */
-+
-+#define NETBSD_ELF
-+#include <netbsd.h>
-+
-+#undef ASM_FINAL_SPEC
-+
-+/* Names to predefine in the preprocessor for this target machine. */
-+
-+#undef CPP_PREDEFINES
-+#define CPP_PREDEFINES "\
-+-Dunix -Di386 -D__NetBSD__ -D__ELF__ \
-+-Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386)"
-+
-+/* Make gcc agree with <machine/ansi.h> */
-+
-+#undef SIZE_TYPE
-+#define SIZE_TYPE "unsigned int"
-+
-+#undef PTRDIFF_TYPE
-+#define PTRDIFF_TYPE "int"
-+
-+#undef WCHAR_TYPE
-+#define WCHAR_TYPE "int"
-+
-+#undef WCHAR_UNSIGNED
-+#define WCHAR_UNSIGNED 0
-+
-+#undef WCHAR_TYPE_SIZE
-+#define WCHAR_TYPE_SIZE 32
-+
-+/* Output assembler code to FILE to increment profiler label # LABELNO
-+ for profiling a function entry. Under NetBSD/i386, the assembler does
-+ nothing special with -pg. */
-+
-+#undef ASM_APP_ON
-+#define ASM_APP_ON "#APP\n"
-+
-+#undef ASM_APP_OFF
-+#define ASM_APP_OFF "#NO_APP\n"
-+
-+#define bsd4_4
-+#undef HAS_INIT_SECTION
-+
-+/* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target. Only
-+ the linker emulation is i386-specific. The rest are
-+ common to all ELF targets, except for the name of the start function. */
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC \
-+ "-m elf_i386 \
-+ %{assert*} %{R*} \
-+ %{shared:-shared} \
-+ %{!shared: \
-+ -dc -dp \
-+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
-+ %{!static: \
-+ %{rdynamic:-export-dynamic} \
-+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
-+ %{static:-static}}"
-+
-+#undef DEFAULT_VTABLE_THUNKS
-+#define DEFAULT_VTABLE_THUNKS 1
-+
-+#undef ASM_OUTPUT_ALIGN
-+#define ASM_OUTPUT_ALIGN(FILE,LOG) \
-+ if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1 << (LOG))
-+
-+/* This is how we tell the assembler that two symbols have the same value. */
-+
-+#define ASM_OUTPUT_DEF(FILE,NAME1,NAME2) \
-+ do { assemble_name(FILE, NAME1); \
-+ fputs(" = ", FILE); \
-+ assemble_name(FILE, NAME2); \
-+ fputc('\n', FILE); } while (0)
-+
-+/*
-+ * We always use gas here, so we don't worry about ECOFF assembler problems.
-+ */
-+#undef TARGET_GAS
-+#define TARGET_GAS (1)
-+
-+/* The following macros are stolen from i386v4.h */
-+/* These have to be defined to get PIC code correct */
-+
-+/* This is how to output an element of a case-vector that is relative.
-+ This is only used for PIC code. See comments by the `casesi' insn in
-+ i386.md for an explanation of the expression this outputs. */
-+
-+#undef ASM_OUTPUT_ADDR_DIFF_ELT
-+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-+ fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-+
-+/* Indicate that jump tables go in the text section. This is
-+ necessary when compiling PIC code. */
-+
-+#define JUMP_TABLES_IN_TEXT_SECTION 1
-+
-+/* Default to pcc-struct-return, because this is the ELF abi and
-+ we don't care about compatibility with older gcc versions. */
-+#define DEFAULT_PCC_STRUCT_RETURN 1
-+
-+/* Profiling routines, partially copied from i386/osfrose.h. */
-+
-+/* Redefine this to use %eax instead of %edx. */
-+#undef FUNCTION_PROFILER
-+#define FUNCTION_PROFILER(FILE, LABELNO) \
-+{ \
-+ if (flag_pic) \
-+ { \
-+ fprintf (FILE, "\tcall __mcount@PLT\n"); \
-+ } \
-+ else \
-+ { \
-+ fprintf (FILE, "\tcall __mcount\n"); \
-+ } \
-+}
-+
-+/* Put relocations in the constant pool in the writable data section. */
-+#undef SELECT_RTX_SECTION
-+#define SELECT_RTX_SECTION(MODE,RTX) \
-+{ \
-+ if (flag_pic && symbolic_operand (RTX)) \
-+ data_section (); \
-+ else \
-+ readonly_data_section (); \
-+}
-diff -urN gcc-2.95.2/gcc/config/i386/xm-netbsd.h gcc-patched/gcc/config/i386/xm-netbsd.h
---- gcc/config/i386/xm-netbsd.h Thu Jan 1 09:00:00 1970
-+++ gcc/config/i386/xm-netbsd.h Thu Dec 14 20:00:18 2000
-@@ -0,0 +1,23 @@
-+/* Configuration file for i386 hosts running NetBSD.
-+ Copyright (C) 1999 Free Software Foundation, Inc.
-+
-+This file is part of GNU CC.
-+
-+GNU CC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2, or (at your option)
-+any later version.
-+
-+GNU CC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GNU CC; see the file COPYING. If not, write to
-+the Free Software Foundation, 59 Temple Place - Suite 330,
-+Boston, MA 02111-1307, USA. */
-+
-+#include <xm-netbsd.h>
-+#include <i386/xm-i386.h>
-+
-diff -urN gcc-2.95.2/gcc/config/netbsd.h gcc-patched/gcc/config/netbsd.h
---- gcc/config/netbsd.h Thu Dec 17 05:59:58 1998
-+++ gcc/config/netbsd.h Thu Dec 14 20:00:19 2000
-@@ -48,17 +48,31 @@
- #define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k -K}"
-
- /* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate
-- libc, depending on whether we're doing profiling. */
-+ libc, depending on whether we're doing profiling; if `-posix' is specified,
-+ link against the appropriate libposix first. */
-
- #undef LIB_SPEC
--#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
-+#define LIB_SPEC \
-+ "%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \
-+ %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
-+
-+/* #ifdef NETBSD_AOUT */
-+
-+/* Provide a STARTFILE_SPEC appropriate for NetBSD a.out. Here we
-+ provide support for the special GCC option -static. */
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC \
-+ "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:%{!static:crt0%O%s}%{static:scrt0%O%s}}}} %{shared:c++rt0%O%s}"
-
- /* Provide a LINK_SPEC appropriate for NetBSD. Here we provide support
- for the special GCC options -static, -assert, and -nostdlib. */
-
- #undef LINK_SPEC
- #define LINK_SPEC \
-- "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
-+ "%{nostdlib:-nostdlib} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic}} %{shared:-Bshareable} %{R*} %{assert*}"
-+
-+/* #endif NETBSD_AOUT */
-
- /* This defines which switch letters take arguments. */
- #undef SWITCH_TAKES_ARG
-@@ -127,6 +141,9 @@
- entries in an ELF object file under SVR4. These macros also output
- the starting labels for the relevant functions/objects. */
-
-+/* XXX. This is WRONG for alpha. Needs to be verified on other ELF ports. */
-+#ifndef NETBSD_ELF
-+
- /* Write the extra assembler code needed to declare a function properly.
- Some svr4 assemblers need to also have something extra said about the
- function's return value. We allow for that here. */
-@@ -207,3 +224,54 @@
- putc ('\n', FILE); \
- } \
- } while (0)
-+
-+#endif /* ! NETBSD_ELF */
-+
-+/* NetBSD ELF support begins here. */
-+
-+#ifdef NETBSD_ELF
-+
-+/* Start with generic ELF definitions. */
-+#include "elfos.h"
-+
-+#undef DWARF_DEBUGGING_INFO /* XXX */
-+#undef DWARF2_DEBUGGING_INFO /* XXX */
-+
-+/* Provide a STARTFILE_SPEC appropriate for NetBSD ELF targets. Here we
-+ provide support for the special GCC option -static. On ELF targets,
-+ we also add the crtbegin.o file which provides part of the support
-+ for getting C++ file-scope static objects constructed before entering
-+ `main'. */
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC \
-+ "%{!shared: \
-+ %{pg:gcrt0%O%s} \
-+ %{!pg: \
-+ %{p:gcrt0%O%s} \
-+ %{!p:crt0%O%s}}} \
-+ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}"
-+
-+/* Provide an ENDFILE_SPEC appropriate for NetBSD ELF targets. Here we
-+ add crtend.o, which provides part of the support for getting C++
-+ file-scope static objects deconstructed after exiting `main'. */
-+
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC \
-+ "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
-+
-+/* Provide a LINK_SPEC appropriate for a NetBSD ELF target. */
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC \
-+ "%{assert*} \
-+ %{shared:-shared} \
-+ %{!shared: \
-+ -dc -dp \
-+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
-+ %{!static: \
-+ %{rdynamic:-export-dynamic} \
-+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
-+ %{static:-static}}"
-+
-+#endif /* NETBSD_ELF */
-diff -urN gcc-2.95.2/gcc/config/sparc/netbsd-elf.h gcc-patched/gcc/config/sparc/netbsd-elf.h
---- gcc/config/sparc/netbsd-elf.h Thu Jan 1 09:00:00 1970
-+++ gcc/config/sparc/netbsd-elf.h Thu Dec 14 20:00:18 2000
-@@ -0,0 +1,42 @@
-+/* NetBSD/sparc ELF configuration */
-+
-+/*
-+ * Pull in generic SPARC ELF configuration, and then clean up
-+ * afterwards
-+ */
-+#include <sparc/elf.h>
-+
-+/* Name the target CPU. */
-+#ifndef TARGET_CPU_DEFAULT
-+#define TARGET_CPU_DEFAULT TARGET_CPU_sparc
-+#endif
-+
-+#undef MULDI3_LIBCALL
-+#undef DIVDI3_LIBCALL
-+#undef UDIVDI3_LIBCALL
-+#undef MODDI3_LIBCALL
-+#undef UMODDI3_LIBCALL
-+#undef INIT_SUBTARGET_OPTABS
-+#define INIT_SUBTARGET_OPTABS
-+
-+#undef CPP_SUBTARGET_SPEC
-+#define CPP_SUBTARGET_SPEC "-D__sparc"
-+
-+#include <sparc/netbsd-elf-common.h>
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC \
-+ "-m elf32_sparc \
-+ %{assert*} %{R*} \
-+ %{shared:-shared} \
-+ %{!shared: \
-+ -dy -dc -dp \
-+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
-+ %{!static: \
-+ %{rdynamic:-export-dynamic} \
-+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
-+ %{static:-static}}"
-+
-+/* Name the port. */
-+#undef TARGET_NAME
-+#define TARGET_NAME "sparc-netbsdelf"
-diff -urN gcc-2.95.2/gcc/config/sparc/netbsd64.h gcc-patched/gcc/config/sparc/netbsd64.h
---- gcc/config/sparc/netbsd64.h Thu Jan 1 09:00:00 1970
-+++ gcc/config/sparc/netbsd64.h Thu Dec 14 20:00:18 2000
-@@ -0,0 +1,169 @@
-+/* NetBSD/sparc64 ELF configuration */
-+
-+/*
-+ * Pull in generic SPARC64 ELF configuration, and then clean up
-+ * afterwards
-+ */
-+
-+/* Let us output 32 bit code as well */
-+#define SPARC_BI_ARCH
-+
-+/* Name the target CPU. This must be before <sparc/sparc.h>. */
-+#ifndef TARGET_CPU_DEFAULT
-+#define TARGET_CPU_DEFAULT TARGET_CPU_ultrasparc
-+#endif
-+
-+#include <sparc/sp64-elf.h>
-+
-+#include <sparc/netbsd-elf-common.h>
-+
-+#undef CPP_SUBTARGET_SPEC
-+#define CPP_SUBTARGET_SPEC "-D__sparc64__"
-+
-+#undef LINK_SPEC64
-+#define LINK_SPEC64 \
-+ "-m elf64_sparc \
-+ %{assert*} %{R*} \
-+ %{shared:-shared} \
-+ %{!shared: \
-+ -dy -dc -dp \
-+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
-+ %{!static: \
-+ %{rdynamic:-export-dynamic} \
-+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
-+ %{static:-static}}"
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC LINK_SPEC64
-+
-+#ifdef SPARC_BI_ARCH
-+
-+#undef STARTFILE_SPEC64
-+#define STARTFILE_SPEC64 \
-+ "%{!shared: \
-+ %{pg:gcrt0%O%s} \
-+ %{!pg: \
-+ %{p:gcrt0%O%s} \
-+ %{!p:crt0%O%s}}} \
-+ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}"
-+
-+#undef STARTFILE_SPEC32
-+#define STARTFILE_SPEC32 \
-+ "%{!shared: \
-+ %{pg:/emul/netbsd32/usr/lib/gcrt0%O%s} \
-+ %{!pg: \
-+ %{p:/emul/netbsd32/usr/lib/gcrt0%O%s} \
-+ %{!p:/emul/netbsd32/usr/lib/crt0%O%s}}} \
-+ %{!shared:/emul/netbsd32/usr/lib/crtbegin%O%s} %{shared:/emul/netbsd32/usr/lib/crtbeginS%O%s}"
-+
-+#undef STARTFILE_SPEC
-+#if DEFAULT_ARCH32_P
-+#define STARTFILE_SPEC "\
-+%{m32:" STARTFILE_SPEC32 "} \
-+%{m64:" STARTFILE_SPEC64 "} \
-+%{!m32:%{!m64:" STARTFILE_SPEC32 "}}"
-+#else
-+#define STARTFILE_SPEC "\
-+%{m32:" STARTFILE_SPEC32 "} \
-+%{m64:" STARTFILE_SPEC64 "} \
-+%{!m32:%{!m64:" STARTFILE_SPEC64 "}}"
-+#endif
-+
-+#undef ENDFILE_SPEC64
-+#define ENDFILE_SPEC64 \
-+ "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
-+
-+#undef ENDFILE_SPEC32
-+#define ENDFILE_SPEC32 \
-+ "%{!shared:/emul/netbsd32/usr/lib/crtend%O%s} %{shared:/emul/netbsd32/usr/lib/crtendS%O%s}"
-+
-+#undef ENDFILE_SPEC
-+#if DEFAULT_ARCH32_P
-+#define ENDFILE_SPEC "\
-+%{m32:" ENDFILE_SPEC32 "} \
-+%{m64:" ENDFILE_SPEC64 "} \
-+%{!m32:%{!m64:" ENDFILE_SPEC32 "}}"
-+#else
-+#define ENDFILE_SPEC "\
-+%{m32:" ENDFILE_SPEC32 "} \
-+%{m64:" ENDFILE_SPEC64 "} \
-+%{!m32:%{!m64:" ENDFILE_SPEC64 "}}"
-+#endif
-+
-+#undef SUBTARGET_EXTRA_SPECS
-+#define SUBTARGET_EXTRA_SPECS \
-+ { "link_arch32", LINK_ARCH32_SPEC }, \
-+ { "link_arch64", LINK_ARCH64_SPEC }, \
-+ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
-+ { "link_arch", LINK_ARCH_SPEC },
-+
-+#undef LINK_ARCH32_SPEC
-+#define LINK_ARCH32_SPEC \
-+ "-m elf32_sparc \
-+ -Y P,/emul/netbsd32/usr/lib \
-+ %{assert*} %{R*} \
-+ %{shared:-shared} \
-+ %{!shared: \
-+ -dy -dc -dp \
-+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
-+ %{!static: \
-+ %{rdynamic:-export-dynamic} \
-+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
-+ %{static:-static}}"
-+
-+#undef LINK_ARCH64_SPEC
-+#define LINK_ARCH64_SPEC LINK_SPEC64
-+
-+#define LINK_ARCH_SPEC "\
-+%{m32:%(link_arch32)} \
-+%{m64:%(link_arch64)} \
-+%{!m32:%{!m64:%(link_arch_default)}} \
-+"
-+
-+#define LINK_ARCH_DEFAULT_SPEC \
-+(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC "\
-+%(link_arch) \
-+%{mlittle-endian:-EL} \
-+"
-+
-+#undef CC1_SPEC
-+#if DEFAULT_ARCH32_P
-+#define CC1_SPEC "\
-+%{sun4:} %{target:} \
-+%{mcypress:-mcpu=cypress} \
-+%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-+%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
-+%{m64:-mptr64 -mcpu=ultrasparc -mstack-bias} \
-+"
-+#else
-+#define CC1_SPEC "\
-+%{sun4:} %{target:} \
-+%{mcypress:-mcpu=cypress} \
-+%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-+%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
-+%{m32:-mptr32 -mcpu=cypress -mno-stack-bias} \
-+"
-+#endif
-+
-+#if DEFAULT_ARCH32_P
-+#define MULTILIB_DEFAULTS { "m32" }
-+#else
-+#define MULTILIB_DEFAULTS { "m64" }
-+#endif
-+
-+#undef CPP_SUBTARGET_SPEC
-+#define CPP_SUBTARGET_SPEC \
-+(DEFAULT_ARCH32_P ? "\
-+%{m64:-D__sparc64__}%{!m64:-D__sparc} \
-+" : "\
-+%{!m32:-D__sparc64__}%{m32:-D__sparc} \
-+")
-+
-+#endif /* SPARC_BI_ARCH */
-+
-+/* Name the port. */
-+#undef TARGET_NAME
-+#define TARGET_NAME "sparc64-netbsd"
-diff -urN gcc-2.95.2/gcc/config/sparc/sparc.md gcc-patched/gcc/config/sparc/sparc.md
---- gcc/config/sparc/sparc.md Thu Oct 21 14:35:40 1999
-+++ gcc/config/sparc/sparc.md Thu Dec 14 20:00:18 2000
-@@ -3472,10 +3472,7 @@
- (define_split
- [(set (match_operand:TF 0 "register_operand" "")
- (match_operand:TF 1 "register_operand" ""))]
-- "reload_completed
-- && (! TARGET_ARCH64
-- || (TARGET_FPU
-- && ! TARGET_HARD_QUAD))"
-+ "reload_completed"
- [(clobber (const_int 0))]
- "
- {
-diff -urN gcc-2.95.2/gcc/config/sparc/sysv4.h gcc-patched/gcc/config/sparc/sysv4.h
---- gcc/config/sparc/sysv4.h Tue Jun 22 02:48:53 1999
-+++ gcc/config/sparc/sysv4.h Thu Dec 14 20:00:19 2000
-@@ -210,6 +210,29 @@
- #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
- asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
-
-+/* A C statement (sans semicolon) to output an element in the table of
-+ global constructors. */
-+#undef ASM_OUTPUT_CONSTRUCTOR
-+#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
-+ do { \
-+ ctors_section (); \
-+ fprintf (FILE, "\t%s\t ", TARGET_ARCH64 ? ASM_LONGLONG : INT_ASM_OP); \
-+ assemble_name (FILE, NAME); \
-+ fprintf (FILE, "\n"); \
-+ } while (0)
-+
-+/* A C statement (sans semicolon) to output an element in the table of
-+ global destructors. */
-+#undef ASM_OUTPUT_DESTRUCTOR
-+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
-+ do { \
-+ dtors_section (); \
-+ fprintf (FILE, "\t%s\t ", TARGET_ARCH64 ? ASM_LONGLONG : INT_ASM_OP); \
-+ assemble_name (FILE, NAME); \
-+ fprintf (FILE, "\n"); \
-+ } while (0)
-+
-+
- /* Override the name of the mcount profiling function. */
-
- #undef MCOUNT_FUNCTION
-diff -urN gcc-2.95.2/gcc/config/sparc/xm-netbsd.h gcc-patched/gcc/config/sparc/xm-netbsd.h
---- gcc/config/sparc/xm-netbsd.h Thu Jan 1 09:00:00 1970
-+++ gcc/config/sparc/xm-netbsd.h Thu Dec 14 20:00:19 2000
-@@ -0,0 +1,4 @@
-+/* Configuration for GCC for Sun SPARC running NetBSD as host. */
-+
-+#include <sparc/xm-sparc.h>
-+#include <xm-netbsd.h>
-diff -urN gcc-2.95.2/gcc/config/sparc/xm-netbsd64.h gcc-patched/gcc/config/sparc/xm-netbsd64.h
---- gcc/config/sparc/xm-netbsd64.h Thu Jan 1 09:00:00 1970
-+++ gcc/config/sparc/xm-netbsd64.h Thu Dec 14 20:00:19 2000
-@@ -0,0 +1,4 @@
-+/* Configuration for GCC for Sun SPARC V9 running NetBSD as host. */
-+
-+#include <xm-netbsd.h>
-+#include <sparc/xm-sp64.h>
-diff -urN gcc-2.95.2/gcc/config/xm-netbsd.h gcc-patched/gcc/config/xm-netbsd.h
---- gcc/config/xm-netbsd.h Thu Jan 1 09:00:00 1970
-+++ gcc/config/xm-netbsd.h Thu Dec 14 20:00:19 2000
-@@ -0,0 +1,32 @@
-+/* Configuration for GNU C-compiler for hosts running NetBSD.
-+ Copyright (C) 1995 Free Software Foundation, Inc.
-+
-+This file is part of GNU CC.
-+
-+GNU CC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2, or (at your option)
-+any later version.
-+
-+GNU CC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GNU CC; see the file COPYING. If not, write to
-+the Free Software Foundation, 59 Temple Place - Suite 330,
-+Boston, MA 02111-1307, USA. */
-+
-+/* This file defines machine-independent things specific to a host
-+ 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. */
-+
-+#undef POSIX
-+#define POSIX
-+
-+/* Ensure we get gnu C's defaults. */
-+#ifdef __GNUC__
-+#define alloca __builtin_alloca
-+#endif
-diff -urN gcc-2.95.2/gcc/config/xm-target64.h gcc-patched/gcc/config/xm-target64.h
---- gcc/config/xm-target64.h Thu Jan 1 09:00:00 1970
-+++ gcc/config/xm-target64.h Thu Dec 14 20:00:19 2000
-@@ -0,0 +1,6 @@
-+/* Hack to extend HOST_WIDE_INT on 64-bit target cross compilers. */
-+
-+#ifdef __GNUC__
-+#define HOST_WIDE_INT long long
-+#define HOST_BITS_PER_WIDE_INT 64
-+#endif
-diff -urN gcc-2.95.2/gcc/emit-rtl.c gcc-patched/gcc/emit-rtl.c
---- gcc/emit-rtl.c Wed Aug 11 16:28:52 1999
-+++ gcc/emit-rtl.c Thu Dec 14 20:00:20 2000
-@@ -1378,6 +1378,15 @@
- val = ((val & 0xffffffff) ^ 0x80000000) - 0x80000000;
- return GEN_INT (val);
- }
-+#if HOST_BITS_PER_WIDE_INT >= 64
-+ else if (BITS_PER_WORD >= 64 && i <= 1)
-+ {
-+ val = k[i*2 + ! WORDS_BIG_ENDIAN];
-+ val = (((val & 0xffffffff) ^ 0x80000000) - 0x80000000) << 32;
-+ val |= (HOST_WIDE_INT) k[i*2 + WORDS_BIG_ENDIAN] & 0xffffffff;
-+ return GEN_INT (val);
-+ }
-+#endif
- else
- abort ();
- }
-diff -urN gcc-2.95.2/gcc/ginclude/stddef.h gcc-patched/gcc/ginclude/stddef.h
---- gcc/ginclude/stddef.h Thu Dec 17 06:19:25 1998
-+++ gcc/ginclude/stddef.h Thu Dec 14 20:00:20 2000
-@@ -45,6 +45,12 @@
- #define _WCHAR_T
- #endif
- #endif
-+/* On NetBSD, machine/ansi.h defines _BSD_WINT_T_ instead of _WINT_T. */
-+#if !defined(_WINT_T_) && !defined(_BSD_WINT_T_)
-+#ifndef _BSD_WINT_T_
-+#define _WINT_T
-+#endif
-+#endif
- /* Undef _FOO_T_ if we are supposed to define foo_t. */
- #if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
- #undef _PTRDIFF_T_
-@@ -58,6 +64,10 @@
- #undef _WCHAR_T_
- #undef _BSD_WCHAR_T_
- #endif
-+#if defined (__need_wint_t) || defined (_STDDEF_H_)
-+#undef _WINT_T_
-+#undef _BSD_WINT_T_
-+#endif
- #endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
-
- /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
-@@ -272,12 +282,14 @@
-
- #if defined (_STDDEF_H) || defined (__need_wint_t)
- #ifndef _WINT_T
-+#ifndef _BSD_WINT_T_
- #define _WINT_T
-
- #ifndef __WINT_TYPE__
- #define __WINT_TYPE__ unsigned int
- #endif
- typedef __WINT_TYPE__ wint_t;
-+#endif
- #endif
- #undef __need_wint_t
- #endif
-diff -urN gcc-2.95.2/gcc/objc/objc-act.c gcc-patched/gcc/objc/objc-act.c
---- gcc/objc/objc-act.c Thu Apr 15 05:28:54 1999
-+++ gcc/objc/objc-act.c Thu Dec 14 20:00:19 2000
-@@ -8399,8 +8399,11 @@
- pushdecl (decl);
- rest_of_decl_compilation (decl, 0, 0, 0);
-
-- /* Make following constant read-only (why not)? */
-- readonly_data_section ();
-+ /* Make following constant read-only, if not compiling PIC. */
-+ if (flag_pic)
-+ data_section();
-+ else
-+ readonly_data_section ();
-
- exp = build1 (ADDR_EXPR, string_type_node, decl);
-
diff --git a/cross/i386-netbsdpe/patches/patch-ab b/cross/i386-netbsdpe/patches/patch-ab
index 647fafa7634..f8a11427a98 100644
--- a/cross/i386-netbsdpe/patches/patch-ab
+++ b/cross/i386-netbsdpe/patches/patch-ab
@@ -1,6 +1,6 @@
-$NetBSD: patch-ab,v 1.1 2002/03/18 03:04:41 kent Exp $
+$NetBSD: patch-ab,v 1.2 2004/03/09 12:19:12 kent Exp $
---- gcc/config/i386/cygwin.asm.orig Thu Dec 17 06:03:13 1998
+--- gcc/config/i386/cygwin.asm.orig 2001-10-31 23:32:27.000000000 +0900
+++ gcc/config/i386/cygwin.asm
@@ -3,9 +3,9 @@
#ifdef L_chkstk
diff --git a/cross/i386-netbsdpe/patches/patch-ac b/cross/i386-netbsdpe/patches/patch-ac
deleted file mode 100644
index 688a9a01d69..00000000000
--- a/cross/i386-netbsdpe/patches/patch-ac
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2002/03/18 03:04:41 kent Exp $
-
---- gcc/config/i386/i386.c.orig Tue Sep 7 16:38:56 1999
-+++ gcc/config/i386/i386.c
-@@ -1922,7 +1922,7 @@
- output_asm_insn (AS2 (mov%L0,%2,%3), xops);
-
- xops[3] = gen_rtx_MEM (FUNCTION_MODE,
-- gen_rtx (SYMBOL_REF, Pmode, "_alloca"));
-+ gen_rtx (SYMBOL_REF, Pmode, "_builtin_alloca_checkstack"));
-
- if (do_rtl)
- emit_call_insn (gen_rtx (CALL, VOIDmode, xops[3], const0_rtx));
diff --git a/cross/i386-netbsdpe/patches/patch-ad b/cross/i386-netbsdpe/patches/patch-ad
index 7595f29227f..1a0c3fcf190 100644
--- a/cross/i386-netbsdpe/patches/patch-ad
+++ b/cross/i386-netbsdpe/patches/patch-ad
@@ -1,13 +1,22 @@
-$NetBSD: patch-ad,v 1.1 2002/03/18 03:04:41 kent Exp $
+$NetBSD: patch-ad,v 1.2 2004/03/09 12:19:12 kent Exp $
---- gcc/config/i386/i386.md.orig Tue Sep 7 16:45:42 1999
+--- gcc/config/i386/i386.md.orig 2003-10-26 04:43:59.000000000 +0900
+++ gcc/config/i386/i386.md
-@@ -8161,7 +8161,7 @@
- (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0)))
- (clobber (match_dup 0))]
- "TARGET_STACK_PROBE"
-- "* return AS1(call,__alloca);"
-+ "* return AS1(call,__builtin_alloca_checkstack);"
- [(set_attr "memory" "none")])
+@@ -16772,7 +16772,7 @@
+ (clobber (match_dup 0))
+ (clobber (reg:CC 17))]
+ "!TARGET_64BIT && TARGET_STACK_PROBE"
+- "call\t__alloca"
++ "call\t__builtin_alloca_checkstack"
+ [(set_attr "type" "multi")
+ (set_attr "length" "5")])
+
+@@ -16782,7 +16782,7 @@
+ (clobber (match_dup 0))
+ (clobber (reg:CC 17))]
+ "TARGET_64BIT && TARGET_STACK_PROBE"
+- "call\t__alloca"
++ "call\t__builtin_alloca_checkstack"
+ [(set_attr "type" "multi")
+ (set_attr "length" "5")])
- (define_expand "allocate_stack"
diff --git a/cross/i386-netbsdpe/patches/patch-ae b/cross/i386-netbsdpe/patches/patch-ae
new file mode 100644
index 00000000000..0d6e85fa980
--- /dev/null
+++ b/cross/i386-netbsdpe/patches/patch-ae
@@ -0,0 +1,22 @@
+$NetBSD: patch-ae,v 1.3 2004/03/09 12:19:12 kent Exp $
+
+--- gcc/config/i386/t-netbsdpe.orig 2003-11-03 01:45:58.000000000 +0900
++++ gcc/config/i386/t-netbsdpe
+@@ -8,14 +8,14 @@ LIMITS_H_TEST = true
+ # If we are building next to winsup, this will let us find the real
+ # limits.h when building libgcc2. Otherwise, winsup must be installed
+ # first.
+-LIBGCC2_INCLUDES = -I$(srcdir)/../winsup/w32api/include
++LIBGCC2_INCLUDES = -I../.. -I/usr/include -D_LIBC_LIMITS_H_
+
+-LIB2FUNCS_EXTRA = $(srcdir)/config/i386/w32-shared-ptr.c
++#LIB2FUNCS_EXTRA = $(srcdir)/config/i386/w32-shared-ptr.c
+
+ winnt.o: $(srcdir)/config/i386/winnt.c $(RTL_H) $(TREE_H) $(CONFIG_H)
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/winnt.c
+
+ # Don't run fixproto
+ STMP_FIXPROTO=
+-STMP_FIXINC=stmp-fixinc
++STMP_FIXINC=
+
diff --git a/cross/i386-netbsdpe/patches/patch-af b/cross/i386-netbsdpe/patches/patch-af
new file mode 100644
index 00000000000..66a7f3d6f64
--- /dev/null
+++ b/cross/i386-netbsdpe/patches/patch-af
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.3 2004/03/09 12:19:12 kent Exp $
+
+--- gcc/Makefile.in.orig 2003-11-04 16:19:18.000000000 +0900
++++ gcc/Makefile.in
+@@ -3000,7 +3000,7 @@ install-headers-tar: stmp-int-hdrs $(STM
+ # found in CDPATH, corrupting the output. We could just redirect the
+ # output of `cd', but some shells lose on redirection within `()'s
+ (cd `${PWD_COMMAND}`/include ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
++ tar -cf - mmintrin.h xmmintrin.h; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
+ # /bin/sh on some systems returns the status of the first tar,
+ # and that can lose with GNU tar which always writes a full block.
+ # So use `exit 0' to ignore its exit status.
diff --git a/cross/i386-netbsdpe/patches/patch-co b/cross/i386-netbsdpe/patches/patch-co
index 332aee3da39..3db209646d7 100644
--- a/cross/i386-netbsdpe/patches/patch-co
+++ b/cross/i386-netbsdpe/patches/patch-co
@@ -1,78 +1,23 @@
-$NetBSD: patch-co,v 1.1 2001/01/30 03:09:00 minoura Exp $
+$NetBSD: patch-co,v 1.2 2004/03/09 12:19:12 kent Exp $
---- gcc/configure.in.pre-patch Tue Jan 16 21:47:25 2001
-+++ gcc/configure.in
-@@ -1156,9 +1156,34 @@
- tmake_file=t-freebsd
- ;;
- changequote(,)dnl
-+ i[34567]86-*-netbsdelf* | \
-+ i[34567]86-*-netbsd1.4[I-Z]* | \
-+ i[34567]86-*-netbsd1.[5-9]* | \
-+ i[34567]86-*-netbsd2*)
-+changequote([,])dnl
-+ tm_file=i386/netbsd-elf.h
-+ xm_file=i386/xm-netbsd.h
-+ tmake_file=t-netbsd
-+ ;;
-+changequote(,)dnl
-+ i[34567]86-*-netbsdpe* )
-+changequote([,])dnl
-+ xm_file="${xm_file} i386/xm-cygwin.h"
-+ tmake_file=i386/t-cygwin
-+ tm_file=i386/netbsd-pe.h
-+ xmake_file=i386/x-cygwin
-+ extra_objs=winnt.o
-+ fixincludes=Makefile.in
-+ if [[ x$enable_threads = xyes ]]; then
-+ thread_file='posix'
-+ fi
-+ exeext=.exe
-+ ;;
-+changequote(,)dnl
- i[34567]86-*-netbsd*)
- changequote([,])dnl
- tm_file=i386/netbsd.h
-+ xm_file=i386/xm-netbsd.h
- tmake_file=t-netbsd
- use_collect2=yes
- ;;
-@@ -3021,6 +3046,12 @@
- tmake_file=sparc/t-sparcbare
- tm_file="sparc/aout.h libgloss.h"
- ;;
-+ sparc-*-netbsd*elf*)
-+ tm_file=sparc/netbsdelf.h
-+ xm_file=sparc/xm-netbsd.h
-+ tmake_file=t-netbsd
-+ use_collect2=yes
-+ ;;
- sparc-*-netbsd*)
- tm_file=sparc/netbsd.h
- tmake_file=t-netbsd
-@@ -3216,6 +3247,12 @@
- extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
- gnu_ld=yes
- ;;
-+ sparc64-*-netbsd*)
-+ tm_file=sparc/netbsd64.h
-+ xm_file=sparc/xm-netbsd64.h
-+ tmake_file=t-netbsd
-+ use_collect2=yes
-+ ;;
- # This hasn't been upgraded to GCC 2.
- # tahoe-harris-*) # Harris tahoe, using COFF.
- # tm_file=tahoe/harris.h
-@@ -3557,6 +3594,12 @@
- esac
- fi
-
-+case $target in
-+ alpha*|sparc64*)
-+ build_xm_file="${build_xm_file} xm-target64.h"
-+ host_xm_file="${host_xm_file} xm-target64.h";;
-+esac
-+
- # Handle cpp installation.
- if test x$enable_cpp != xno
- then
+--- gcc/config.gcc.orig2 2003-10-26 04:46:27.000000000 +0900
++++ gcc/config.gcc
+@@ -1139,6 +1139,18 @@ x86_64-*-freebsd*)
+ i[34567]86-*-netbsdelf*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
+ ;;
++i[34567]86-*-netbsdpe*)
++ tm_file="i386/cygming.h i386/netbsdpe.h"
++ xm_defines=POSIX
++ xm_file=i386/xm-mingw32.h
++ xmake_file=i386/x-mingw32
++ tmake_file="i386/t-netbsdpe"
++ extra_objs=winnt.o
++ target_cpu_default=TARGET_CPU_DEFAULT_pentiumpro
++ if test x$enable_threads = xyes; then
++ thread_file='posix'
++ fi
++ ;;
+ i[34567]86-*-netbsd*)
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
+ tmake_file=t-netbsd
diff --git a/cross/i386-netbsdpe/patches/patch-cp b/cross/i386-netbsdpe/patches/patch-cp
deleted file mode 100644
index df74d2f16ab..00000000000
--- a/cross/i386-netbsdpe/patches/patch-cp
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD: patch-cp,v 1.1 2001/01/30 03:09:00 minoura Exp $
-
---- gcc/cccp.c.orig Wed Jan 17 20:59:27 2001
-+++ gcc/cccp.c
-@@ -393,16 +393,23 @@
- /* Pick up GNU C++ specific include files. */
- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0 },
- #ifdef CROSS_COMPILE
-+#if 0
- /* This is the dir for fixincludes. Put it just before
- the files that we fix. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0 },
-- /* For cross-compilation, this dir name is generated
-- automatically in Makefile.in. */
-- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0 },
-+#endif
- #ifdef TOOL_INCLUDE_DIR
- /* This is another place that the target system's headers might be. */
- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 0, 0 },
- #endif
-+ /* For cross-compilation, this dir name is generated
-+ automatically in Makefile.in. */
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0 },
-+#ifdef LOCAL_INCLUDE_DIR
-+ /* This should be /usr/local/include and should come before
-+ the fixincludes-fixed header files. */
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 0 },
-+#endif
- #else /* not CROSS_COMPILE */
- #ifdef LOCAL_INCLUDE_DIR
- /* This should be /usr/local/include and should come before
-@@ -421,11 +428,11 @@
- #ifdef SYSTEM_INCLUDE_DIR
- { SYSTEM_INCLUDE_DIR, 0, 0, 0, 0 },
- #endif
-+#endif /* not CROSS_COMPILE */
- #ifndef STANDARD_INCLUDE_COMPONENT
- #define STANDARD_INCLUDE_COMPONENT 0
- #endif
- { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 0 },
--#endif /* not CROSS_COMPILE */
- { 0, 0, 0, 0, 0 }
- };
- #endif /* no INCLUDE_DEFAULTS */
diff --git a/cross/i386-netbsdpe/patches/patch-cq b/cross/i386-netbsdpe/patches/patch-cq
deleted file mode 100644
index 8a0e78b4acc..00000000000
--- a/cross/i386-netbsdpe/patches/patch-cq
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD: patch-cq,v 1.1 2001/01/30 03:09:01 minoura Exp $
-
---- gcc/cppinit.c.orig Tue Oct 12 15:31:11 1999
-+++ gcc/cppinit.c
-@@ -129,16 +129,23 @@
- /* Pick up GNU C++ specific include files. */
- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
- #ifdef CROSS_COMPILE
-+#if 0
- /* This is the dir for fixincludes. Put it just before
- the files that we fix. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0 },
-- /* For cross-compilation, this dir name is generated
-- automatically in Makefile.in. */
-- { CROSS_INCLUDE_DIR, "GCC", 0, 0 },
-+#endif
- #ifdef TOOL_INCLUDE_DIR
- /* This is another place that the target system's headers might be. */
- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 },
- #endif
-+ /* For cross-compilation, this dir name is generated
-+ automatically in Makefile.in. */
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0 },
-+#ifdef LOCAL_INCLUDE_DIR
-+ /* This should be /usr/local/include and should come before
-+ the fixincludes-fixed header files. */
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1 },
-+#endif
- #else /* not CROSS_COMPILE */
- #ifdef LOCAL_INCLUDE_DIR
- /* This should be /usr/local/include and should come before
-@@ -157,11 +164,11 @@
- #ifdef SYSTEM_INCLUDE_DIR
- { SYSTEM_INCLUDE_DIR, 0, 0, 0 },
- #endif
-+#endif /* not CROSS_COMPILE */
- #ifndef STANDARD_INCLUDE_COMPONENT
- #define STANDARD_INCLUDE_COMPONENT 0
- #endif
- { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0 },
--#endif /* not CROSS_COMPILE */
- { 0, 0, 0, 0 }
- };
- #endif /* no INCLUDE_DEFAULTS */
diff --git a/cross/i386-netbsdpe/patches/patch-de b/cross/i386-netbsdpe/patches/patch-de
deleted file mode 100644
index 6778f128899..00000000000
--- a/cross/i386-netbsdpe/patches/patch-de
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD: patch-de,v 1.1 2001/10/21 12:24:16 kent Exp $
-
---- gcc/cp/decl.c~ Tue Mar 27 22:17:25 2001
-+++ gcc/cp/decl.c
-@@ -10266,8 +10266,18 @@
- ignore_attrs = 0;
- else if (inner_attrs)
- {
-- decl_attributes (type, inner_attrs, NULL_TREE);
-- inner_attrs = NULL_TREE;
-+ /*decl_attributes (type, inner_attrs, NULL_TREE);*/
-+ /* Create a dummy decl to pass to decl_attributes. The
-+ attributes will be added to a variant of type, and this
-+ new variant type can be retrieved from the dummy decl.
-+ Passing type directly causes the attributes to be added
-+ to type, which is wrong because type may be used
-+ elsewhere without attributes. */
-+
-+ tree dummy = build_decl (TYPE_DECL, NULL_TREE, type);
-+ decl_attributes (dummy, inner_attrs, NULL_TREE);
-+ type = TREE_TYPE (dummy);
-+ inner_attrs = NULL_TREE;
- }
-
- switch (TREE_CODE (declarator))
-@@ -10969,7 +10979,19 @@
- if (inner_attrs)
- {
- if (! ignore_attrs)
-- decl_attributes (type, inner_attrs, NULL_TREE);
-+ /*decl_attributes (type, inner_attrs, NULL_TREE);*/
-+ {
-+ /* Create a dummy decl to pass to decl_attributes. The
-+ attributes will be added to a variant of type, and this
-+ new variant type can be retrieved from the dummy decl.
-+ Passing type directly causes the attributes to be added
-+ to type, which is wrong because type may be used
-+ elsewhere without attributes. */
-+
-+ tree dummy = build_decl (TYPE_DECL, NULL_TREE, type);
-+ decl_attributes (dummy, inner_attrs, NULL_TREE);
-+ type = TREE_TYPE (dummy);
-+ }
- else if (attrlist)
- TREE_VALUE (attrlist) = chainon (inner_attrs, TREE_VALUE (attrlist));
- else
diff --git a/cross/i386-netbsdpe/patches/patch-ma b/cross/i386-netbsdpe/patches/patch-ma
deleted file mode 100644
index ab0ffc952ba..00000000000
--- a/cross/i386-netbsdpe/patches/patch-ma
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ma,v 1.2 2002/10/16 05:11:01 kent Exp $
-
---- gcc/Makefile.in.orig Wed Oct 16 14:02:49 2002
-+++ gcc/Makefile.in
-@@ -276,7 +276,8 @@ unlibsubdir = ../../..
- # Directory in which to find other cross-compilation tools and headers.
- dollar = @dollar@
- # Used in install-cross.
--gcc_tooldir = @gcc_tooldir@
-+#gcc_tooldir = @gcc_tooldir@
-+gcc_tooldir = $(prefix)/$(target_alias)
- # Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
- build_tooldir = $(exec_prefix)/$(target_alias)
- # Directory in which the compiler finds g++ includes.
-@@ -815,7 +816,7 @@ $(srcdir)/configure: $(srcdir)/configure
- # ??? Newer versions have a maintainer mode that may be useful here.
- $(srcdir)/config.in: $(srcdir)/cstamp-h.in
- $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
-- cd $(srcdir) && autoheader
-+ cd $(srcdir) && $(AUTOHEADER)
- @rm -f $(srcdir)/cstamp-h.in
- echo timestamp > $(srcdir)/cstamp-h.in
- auto-host.h: cstamp-h ; @true
diff --git a/cross/i386-netbsdpe/patches/patch-pe b/cross/i386-netbsdpe/patches/patch-pe
index dadb3efbd78..333ef74499e 100644
--- a/cross/i386-netbsdpe/patches/patch-pe
+++ b/cross/i386-netbsdpe/patches/patch-pe
@@ -1,543 +1,71 @@
-$NetBSD: patch-pe,v 1.2 2001/03/01 05:59:47 minoura Exp $
+$NetBSD: patch-pe,v 1.3 2004/03/09 12:19:12 kent Exp $
---- /dev/null Fri Jan 26 01:33:46 2001
-+++ gcc/config/i386/netbsd-pe.h
-@@ -0,0 +1,538 @@
-+/* Operating system specific defines to be used when targeting GCC for
-+ hosting on Windows NT 3.x, using a Unix style C library and tools,
-+ as distinct from winnt.h, which is used to build GCC for use with a
-+ windows style library and tool set and uses the Microsoft tools.
-+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
-+
-+This file is part of GNU CC.
-+
-+GNU CC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2, or (at your option)
-+any later version.
-+
-+GNU CC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GNU CC; see the file COPYING. If not, write to
-+the Free Software Foundation, 59 Temple Place - Suite 330,
-+Boston, MA 02111-1307, USA. */
-+
-+#define YES_UNDERSCORES
-+
-+#define BIGGEST_FIELD_ALIGNMENT 32
-+
-+#define DBX_DEBUGGING_INFO
-+#define SDB_DEBUGGING_INFO
-+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-+
-+#include "i386/gas.h"
-+#include "dbxcoff.h"
-+
-+/* Augment TARGET_SWITCHES with the cygwin/no-cygwin options. */
-+/*#define MASK_WIN32 0x40000000 Use -lming32 interface */
-+/*#define MASK_CYGWIN 0x20000000 Use -lcygwin interface */
-+#define MASK_WINDOWS 0x10000000 /* Use windows interface */
-+#define MASK_DLL 0x08000000 /* Use dll interface */
-+#define MASK_NOP_FUN_DLLIMPORT 0x20000 /* Ignore dllimport for functions */
-+
-+/*#define TARGET_WIN32 (target_flags & MASK_WIN32)*/
-+/*#define TARGET_CYGWIN (target_flags & MASK_CYGWIN)*/
-+#define TARGET_WINDOWS (target_flags & MASK_WINDOWS)
-+#define TARGET_DLL (target_flags & MASK_DLL)
-+#define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT)
-+
-+#undef SUBTARGET_SWITCHES
-+#define SUBTARGET_SWITCHES \
-+/*{ "cygwin", MASK_CYGWIN, "Use the Cygwin interface" },*/ \
-+/*{ "no-cygwin", MASK_WIN32, "Use the Mingw32 interface" }, */\
-+{ "windows", MASK_WINDOWS, "Create GUI application" }, \
-+{ "console", -MASK_WINDOWS, "Create console application" }, \
-+{ "dll", MASK_DLL, "Generate code for a DLL" }, \
-+{ "nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, "Ignore dllimport for functions" }, \
-+{ "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" }, \
-+/*{ "threads", 0, "Use Mingw-specific thread support" },*/
-+
-+
-+/* Support the __declspec keyword by turning them into attributes.
-+ We currently only support: dllimport and dllexport.
-+ Note that the current way we do this may result in a collision with
-+ predefined attributes later on. This can be solved by using one attribute,
-+ say __declspec__, and passing args to it. The problem with that approach
-+ is that args are not accumulated: each new appearance would clobber any
-+ existing args. */
-+
-+#ifdef CPP_PREDEFINES
-+#undef CPP_PREDEFINES
-+#endif
-+
-+#define CPP_PREDEFINES "-Di386 -D__PEACE__ -D__CYGWIN32__ \
-+ -D_X86_=1 -D__STDC__=1\
-+ -D__stdcall=__attribute__((__stdcall__)) \
-+ -D__cdecl=__attribute__((__cdecl__)) \
-+ -D__declspec(x)=__attribute__((x)) \
-+ -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
-+
-+/* Normally, -lgcc is not needed since everything in it is in the DLL, but we
-+ want to allow things to be added to it when installing new versions of
-+ GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled
-+ by calling the init function from the prologue. */
-+
-+#undef STARTFILE_SPEC
+--- gcc/config/i386/netbsdpe.h.orig 2003-11-03 05:34:46.000000000 +0900
++++ gcc/config/i386/netbsdpe.h
+@@ -21,16 +21,11 @@ the Free Software Foundation, 59 Temple
+ Boston, MA 02111-1307, USA. */
+
+ #undef TARGET_VERSION
+-#define TARGET_VERSION fprintf (stderr, " (x86 MinGW)");
++#define TARGET_VERSION fprintf (stderr, " (x86 NetBSD-PE)");
+
+ #define EXTRA_OS_CPP_BUILTINS() \
+ do \
+ { \
+- builtin_define ("__MSVCRT__"); \
+- builtin_define ("__MINGW32__"); \
+- builtin_define ("_WIN32"); \
+- builtin_define_std ("WIN32"); \
+- builtin_define_std ("WINNT"); \
+ } \
+ while (0)
+
+@@ -41,15 +36,19 @@ Boston, MA 02111-1307, USA. */
+ #define STANDARD_INCLUDE_DIR "/mingw/include"
+ #undef STANDARD_INCLUDE_COMPONENT
+ #define STANDARD_INCLUDE_COMPONENT "MINGW"
++#undef GPLUSPLUS_INCLUDE_DIR
++#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
+
+ #undef CPP_SPEC
+-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT}"
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} \
++%{!mwindows:-D__NetBSD__ -D__PECOFF__ -D__NetBSDPE__} \
++%{mwindows:-D_WIN32 -DWINNT} -idirafter /usr/include"
+
+ /* For Windows applications, include more libraries, but always include
+ kernel32. */
+ #undef LIB_SPEC
+-#define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
+- -luser32 -lkernel32 -ladvapi32 -lshell32"
++#define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32 -luser32 -ladvapi32 -lshell32} \
++ -lkernel32 -lpthread -lc %{mdll:-lpeasu}"
+
+ /* Include in the mingw32 libraries with libgcc */
+ #undef LINK_SPEC
+@@ -62,15 +61,13 @@ Boston, MA 02111-1307, USA. */
+
+ /* Include in the mingw32 libraries with libgcc */
+ #undef LIBGCC_SPEC
+-#define LIBGCC_SPEC \
+- "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt"
++#define LIBGCC_SPEC "-lgcc"
+
+ #undef STARTFILE_SPEC
+-#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
+- %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s} %{!fno-exceptions:crtbegin%O%s}"
+#define STARTFILE_SPEC "%{mdll:crt0dll%O%s} %{!mdll: %{!mwindows:crt0%O%s} %{mwindows:crt0win%O%s}}"
-+
-+
-+
-+#undef CPP_SPEC
-+#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
-+ %{!mwindows:-D__NetBSD__ -D__PECOFF__ -D__NetBSDPE__} \
-+ %{mwindows:-D_WIN32 -DWINNT}"
-+
-+/* This macro defines names of additional specifications to put in the specs
-+ that can be used in various specifications like CC1_SPEC. Its definition
-+ is an initializer with a subgrouping for each command option.
-+
-+ Each subgrouping contains a string constant, that defines the
-+ specification name, and a string constant that used by the GNU CC driver
-+ program.
-+
-+ Do not define this macro if it does not need to do anything. */
-+
-+/*#undef SUBTARGET_EXTRA_SPECS
-+#define SUBTARGET_EXTRA_SPECS \
-+ { "mingw_include_path", DEFAULT_TARGET_MACHINE }*/
-+
-+/* We have to dynamic link to get to the system DLLs. All of libc, libm and
-+ the Unix stuff is in cygwin.dll. The import library is called
-+ 'libcygwin.a'. For Windows applications, include more libraries, but
-+ always include kernel32. We'd like to specific subsystem windows to
-+ ld, but that doesn't work just yet. */
-+
-+#undef LIB_SPEC
-+#define LIB_SPEC "-lkernel32 %{mwindows:-luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 -lm} \
-+ -lpthread -lc %{mdll:-lpeasu}"
-+
-+
-+#define LINK_SPEC "%{mwindows:--subsystem windows} %{mconsole:--subsystem console} \
-+ %{mdll:--dll -e _DllMainCRTStartup@12 --file-alignment 0x1000}"
-+
-+
-+
-+#define SIZE_TYPE "unsigned int"
-+#define PTRDIFF_TYPE "int"
-+#define WCHAR_UNSIGNED 1
-+#define WCHAR_TYPE_SIZE 16
-+#define WCHAR_TYPE "short unsigned int"
-+
-+#define HAVE_ATEXIT 1
-+
-+
-+/* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */
-+#define HANDLE_PRAGMA_PACK_PUSH_POP 1
-+
-+/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
-+ is a valid machine specific attribute for DECL.
-+ The attributes in ATTRIBUTES have previously been assigned to DECL. */
-+extern int i386_pe_valid_decl_attribute_p ();
-+
-+#undef VALID_MACHINE_DECL_ATTRIBUTE
-+#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
-+ i386_pe_valid_decl_attribute_p (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
-+
-+/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
-+ is a valid machine specific attribute for TYPE.
-+ The attributes in ATTRIBUTES have previously been assigned to TYPE. */
-+
-+#undef VALID_MACHINE_TYPE_ATTRIBUTE
-+#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
-+ i386_pe_valid_type_attribute_p (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)
-+extern int i386_pe_valid_type_attribute_p ();
-+
-+extern union tree_node *i386_pe_merge_decl_attributes ();
-+#define MERGE_MACHINE_DECL_ATTRIBUTES(OLD, NEW) \
-+ i386_pe_merge_decl_attributes ((OLD), (NEW))
-+
-+/* Used to implement dllexport overriding dllimport semantics. It's also used
-+ to handle vtables - the first pass won't do anything because
-+ DECL_CONTEXT (DECL) will be 0 so i386_pe_dll{ex,im}port_p will return 0.
-+ It's also used to handle dllimport override semantics. */
-+#if 0
-+#define REDO_SECTION_INFO_P(DECL) \
-+ ((DECL_MACHINE_ATTRIBUTES (DECL) != NULL_TREE) \
-+ || (TREE_CODE (DECL) == VAR_DECL && DECL_VIRTUAL_P (DECL)))
-+#else
-+#define REDO_SECTION_INFO_P(DECL) 1
-+#endif
-+
-+
-+#undef EXTRA_SECTIONS
-+#define EXTRA_SECTIONS in_ctor, in_dtor, in_drectve
-+
-+#undef EXTRA_SECTION_FUNCTIONS
-+#define EXTRA_SECTION_FUNCTIONS \
-+ CTOR_SECTION_FUNCTION \
-+ DTOR_SECTION_FUNCTION \
-+ DRECTVE_SECTION_FUNCTION \
-+ SWITCH_TO_SECTION_FUNCTION
-+
-+#define CTOR_SECTION_FUNCTION \
-+void \
-+ctor_section () \
-+{ \
-+ if (in_section != in_ctor) \
-+ { \
-+ fprintf (asm_out_file, "\t.section .ctor\n"); \
-+ in_section = in_ctor; \
-+ } \
-+}
-+
-+#define DTOR_SECTION_FUNCTION \
-+void \
-+dtor_section () \
-+{ \
-+ if (in_section != in_dtor) \
-+ { \
-+ fprintf (asm_out_file, "\t.section .dtor\n"); \
-+ in_section = in_dtor; \
-+ } \
-+}
-+
-+#define DRECTVE_SECTION_FUNCTION \
-+void \
-+drectve_section () \
-+{ \
-+ if (in_section != in_drectve) \
-+ { \
-+ fprintf (asm_out_file, "%s\n", "\t.section .drectve\n"); \
-+ in_section = in_drectve; \
-+ } \
-+}
-+
-+/* Switch to SECTION (an `enum in_section').
-+
-+ ??? This facility should be provided by GCC proper.
-+ The problem is that we want to temporarily switch sections in
-+ ASM_DECLARE_OBJECT_NAME and then switch back to the original section
-+ afterwards. */
-+#define SWITCH_TO_SECTION_FUNCTION \
-+void \
-+switch_to_section (section, decl) \
-+ enum in_section section; \
-+ tree decl; \
-+{ \
-+ switch (section) \
-+ { \
-+ case in_text: text_section (); break; \
-+ case in_data: data_section (); break; \
-+ case in_named: named_section (decl, NULL, 0); break; \
-+ case in_ctor: ctor_section (); break; \
-+ case in_dtor: dtor_section (); break; \
-+ case in_drectve: drectve_section (); break; \
-+ default: abort (); break; \
-+ } \
-+}
-+
-+#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
-+ do { \
-+ ctor_section (); \
-+ fprintf (FILE, "%s\t", ASM_LONG); \
-+ assemble_name (FILE, NAME); \
-+ fprintf (FILE, "\n"); \
-+ } while (0)
-+
-+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
-+ do { \
-+ dtor_section (); \
-+ fprintf (FILE, "%s\t", ASM_LONG); \
-+ assemble_name (FILE, NAME); \
-+ fprintf (FILE, "\n"); \
-+ } while (0)
-+
-+/* Don't allow flag_pic to propagate since gas may produce invalid code
-+ otherwise. */
-+
-+#undef SUBTARGET_OVERRIDE_OPTIONS
-+#define SUBTARGET_OVERRIDE_OPTIONS \
-+do { \
-+ if (flag_pic) \
-+ { \
-+ warning ("-f%s ignored for target (all code is position independent)",\
-+ (flag_pic > 1) ? "PIC" : "pic"); \
-+ flag_pic = 0; \
-+ } \
-+} while (0) \
-+
-+/* Define this macro if references to a symbol must be treated
-+ differently depending on something about the variable or
-+ function named by the symbol (such as what section it is in).
-+
-+ On i386 running Windows NT, modify the assembler name with a suffix
-+ consisting of an atsign (@) followed by string of digits that represents
-+ the number of bytes of arguments passed to the function, if it has the
-+ attribute STDCALL.
-+
-+ In addition, we must mark dll symbols specially. Definitions of
-+ dllexport'd objects install some info in the .drectve section.
-+ References to dllimport'd objects are fetched indirectly via
-+ _imp__. If both are declared, dllexport overrides. This is also
-+ needed to implement one-only vtables: they go into their own
-+ section and we need to set DECL_SECTION_NAME so we do that here.
-+ Note that we can be called twice on the same decl. */
-+
-+extern void i386_pe_encode_section_info ();
-+
-+#ifdef ENCODE_SECTION_INFO
-+#undef ENCODE_SECTION_INFO
-+#endif
-+#define ENCODE_SECTION_INFO(DECL) i386_pe_encode_section_info (DECL)
-+
-+/* Utility used only in this file. */
-+#define I386_PE_STRIP_ENCODING(SYM_NAME) \
-+ ((SYM_NAME) + ((SYM_NAME)[0] == '@' ? 3 : 0))
-+
-+/* This macro gets just the user-specified name
-+ out of the string in a SYMBOL_REF. Discard
-+ trailing @[NUM] encoded by ENCODE_SECTION_INFO. */
-+#undef STRIP_NAME_ENCODING
-+#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
-+do { \
-+ char *_p; \
-+ char *_name = I386_PE_STRIP_ENCODING (SYMBOL_NAME); \
-+ for (_p = _name; *_p && *_p != '@'; ++_p) \
-+ ; \
-+ if (*_p == '@') \
-+ { \
-+ int _len = _p - _name; \
-+ (VAR) = (char *) alloca (_len + 1); \
-+ strncpy ((VAR), _name, _len); \
-+ (VAR)[_len] = '\0'; \
-+ } \
-+ else \
-+ (VAR) = _name; \
-+} while (0)
-+
-+
-+/* Output a reference to a label. */
-+#undef ASM_OUTPUT_LABELREF
-+#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
-+ fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \
-+ I386_PE_STRIP_ENCODING (NAME)) \
-+
-+/* Output a common block. */
-+#undef ASM_OUTPUT_COMMON
-+#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
-+do { \
-+ if (i386_pe_dllexport_name_p (NAME)) \
-+ i386_pe_record_exported_symbol (NAME, 1); \
-+ if (! i386_pe_dllimport_name_p (NAME)) \
-+ { \
-+ fprintf ((STREAM), "\t.comm\t"); \
-+ assemble_name ((STREAM), (NAME)); \
-+ fprintf ((STREAM), ", %d\t%s %d\n", \
-+ (ROUNDED), ASM_COMMENT_START, (SIZE)); \
-+ } \
-+} while (0)
-+
-+/* Output the label for an initialized variable. */
-+#undef ASM_DECLARE_OBJECT_NAME
-+#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
-+do { \
-+ if (i386_pe_dllexport_name_p (NAME)) \
-+ i386_pe_record_exported_symbol (NAME, 1); \
-+ ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
-+} while (0)
-+
-+
-+/* Emit code to check the stack when allocating more that 4000
-+ bytes in one go. */
-+
-+#define CHECK_STACK_LIMIT 4000
-+
-+/* By default, target has a 80387, uses IEEE compatible arithmetic,
-+ and returns float values in the 387 and needs stack probes */
-+#undef TARGET_DEFAULT
-+
-+#define TARGET_DEFAULT \
-+ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE)
-+
-+/* This is how to output an assembler line
-+ that says to advance the location counter
-+ to a multiple of 2**LOG bytes. */
-+
-+#undef ASM_OUTPUT_ALIGN
-+#define ASM_OUTPUT_ALIGN(FILE,LOG) \
-+ if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
-+
-+/* Define this macro if in some cases global symbols from one translation
-+ unit may not be bound to undefined symbols in another translation unit
-+ without user intervention. For instance, under Microsoft Windows
-+ symbols must be explicitly imported from shared libraries (DLLs). */
-+#define MULTIPLE_SYMBOL_SPACES
-+
-+#define UNIQUE_SECTION_P(DECL) DECL_ONE_ONLY (DECL)
-+extern void i386_pe_unique_section ();
-+#define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC)
-+
-+#define SUPPORTS_ONE_ONLY 1
-+
-+/* A C statement to output something to the assembler file to switch to section
-+ NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
-+ NULL_TREE. Some target formats do not support arbitrary sections. Do not
-+ define this macro in such cases. */
-+#undef ASM_OUTPUT_SECTION_NAME
-+#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \
-+do { \
-+ static struct section_info \
-+ { \
-+ struct section_info *next; \
-+ char *name; \
-+ enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \
-+ } *sections; \
-+ struct section_info *s; \
-+ char *mode; \
-+ enum sect_enum type; \
-+ \
-+ for (s = sections; s; s = s->next) \
-+ if (!strcmp (NAME, s->name)) \
-+ break; \
-+ \
-+ if (DECL && TREE_CODE (DECL) == FUNCTION_DECL) \
-+ type = SECT_EXEC, mode = "x"; \
-+ else if (DECL && DECL_READONLY_SECTION (DECL, RELOC)) \
-+ type = SECT_RO, mode = ""; \
-+ else \
-+ { \
-+ type = SECT_RW; \
-+ if (TREE_CODE (DECL) == VAR_DECL \
-+ && lookup_attribute ("shared", DECL_MACHINE_ATTRIBUTES (DECL))) \
-+ mode = "ws"; \
-+ else \
-+ mode = "w"; \
-+ } \
-+ \
-+ if (s == 0) \
-+ { \
-+ s = (struct section_info *) xmalloc (sizeof (struct section_info)); \
-+ s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME)); \
-+ strcpy (s->name, NAME); \
-+ s->type = type; \
-+ s->next = sections; \
-+ sections = s; \
-+ fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode); \
-+ /* Functions may have been compiled at various levels of \
-+ optimization so we can't use `same_size' here. Instead, \
-+ have the linker pick one. */ \
-+ if ((DECL) && DECL_ONE_ONLY (DECL)) \
-+ fprintf (STREAM, "\t.linkonce %s\n", \
-+ TREE_CODE (DECL) == FUNCTION_DECL \
-+ ? "discard" : "same_size"); \
-+ } \
-+ else \
-+ { \
-+ fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode); \
-+ } \
-+} while (0)
-+
-+/* Write the extra assembler code needed to declare a function
-+ properly. If we are generating SDB debugging information, this
-+ will happen automatically, so we only need to handle other cases. */
-+#undef ASM_DECLARE_FUNCTION_NAME
-+#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
-+ do \
-+ { \
-+ if (i386_pe_dllexport_name_p (NAME)) \
-+ i386_pe_record_exported_symbol (NAME, 0); \
-+ if (write_symbols != SDB_DEBUG) \
-+ i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \
-+ ASM_OUTPUT_LABEL (FILE, NAME); \
-+ } \
-+ while (0)
-+
-+/* Add an external function to the list of functions to be declared at
-+ the end of the file. */
-+#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
-+ do \
-+ { \
-+ if (TREE_CODE (DECL) == FUNCTION_DECL) \
-+ i386_pe_record_external_function (NAME); \
-+ } \
-+ while (0)
-+
-+/* Declare the type properly for any external libcall. */
-+#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
-+ i386_pe_declare_function_type (FILE, XSTR (FUN, 0), 1)
-+
-+/* This says out to put a global symbol in the BSS section. */
-+#undef ASM_OUTPUT_ALIGNED_BSS
-+#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
-+ asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
-+
-+/* Output function declarations at the end of the file. */
-+#define ASM_FILE_END(FILE) \
-+ i386_pe_asm_file_end (FILE)
-+
-+#undef ASM_COMMENT_START
-+#define ASM_COMMENT_START " #"
-+
-+/* DWARF2 Unwinding doesn't work with exception handling yet. */
-+#define DWARF2_UNWIND_INFO 0
-+
-+/* Don't assume anything about the header files. */
-+#define NO_IMPLICIT_EXTERN_C
-+
-+#define SUBTARGET_PROLOGUE \
-+ if (profile_flag \
-+ && strcmp (IDENTIFIER_POINTER (DECL_NAME (current_function_decl)),\
-+ "main") == 0) \
-+ { \
-+ rtx xops[1]; \
-+ xops[0] = gen_rtx_MEM (FUNCTION_MODE, \
-+ gen_rtx (SYMBOL_REF, Pmode, "_monstartup")); \
-+ if (do_rtl) \
-+ emit_call_insn (gen_rtx (CALL, VOIDmode, xops[0], const0_rtx)); \
-+ else \
-+ output_asm_insn (AS1 (call,%P1), xops); \
-+ }
-+
-+/* External function declarations. */
-+
-+#ifndef PROTO
-+#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
-+#define PROTO(ARGS) ARGS
-+#else
-+#define PROTO(ARGS) ()
-+#endif
-+#endif
-+
-+#ifdef BUFSIZ /* stdio.h has been included, ok to use FILE * */
-+#define STDIO_PROTO(ARGS) PROTO(ARGS)
-+#else
-+#define STDIO_PROTO(ARGS) ()
-+#endif
-+
-+extern void i386_pe_record_external_function PROTO((char *));
-+extern void i386_pe_declare_function_type STDIO_PROTO((FILE *, char *, int));
-+extern void i386_pe_record_exported_symbol PROTO((char *, int));
-+extern void i386_pe_asm_file_end STDIO_PROTO((FILE *));
-+
-+/* For Win32 ABI compatibility */
-+#undef DEFAULT_PCC_STRUCT_RETURN
-+#define DEFAULT_PCC_STRUCT_RETURN 0
-+
-+/* No data type wants to be aligned rounder than this. */
-+#undef BIGGEST_ALIGNMENT
-+#define BIGGEST_ALIGNMENT 128
-+
-+/* A bitfield declared as `int' forces `int' alignment for the struct. */
-+#undef PCC_BITFIELD_TYPE_MATTERS
-+#define PCC_BITFIELD_TYPE_MATTERS 1
-+#define GROUP_BITFIELDS_BY_ALIGN TYPE_NATIVE(rec)
-+
-+/* Enable alias attribute support. */
-+#ifndef SET_ASM_OP
-+#define SET_ASM_OP "\t.set"
-+#endif
-+
+
+ #undef ENDFILE_SPEC
+-#define ENDFILE_SPEC "%{!fno-exceptions:crtend%O%s}"
++#define ENDFILE_SPEC ""
+
+ /* An additional prefix to try after the standard prefixes. */
+ #undef MD_STARTFILE_PREFIX
+@@ -111,3 +108,6 @@ do { \
+ /* When we are ready for Dwarf2 EH handling */
+ #undef DWARF2_UNWIND_INFO
+ #define DWARF2_UNWIND_INFO 1
++
++#undef BIGGEST_FIELD_ALIGNMENT
++#define BIGGEST_FIELD_ALIGNMENT 32