diff options
author | joerg <joerg@pkgsrc.org> | 2014-12-12 13:30:07 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2014-12-12 13:30:07 +0000 |
commit | 5bc63a014156d95bf7a9a9faf362a3aa1d028f72 (patch) | |
tree | 4f35fc6fe203d1dbfaac5c8fb63f9f22cb63804a | |
parent | c30e9c3cf97720d5382781c64ebd3c1a5cf73afa (diff) | |
download | pkgsrc-5bc63a014156d95bf7a9a9faf362a3aa1d028f72.tar.gz |
Remove cross/COMMON, nothing seems to use it and it hasn't t been
changed in a decade.
27 files changed, 1 insertions, 2780 deletions
diff --git a/cross/COMMON/PLIST-binutils b/cross/COMMON/PLIST-binutils deleted file mode 100644 index 48e750e7a33..00000000000 --- a/cross/COMMON/PLIST-binutils +++ /dev/null @@ -1,23 +0,0 @@ -@comment $NetBSD: PLIST-binutils,v 1.2 1999/01/04 22:37:30 tv Exp $ -bin/${TARGET_ARCH}-addr2line -bin/${TARGET_ARCH}-ar -bin/${TARGET_ARCH}-as -bin/${TARGET_ARCH}-ld -bin/${TARGET_ARCH}-nm -bin/${TARGET_ARCH}-objcopy -bin/${TARGET_ARCH}-objdump -bin/${TARGET_ARCH}-ranlib -bin/${TARGET_ARCH}-size -bin/${TARGET_ARCH}-strings -bin/${TARGET_ARCH}-strip -${TARGET_ARCH}/bin/addr2line -${TARGET_ARCH}/bin/ar -${TARGET_ARCH}/bin/as -${TARGET_ARCH}/bin/ld -${TARGET_ARCH}/bin/nm -${TARGET_ARCH}/bin/objcopy -${TARGET_ARCH}/bin/objdump -${TARGET_ARCH}/bin/ranlib -${TARGET_ARCH}/bin/size -${TARGET_ARCH}/bin/strings -${TARGET_ARCH}/bin/strip diff --git a/cross/COMMON/PLIST-egcs b/cross/COMMON/PLIST-egcs deleted file mode 100644 index 68a4d86085f..00000000000 --- a/cross/COMMON/PLIST-egcs +++ /dev/null @@ -1,42 +0,0 @@ -@comment $NetBSD: PLIST-egcs,v 1.5 2009/06/14 18:34:00 joerg Exp $ -${TARGET_ARCH}/bin/cc -${TARGET_ARCH}/bin/gcc -bin/${TARGET_ARCH}-cc -bin/${TARGET_ARCH}-gcc -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/cc1 -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/collect2 -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/cpp -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/README -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/exception -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/float.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/iso646.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/limits.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/new -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/new.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/proto.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/stdarg.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/stdbool.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/stddef.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/syslimits.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/typeinfo -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-alpha.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-arc.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-clipper.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-h8300.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-i860.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-i960.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-m32r.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-m88k.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-mips.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-mn10200.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-mn10300.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-pa.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-ppc.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-pyr.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-sh.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-sparc.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-spur.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/va-v850.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/varargs.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/libgcc.a -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/specs diff --git a/cross/COMMON/PLIST-egcs-cxx b/cross/COMMON/PLIST-egcs-cxx deleted file mode 100644 index 79a9523ec94..00000000000 --- a/cross/COMMON/PLIST-egcs-cxx +++ /dev/null @@ -1,8 +0,0 @@ -@comment $NetBSD: PLIST-egcs-cxx,v 1.1 1999/01/06 01:14:20 tv Exp $ -${TARGET_ARCH}/bin/c++ -${TARGET_ARCH}/bin/c++filt -${TARGET_ARCH}/bin/g++ -bin/${TARGET_ARCH}-c++ -bin/${TARGET_ARCH}-c++filt -bin/${TARGET_ARCH}-g++ -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/cc1plus diff --git a/cross/COMMON/PLIST-egcs-cxx-runtime b/cross/COMMON/PLIST-egcs-cxx-runtime deleted file mode 100644 index 7f3377755d0..00000000000 --- a/cross/COMMON/PLIST-egcs-cxx-runtime +++ /dev/null @@ -1,114 +0,0 @@ -@comment $NetBSD: PLIST-egcs-cxx-runtime,v 1.2 2009/06/14 17:39:52 joerg 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 diff --git a/cross/COMMON/PLIST-egcs-f77 b/cross/COMMON/PLIST-egcs-f77 deleted file mode 100644 index 3b3ede1cf2a..00000000000 --- a/cross/COMMON/PLIST-egcs-f77 +++ /dev/null @@ -1,8 +0,0 @@ -@comment $NetBSD: PLIST-egcs-f77,v 1.1 1999/01/06 01:14:20 tv Exp $ -${TARGET_ARCH}/bin/f77 -${TARGET_ARCH}/bin/fort77 -${TARGET_ARCH}/bin/g77 -bin/${TARGET_ARCH}-f77 -bin/${TARGET_ARCH}-fort77 -bin/${TARGET_ARCH}-g77 -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/f771 diff --git a/cross/COMMON/PLIST-egcs-f77-runtime b/cross/COMMON/PLIST-egcs-f77-runtime deleted file mode 100644 index bec96bb095b..00000000000 --- a/cross/COMMON/PLIST-egcs-f77-runtime +++ /dev/null @@ -1,3 +0,0 @@ -@comment $NetBSD: PLIST-egcs-f77-runtime,v 1.1 1999/01/06 01:14:20 tv Exp $ -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/g2c.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/libg2c.a diff --git a/cross/COMMON/PLIST-egcs-objc b/cross/COMMON/PLIST-egcs-objc deleted file mode 100644 index 9a526243e46..00000000000 --- a/cross/COMMON/PLIST-egcs-objc +++ /dev/null @@ -1,2 +0,0 @@ -@comment $NetBSD: PLIST-egcs-objc,v 1.1 1999/01/06 01:14:20 tv Exp $ -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/cc1obj diff --git a/cross/COMMON/PLIST-egcs-objc-runtime b/cross/COMMON/PLIST-egcs-objc-runtime deleted file mode 100644 index b34e1ba2ae8..00000000000 --- a/cross/COMMON/PLIST-egcs-objc-runtime +++ /dev/null @@ -1,12 +0,0 @@ -@comment $NetBSD: PLIST-egcs-objc-runtime,v 1.2 2009/06/14 17:39:52 joerg Exp $ -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/NXConstStr.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/Object.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/Protocol.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/encoding.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/hash.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/objc-api.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/objc-list.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/objc.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/sarray.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/thr.h -lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION}/include/objc/typedstream.h diff --git a/cross/COMMON/buwrapper.c b/cross/COMMON/buwrapper.c deleted file mode 100644 index a5e0a7e0ad7..00000000000 --- a/cross/COMMON/buwrapper.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $NetBSD: buwrapper.c,v 1.2 1999/01/04 22:51:53 tv Exp $ */ - -#include <err.h> -#include <stdlib.h> -#include <string.h> -#include <sysexits.h> -#include <unistd.h> - -/* - * Wrapper for binutils programs. - * - * This frontend sets the appropriate environment variables that tell - * binutils programs which target will be used. - */ - -static const char binsubdir[] = "libexec/binutils"; - -#define PATHLEN sizeof(PREFIX) + sizeof(binsubdir) + 20 - -int main(int argc, char **argv) { - char path[PATHLEN], *p, *prog; - - /* quickly find last part of path component */ - if (p = strrchr(argv[0], '/')) - p++; - else - p = argv[0]; - if (prog = strrchr(p, '-')) - prog++; - else - prog = p; - - /* make program pathname */ - snprintf(path, PATHLEN, "%s/%s/%s", PREFIX, binsubdir, prog); - - /* set up environment */ - setenv("GNUTARGET", GNUTARGET, 0); -#ifdef LDEMULATION - setenv("LDEMULATION", LDEMULATION, 0); -#endif -#ifdef LD_RPATH_LINK - setenv("LD_RPATH_LINK", LD_RPATH_LINK, 1); -#endif - - /* run it! */ - execv(path, argv); - - /* we shouldn't get here. */ - err(EX_OSERR, "(buwrapper): exec %s", path); -} diff --git a/cross/COMMON/cross.mk b/cross/COMMON/cross.mk deleted file mode 100644 index 3afbe0ee2b7..00000000000 --- a/cross/COMMON/cross.mk +++ /dev/null @@ -1,295 +0,0 @@ -# $NetBSD: cross.mk,v 1.40 2009/06/14 22:57:58 joerg Exp $ - -# Shared definitions for building a cross-compile environment. - -.include "../../mk/bsd.prefs.mk" - -DISTNAME= cross-${TARGET_ARCH}-${DISTVERSION} -CATEGORIES+= cross lang -USE_CROSSBASE= yes -PLIST_SRC= ${WRKDIR}/.PLIST_SRC - -HOMEPAGE?= http://egcs.cygnus.com/ - -TARGET_DIR= ${PREFIX}/${TARGET_ARCH} -COMMON_DIR= ${PKGSRCDIR}/cross/COMMON -PLIST_PRE?= ${PKGDIR}/PLIST -MESSAGE_SUBST+= CROSSBASE=${CROSSBASE} - -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-2.15 -BINUTILS_WRKSRC= ${WRKDIR}/${BINUTILS_DISTNAME} - -# Don't use optimizations taken from /etc/mk.conf for the native compiler -CFLAGS= # empty -CXXFLAGS= # empty - -CROSS_DISTFILES+= ${BINUTILS_DISTNAME}.tar.gz -SITES.${BINUTILS_DISTNAME}.tar.gz+= ${MASTER_SITE_GNU:=binutils/} -CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld -DEPENDS+= cross-binutils>=2.15.0.0:../../cross/binutils -PLIST_PRE+= ${COMMON_DIR}/PLIST-binutils - -AS_FOR_TARGET= ${BINUTILS_WRKSRC}/gas/as-new -AR_FOR_TARGET= ${WRKDIR}/ar -NM_FOR_TARGET= ${WRKDIR}/nm -RANLIB_FOR_TARGET= ${WRKDIR}/ranlib -LD_FOR_TARGET= ${WRKDIR}/ld -USE_TOOLS+= patch - -pre-patch: binutils-patch -pre-configure: binutils-configure -do-build: binutils-build -do-install: binutils-install - -binutils-patch: - @for i in ${COMMON_DIR}/patches-binutils/patch-*; do \ - ${PATCH} -d ${BINUTILS_WRKSRC} --forward --quiet -E < $$i; \ - done - -BFD64ARG= --enable-64-bit-bfd - -binutils-configure: - @cd ${BINUTILS_WRKSRC} && ${SETENV} CC="${CC}" ac_cv_path_CC="${CC}" \ - CFLAGS="${CFLAGS}" ${CONFIGURE_ENV} ./configure \ - --prefix=${PREFIX} --host=${MACHINE_GNU_ARCH}--netbsd \ - --target=${TARGET_ARCH} ${BFD64ARG} - cd ${BINUTILS_WRKSRC} && ${MAKE_PROGRAM} configure-bfd - cd ${BINUTILS_WRKSRC} && ${MAKE_PROGRAM} configure-libiberty - cd ${BINUTILS_WRKSRC} && ${MAKE_PROGRAM} configure-intl - cd ${BINUTILS_WRKSRC} && ${MAKE_PROGRAM} configure-gas - -binutils-build: - @cd ${BINUTILS_WRKSRC}/bfd && ${SETENV} ${MAKE_ENV} \ - ${MAKE_PROGRAM} ${MAKE_FLAGS} bfd.h - @cd ${BINUTILS_WRKSRC}/libiberty && ${SETENV} ${MAKE_ENV} \ - ${MAKE_PROGRAM} ${MAKE_FLAGS} all - @cd ${BINUTILS_WRKSRC}/intl && ${SETENV} ${MAKE_ENV} \ - ${MAKE_PROGRAM} ${MAKE_FLAGS} all - @cd ${BINUTILS_WRKSRC}/gas && ${SETENV} ${MAKE_ENV} \ - ${MAKE_PROGRAM} ${MAKE_FLAGS} as-new - ${TEST} -x ${WRKDIR}/ar || ${LINK.c} -o ${WRKDIR}/ar \ - -DPREFIX=\"${PREFIX}\" \ - -DGNUTARGET=\"${BINUTILS_GNUTARGET}\" \ - ${COMMON_DIR}/buwrapper.c - @cd ${WRKDIR} && \ - ${LN} -f ar nm && \ - ${LN} -f ar ranlib - ${TEST} -x ${WRKDIR}/ld || ${LINK.c} -o ${WRKDIR}/ld \ - -DPREFIX=\"${PREFIX}\" \ - -DGNUTARGET=\"${BINUTILS_GNUTARGET}\" \ - -DLDEMULATION=\"${BINUTILS_LDEMULATION}\" \ - -DLD_RPATH_LINK=\"${TARGET_DIR}/lib\" \ - ${COMMON_DIR}/buwrapper.c - -binutils-install: - ${INSTALL_PROGRAM} ${BINUTILS_WRKSRC}/gas/as-new ${TARGET_DIR}/bin/as - ${INSTALL_PROGRAM} ${WRKDIR}/ar ${TARGET_DIR}/bin/ar - ${INSTALL_PROGRAM} ${WRKDIR}/ld ${TARGET_DIR}/bin/ld - for i in addr2line nm objcopy objdump ranlib size strings strip ${BINUTILS_EXTRAS}; do \ - ${LN} -f ${TARGET_DIR}/bin/ar ${TARGET_DIR}/bin/$$i; \ - done - for i in addr2line ar as ld nm objcopy objdump ranlib size strings strip ${BINUTILS_EXTRAS}; do \ - ${LN} -f ${TARGET_DIR}/bin/$$i ${PREFIX}/bin/${TARGET_ARCH}-$$i; \ - done -.endif - -.if defined(USE_CROSS_EGCS) -EGCS_DISTNAME= egcs-1.1.1 -EGCS_DISTDIR= releases/${EGCS_DISTNAME} -EGCS_INTVERSION= egcs-2.91.60 -EGCS_PATCHBUNDLE= ${EGCS_DISTNAME}-NetBSD-19980104.diff.gz -EGCS_WRKSRC= ${WRKDIR}/${EGCS_DISTNAME} -EGCS_LANGUAGES= c # add to these below - -# only using autoheader; 2.13 and 2.54 both work fine -USE_TOOLS+= autoconf - -.if defined(EGCS_MULTILIB) -EGCS_INSTALL_LIB=install-multilib -.else -EGCS_INSTALL_LIB=install-libgcc -.endif - -.if defined(EGCS_NO_RUNTIME) || defined(EGCS_FAKE_RUNTIME) -EGCS_NO_CXX_RUNTIME= yes -EGCS_NO_F77_RUNTIME= yes -EGCS_NO_OBJC_RUNTIME= yes -.endif - -.if !defined(EGCS_NO_CXX) -CXX_CONFIGURE_ARGS+= --with-gxx-include-dir=${TARGET_DIR}/include/g++ -EGCS_LANGUAGES+= c++ -PLIST_PRE+= ${COMMON_DIR}/PLIST-egcs-cxx -.if !defined(EGCS_NO_CXX_RUNTIME) -PLIST_PRE+= ${COMMON_DIR}/PLIST-egcs-cxx-runtime -.endif -.endif - -.if !defined(EGCS_NO_F77) -EGCS_LANGUAGES+= f77 -PLIST_PRE+= ${COMMON_DIR}/PLIST-egcs-f77 -.if !defined(EGCS_NO_F77_RUNTIME) -PLIST_PRE+= ${COMMON_DIR}/PLIST-egcs-f77-runtime -.endif -.endif - -.if !defined(EGCS_NO_OBJC) -EGCS_LANGUAGES+= objc -PLIST_PRE+= ${COMMON_DIR}/PLIST-egcs-objc -.if !defined(EGCS_NO_OBJC_RUNTIME) -PLIST_PRE+= ${COMMON_DIR}/PLIST-egcs-objc-runtime -.endif -.endif - -# the main PLIST needs to go last to get the @dirrm's right -PLIST_PRE+= ${COMMON_DIR}/PLIST-egcs -CROSS_DISTFILES+= ${EGCS_DISTNAME}.tar.gz ${EGCS_PATCHBUNDLE} -SITES.${EGCS_DISTNAME}.tar.gz= # no known-good site; fall back to distfiles mirrors -SITES.${EGCS_PATCHBUNDLE}= ${MASTER_SITE_LOCAL} -USE_TOOLS+= gmake pax - -CC_FOR_TARGET= ${EGCS_WRKSRC}/gcc/xgcc -B${EGCS_WRKSRC}/gcc/ ${CFLAGS_FOR_TARGET} -CXX_FOR_TARGET= ${CC_FOR_TARGET} - -USE_TOOLS+= chmod -EGCS_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="${EGCS_LANGUAGES}" \ - INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \ - INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ - ac_cv_path_ac_cv_prog_chmod="${TOOLS_CHMOD}" -EGCS_MAKE= ${SETENV} ${MAKE_ENV} \ - ${MAKE_PROGRAM} ${MAKE_FLAGS} ${EGCS_MAKE_FLAGS} - -.if defined(EGCS_FAKE_RUNTIME) -CROSS_SYS_INCLUDE= ${WRKDIR}/include -.endif -.if defined(CROSS_SYS_INCLUDE) -CFLAGS_FOR_TARGET+= -idirafter ${CROSS_SYS_INCLUDE} -EGCS_MAKE_FLAGS+= SYSTEM_HEADER_DIR="${CROSS_SYS_INCLUDE}" -.endif -.if defined(SYS_LIB) -LDFLAGS_FOR_TARGET+= -L${SYS_LIB} -.endif - -pre-patch: egcs-patch -pre-configure: egcs-configure -do-build: egcs-build -do-install: egcs-install - -egcs-patch: - @${GZCAT} ${_DISTDIR}/${EGCS_PATCHBUNDLE} | \ - ${PATCH} -d ${EGCS_WRKSRC} --forward --quiet -E - @for i in ${COMMON_DIR}/patches-egcs/patch-*; do \ - ${PATCH} -d ${EGCS_WRKSRC} --forward --quiet -E < $$i; \ - done - -egcs-configure: - @cd ${EGCS_WRKSRC} && ${SETENV} CC="${CC}" ac_cv_path_CC="${CC}" \ - CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" \ - INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \ - INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ - ./configure --prefix=${PREFIX} \ - --host=${MACHINE_GNU_ARCH}--netbsd --target=${TARGET_ARCH} \ - ${CXX_CONFIGURE_ARGS} -.if defined(EGCS_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 - -egcs-build: - @${LN} -sf ${AS_FOR_TARGET} ${EGCS_WRKSRC}/gcc/as - @${LN} -sf ${LD_FOR_TARGET} ${EGCS_WRKSRC}/gcc/ld - @cd ${EGCS_WRKSRC}/gcc && ${EGCS_MAKE} all -.if !defined(EGCS_NO_CXX) && !defined(EGCS_NO_CXX_RUNTIME) - @cd ${EGCS_WRKSRC} && ${EGCS_MAKE} configure-target-libio configure-target-libstdc++ all-target-libio all-target-libstdc++ -.endif -.if !defined(EGCS_NO_F77) && !defined(EGCS_NO_F77_RUNTIME) - @cd ${EGCS_WRKSRC} && ${EGCS_MAKE} configure-target-libf2c all-target-libf2c -.endif -.if !defined(EGCS_NO_OBJC) && !defined(EGCS_NO_OBJC_RUNTIME) - @cd ${EGCS_WRKSRC}/gcc && ${EGCS_MAKE} objc-runtime -.endif - -egcs-install: - @cd ${EGCS_WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} \ - ${MAKE_PROGRAM} ${MAKE_FLAGS} ${EGCS_MAKE_FLAGS} \ - install-common install-headers ${EGCS_INSTALL_LIB} install-driver - ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/lib/gcc-lib/${TARGET_ARCH}/${EGCS_INTVERSION} - ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-gcc ${PREFIX}/bin/${TARGET_ARCH}-cc - ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-gcc ${TARGET_DIR}/bin/cc -.if !defined(EGCS_NO_F77) -.if !defined(EGCS_NO_F77_RUNTIME) - @cd ${EGCS_WRKSRC} && ${EGCS_MAKE} install-target-libf2c -.endif - ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-g77 ${PREFIX}/bin/${TARGET_ARCH}-f77 - ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-g77 ${PREFIX}/bin/${TARGET_ARCH}-fort77 - for file in f77 fort77 g77; do \ - ${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-$$file ${TARGET_DIR}/bin/$$file; \ - done -.endif -.if !defined(EGCS_NO_CXX) -.if !defined(EGCS_NO_CXX_RUNTIME) - @${MKDIR} ${TARGET_DIR}/include/g++/std - @cd ${EGCS_WRKSRC} && ${EGCS_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 - @${RMDIR} -p ${PREFIX}/info 2>/dev/null || ${TRUE} - @${RMDIR} -p ${PREFIX}/man/man1 2>/dev/null || ${TRUE} -.endif - -.if defined(CROSS_DISTFILES) -DISTFILES+= ${CROSS_DISTFILES} -.if defined(EXTRACT_ONLY) -EXTRACT_ONLY+= ${CROSS_DISTFILES:N*.diff.gz} -.else -EXTRACT_ONLY= ${DISTFILES:N*.diff.gz} -.endif -.endif - -.if defined(CROSS_SYS_INCLUDE) && !defined(EGCS_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|$${EGCS_INTVERSION}|${EGCS_INTVERSION}|' \ - ${PLIST_PRE} >${PLIST_SRC} - @${ECHO} '@pkgdir ${TARGET_ARCH}/include' >>${PLIST_SRC} - @${ECHO} '@pkgdir ${TARGET_ARCH}/lib' >>${PLIST_SRC} - -.include "../../mk/bsd.pkg.mk" - -EXTRACT_BEFORE_ARGS:= -X ${COMMON_DIR}/exclude ${EXTRACT_BEFORE_ARGS} diff --git a/cross/COMMON/exclude b/cross/COMMON/exclude deleted file mode 100644 index a3be5a8c5ab..00000000000 --- a/cross/COMMON/exclude +++ /dev/null @@ -1,11 +0,0 @@ -egcs-*/*/tests/* -egcs-*/*/testsuite/* -egcs-*/gcc/*/tests/* -egcs-*/gcc/*/testsuite/* -egcs-*/texinfo/* -binutils-*/*/tests/* -binutils-*/*/testsuite/* -binutils-*/binutils/* -binutils-*/etc/* -binutils-*/gprof/* -binutils-*/ld/* diff --git a/cross/COMMON/netbsd.mk b/cross/COMMON/netbsd.mk deleted file mode 100644 index b07d6d0fa69..00000000000 --- a/cross/COMMON/netbsd.mk +++ /dev/null @@ -1,15 +0,0 @@ -# $NetBSD: netbsd.mk,v 1.2 1998/08/12 18:58:09 tv Exp $ - -# Definitions for building a cross-compile environment for a NetBSD target. - -# If the MACHINE_ARCH matches the package target, we can use a special -# "shortcut" hack that makes use of the native compiler with a bundle of -# includes and libraries for the target version of NetBSD. Otherwise, or -# if USE_EGCS_FOR_NATIVE is set in mk.conf, we use the standard egcs+binutils -# cross setup. (For now, we just use egcs.) - -#.include "../../mk/bsd.prefs.mk" -#.if defined(USE_EGCS_FOR_NATIVE) || (${MACHINE_ARCH} != ${TARGET_ARCH}) -.include "../COMMON/cross.mk" -#.else -#.endif diff --git a/cross/COMMON/patches-binutils/patch-aa b/cross/COMMON/patches-binutils/patch-aa deleted file mode 100644 index 74d3e29a9f1..00000000000 --- a/cross/COMMON/patches-binutils/patch-aa +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-aa,v 1.2 2004/07/09 20:48:15 kristerw Exp $ - ---- gas/Makefile.in.orig Sat Jul 3 02:57:14 2004 -+++ gas/Makefile.in Sat Jul 3 03:00:33 2004 -@@ -710,7 +710,7 @@ - - # How to link with both our special library facilities - # and the system's installed libraries. --GASLIBS = @OPCODES_LIB@ @BFDLIB@ ../libiberty/libiberty.a -+GASLIBS = ${PREFIX}/lib/libbfd.a ${PREFIX}/lib/libiberty.a - - # Files to be copied away after each stage in building. - STAGESTUFF = *.o $(noinst_PROGRAMS) diff --git a/cross/COMMON/patches-egcs/patch-aa b/cross/COMMON/patches-egcs/patch-aa deleted file mode 100644 index 59a1287551b..00000000000 --- a/cross/COMMON/patches-egcs/patch-aa +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-aa,v 1.1 1999/01/04 22:37:30 tv Exp $ - ---- Makefile.in.orig Sat Jun 27 18:08:28 1998 -+++ Makefile.in Thu Aug 13 17:32:08 1998 -@@ -349,6 +349,7 @@ - "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ - "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ - "SHELL=$(SHELL)" \ -+ "SYSTEM_HEADER_DIR=$(SYSTEM_HEADER_DIR)" \ - "EXPECT=$(EXPECT)" \ - "RUNTEST=$(RUNTEST)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ -@@ -356,6 +357,7 @@ - "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ - "YACC=$(YACC)" \ - "exec_prefix=$(exec_prefix)" \ -+ "enable_version_specific_runtime_libs=$(enable_version_specific_runtime_libs)" \ - "prefix=$(prefix)" \ - "tooldir=$(tooldir)" \ - "gxx_include_dir=$(gxx_include_dir)" \ -@@ -405,6 +407,7 @@ - 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ - 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ - 'LD=$$(LD_FOR_TARGET)' \ -+ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \ - 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ - 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ - 'NM=$$(NM_FOR_TARGET)' \ diff --git a/cross/COMMON/patches-egcs/patch-ab b/cross/COMMON/patches-egcs/patch-ab deleted file mode 100644 index 61bf2d78f51..00000000000 --- a/cross/COMMON/patches-egcs/patch-ab +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-ab,v 1.1 1999/01/06 01:14:21 tv Exp $ - ---- gcc/objc/Make-lang.in.orig Tue Jan 5 19:01:14 1999 -+++ gcc/objc/Make-lang.in Tue Jan 5 19:01:28 1999 -@@ -50,8 +50,8 @@ - - # - # Define the names for selecting Objective-C in LANGUAGES. --OBJC objc: cc1obj$(exeext) objc-runtime --OBJECTIVE-C objective-c: cc1obj$(exeext) objc-runtime -+OBJC objc: cc1obj$(exeext) -+OBJECTIVE-C objective-c: cc1obj$(exeext) - - # Tell GNU make to ignore these if they exist. - .PHONY: objective-c objc ObjC diff --git a/cross/COMMON/patches-egcs/patch-ac b/cross/COMMON/patches-egcs/patch-ac deleted file mode 100644 index bd2370da8ad..00000000000 --- a/cross/COMMON/patches-egcs/patch-ac +++ /dev/null @@ -1,39 +0,0 @@ ---- libiberty/strerror.c.orig Fri May 15 19:42:41 1998 -+++ libiberty/strerror.c Wed Jan 6 12:10:40 1999 -@@ -7,21 +7,12 @@ - - #include "config.h" - --#ifdef HAVE_SYS_ERRLIST --/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least) -- might declare sys_errlist in a way that the compiler might consider -- incompatible with our later declaration, perhaps by using const -- attributes. So we hide the declaration in errno.h (if any) using a -- macro. */ --#define sys_errlist sys_errlist__ --#endif -- - #include <stdio.h> - #include <errno.h> - --#ifdef HAVE_SYS_ERRLIST --#undef sys_errlist --#endif -+/* Bogus! We have these. */ -+#undef HAVE_SYS_ERRLIST -+#define HAVE_SYS_ERRLIST - - /* Routines imported from standard C runtime libraries. */ - -@@ -459,11 +450,6 @@ - - static int sys_nerr; - static const char **sys_errlist; -- --#else -- --extern int sys_nerr; --extern char *sys_errlist[]; - - #endif - diff --git a/cross/COMMON/patches-egcs/patch-ad b/cross/COMMON/patches-egcs/patch-ad deleted file mode 100644 index 284c9eed4b7..00000000000 --- a/cross/COMMON/patches-egcs/patch-ad +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-ad,v 1.2 2006/01/05 19:31:13 joerg Exp $ - ---- gcc/config/sparc/netbsdelf.h.orig 2005-12-23 17:30:11.000000000 +0000 -+++ gcc/config/sparc/netbsdelf.h -@@ -12,6 +12,12 @@ - #undef CPP_SUBTARGET_SPEC - #define CPP_SUBTARGET_SPEC "" - -+#undef MULDI3_LIBCALL -+#undef DIVDI3_LIBCALL -+#undef UDIVDI3_LIBCALL -+#undef MODDI3_LIBCALL -+#undef UMODDI3_LIBCALL -+ - #define NETBSD_ELF - #include <netbsd.h> - diff --git a/cross/COMMON/patches-egcs/patch-ae b/cross/COMMON/patches-egcs/patch-ae deleted file mode 100644 index 19b4b8e4901..00000000000 --- a/cross/COMMON/patches-egcs/patch-ae +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-ae,v 1.1 1999/02/14 10:12:03 mrg Exp $ - -Index: gcc/configure.in -=================================================================== -RCS file: /cvsroot/src/gnu/dist/gcc/configure.in,v -retrieving revision 1.10 -retrieving revision 1.11 -diff -c -r1.10 -r1.11 -*** gcc/configure.in 1998/12/16 14:49:45 1.10 ---- gcc/configure.in 1999/01/28 22:01:28 1.11 -*************** -*** 862,867 **** ---- 862,874 ---- - fixincludes=fixinc.wrap - tmake_file=i386/t-freebsd - ;; -+ i[[34567]]86-*-netbsdelf*) -+ tm_file=i386/netbsd-elf.h -+ xm_file=i386/xm-netbsd.h -+ # On NetBSD, the headers are already okay, except for math.h. -+ fixincludes=fixinc.wrap -+ tmake_file=t-netbsd -+ ;; - i[[34567]]86-*-netbsd*) - tm_file=i386/netbsd.h - xm_file=i386/xm-netbsd.h diff --git a/cross/COMMON/patches-egcs/patch-af b/cross/COMMON/patches-egcs/patch-af deleted file mode 100644 index 296c7468a47..00000000000 --- a/cross/COMMON/patches-egcs/patch-af +++ /dev/null @@ -1,44 +0,0 @@ -$NetBSD: patch-af,v 1.2 2000/02/19 00:53:40 tsutsui Exp $ - ---- gcc/configure.orig Thu Feb 17 01:07:22 2000 -+++ gcc/configure Fri Feb 18 19:19:50 2000 -@@ -2764,6 +2764,13 @@ - fixincludes=fixinc.wrap - tmake_file=i386/t-freebsd - ;; -+ i[34567]86-*-netbsdelf*) -+ tm_file=i386/netbsd-elf.h -+ xm_file=i386/xm-netbsd.h -+ # On NetBSD, the headers are already okay, except for math.h. -+ fixincludes=fixinc.wrap -+ tmake_file=t-netbsd -+ ;; - i[34567]86-*-netbsd*) - tm_file=i386/netbsd.h - xm_file=i386/xm-netbsd.h -@@ -3857,7 +3864,16 @@ - xm_file=mips/xm-netbsd.h - # On NetBSD, the headers are already okay, except for math.h. - fixincludes=fixinc.wrap -- tmake_file=t-netbsd -+ tmake_file="t-netbsd mips/t-mipsel" -+ xmake_file=none -+ ;; -+ mipseb-*-netbsd*) -+ tm_file=mips/netbsd.h -+ xm_file=mips/xm-netbsd.h -+ # On NetBSD, the headers are already okay, except for math.h. -+ fixincludes=fixinc.wrap -+ tmake_file="t-netbsd mips/t-mipseb" -+ xmake_file=none - ;; - mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news. - tm_file="mips/news4.h ${tm_file}" -@@ -4233,6 +4249,7 @@ - # On NetBSD, the headers are already okay, except for math.h. - fixincludes=fixinc.wrap - tmake_file=t-netbsd -+ xmake_file=none - ;; - powerpc-*-eabiaix*) - tm_file=rs6000/eabiaix.h diff --git a/cross/COMMON/patches-egcs/patch-ag b/cross/COMMON/patches-egcs/patch-ag deleted file mode 100644 index 1ff4403fd57..00000000000 --- a/cross/COMMON/patches-egcs/patch-ag +++ /dev/null @@ -1,605 +0,0 @@ -$NetBSD: patch-ag,v 1.1 1999/02/14 10:12:03 mrg Exp $ - -Index: gcc/config/i386/netbsd-elf.h -*** /dev/null Sun Feb 14 16:47:33 1999 ---- gcc/config/i386/netbsd-elf.h Sun Feb 14 19:03:37 1999 -*************** -*** 0 **** ---- 1,597 ---- -+ /* 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> -+ -+ #define OBJECT_FORMAT_ELF -+ -+ /* This is BSD, so it wants DBX format. */ -+ -+ #if 0 -+ #define DBX_DEBUGGING_INFO -+ -+ /* This is the char to use for continuation (in case we need to turn -+ continuation back on). */ -+ -+ #define DBX_CONTIN_CHAR '?' -+ #endif -+ -+ #undef ASM_FINAL_SPEC -+ -+ /* Names to predefine in the preprocessor for this target machine. -+ XXX NetBSD, by convention, shouldn't do __alpha, but lots of applications -+ expect it because that's what OSF/1 does. */ -+ -+ /* NetBSD Extension to GNU C: __KPRINTF_ATTRIBUTE__ */ -+ -+ #undef CPP_PREDEFINES -+ #define CPP_PREDEFINES "\ -+ -Di386 -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ \ -+ -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 -+ -+ #undef ASM_FILE_START -+ #define ASM_FILE_START(FILE) \ -+ { \ -+ output_file_directive (FILE, main_input_filename); \ -+ fprintf (FILE, "\t.version\t\"01.01\"\n"); \ -+ } -+ -+ /* 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 -+ -+ /* Attach a special .ident directive to the end of the file to identify -+ the version of GCC which compiled this code. The format of the -+ .ident string is patterned after the ones produced by native svr4 -+ C compilers. */ -+ -+ /* Output #ident as a .ident. */ -+ -+ /* This is how to allocate empty space in some section. The .zero -+ pseudo-op is used for this on most svr4 assemblers. */ -+ #undef SKIP_ASM_OP -+ #define SKIP_ASM_OP "\t.zero" -+ -+ #undef ASM_OUTPUT_SKIP -+ #define ASM_OUTPUT_SKIP(FILE,SIZE) \ -+ fprintf (FILE, "\t%s\t%u\n", SKIP_ASM_OP, (SIZE)) -+ -+ /* Output the label which precedes a jumptable. Note that for all svr4 -+ systems where we actually generate jumptables (which is to say every -+ svr4 target except i386, where we use casesi instead) we put the jump- -+ tables into the .rodata section and since other stuff could have been -+ put into the .rodata section prior to any given jumptable, we have to -+ make sure that the location counter for the .rodata section gets pro- -+ perly re-aligned prior to the actual beginning of the jump table. */ -+ -+ #define ALIGN_ASM_OP ".align" -+ -+ #ifndef ASM_OUTPUT_BEFORE_CASE_LABEL -+ #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ -+ ASM_OUTPUT_ALIGN ((FILE), 2); -+ #endif -+ -+ #undef ASM_OUTPUT_CASE_LABEL -+ #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE) \ -+ do { \ -+ ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE) \ -+ ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); \ -+ } while (0) -+ -+ /* The standard SVR4 assembler seems to require that certain builtin -+ library routines (e.g. .udiv) be explicitly declared as .globl -+ in each assembly file where they are referenced. */ -+ -+ #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ -+ ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0)) -+ -+ /* This says how to output assembler code to declare an -+ uninitialized external linkage data object. Under SVR4, -+ the linker seems to want the alignment of data objects -+ to depend on their types. We do exactly that here. */ -+ -+ #define COMMON_ASM_OP ".comm" -+ -+ #undef ASM_OUTPUT_ALIGN -+ #define ASM_OUTPUT_ALIGN(FILE,LOG) \ -+ if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1 << (LOG)) -+ -+ #undef ASM_OUTPUT_ALIGNED_COMMON -+ #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ -+ do { \ -+ fprintf ((FILE), "\t%s\t", COMMON_ASM_OP); \ -+ assemble_name ((FILE), (NAME)); \ -+ fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ -+ } while (0) -+ -+ /* This says how to output assembler code to declare an -+ uninitialized internal linkage data object. Under SVR4, -+ the linker seems to want the alignment of data objects -+ to depend on their types. We do exactly that here. */ -+ -+ #define LOCAL_ASM_OP ".local" -+ -+ #undef ASM_OUTPUT_ALIGNED_LOCAL -+ #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ -+ do { \ -+ fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP); \ -+ assemble_name ((FILE), (NAME)); \ -+ fprintf ((FILE), "\n"); \ -+ ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \ -+ } while (0) -+ -+ /* This is the pseudo-op used to generate a 32-bit word of data with a -+ specific value in some section. */ -+ -+ #define INT_ASM_OP ".long" -+ -+ /* This is the pseudo-op used to generate a contiguous sequence of byte -+ values from a double-quoted string WITHOUT HAVING A TERMINATING NUL -+ AUTOMATICALLY APPENDED. This is the same for most svr4 assemblers. */ -+ -+ #undef ASCII_DATA_ASM_OP -+ #define ASCII_DATA_ASM_OP ".ascii" -+ -+ /* Support const sections and the ctors and dtors sections for g++. -+ Note that there appears to be two different ways to support const -+ sections at the moment. You can either #define the symbol -+ READONLY_DATA_SECTION (giving it some code which switches to the -+ readonly data section) or else you can #define the symbols -+ EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and -+ SELECT_RTX_SECTION. We do both here just to be on the safe side. */ -+ -+ #define USE_CONST_SECTION 1 -+ -+ #define CONST_SECTION_ASM_OP ".section\t.rodata" -+ -+ /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. -+ -+ Note that we want to give these sections the SHF_WRITE attribute -+ because these sections will actually contain data (i.e. tables of -+ addresses of functions in the current root executable or shared library -+ file) and, in the case of a shared library, the relocatable addresses -+ will have to be properly resolved/relocated (and then written into) by -+ the dynamic linker when it actually attaches the given shared library -+ to the executing process. (Note that on SVR4, you may wish to use the -+ `-z text' option to the ELF linker, when building a shared library, as -+ an additional check that you are doing everything right. But if you do -+ use the `-z text' option when building a shared library, you will get -+ errors unless the .ctors and .dtors sections are marked as writable -+ via the SHF_WRITE attribute.) */ -+ -+ #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"aw\"" -+ #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"aw\"" -+ -+ /* On svr4, we *do* have support for the .init and .fini sections, and we -+ can put stuff in there to be executed before and after `main'. We let -+ crtstuff.c and other files know this by defining the following symbols. -+ The definitions say how to change sections to the .init and .fini -+ sections. This is the same for all known svr4 assemblers. */ -+ -+ #define INIT_SECTION_ASM_OP ".section\t.init" -+ #define FINI_SECTION_ASM_OP ".section\t.fini" -+ -+ /* A default list of other sections which we might be "in" at any given -+ time. For targets that use additional sections (e.g. .tdesc) you -+ should override this definition in the target-specific file which -+ includes this file. */ -+ -+ #undef EXTRA_SECTIONS -+ #define EXTRA_SECTIONS in_const, in_ctors, in_dtors -+ -+ /* A default list of extra section function definitions. For targets -+ that use additional sections (e.g. .tdesc) you should override this -+ definition in the target-specific file which includes this file. */ -+ -+ #undef EXTRA_SECTION_FUNCTIONS -+ #define EXTRA_SECTION_FUNCTIONS \ -+ CONST_SECTION_FUNCTION \ -+ CTORS_SECTION_FUNCTION \ -+ DTORS_SECTION_FUNCTION -+ -+ #undef READONLY_DATA_SECTION -+ #define READONLY_DATA_SECTION() const_section () -+ -+ extern void text_section (); -+ -+ #define CONST_SECTION_FUNCTION \ -+ void \ -+ const_section () \ -+ { \ -+ if (!USE_CONST_SECTION) \ -+ text_section(); \ -+ else if (in_section != in_const) \ -+ { \ -+ fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \ -+ in_section = in_const; \ -+ } \ -+ } -+ -+ #define CTORS_SECTION_FUNCTION \ -+ void \ -+ ctors_section () \ -+ { \ -+ if (in_section != in_ctors) \ -+ { \ -+ fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ -+ in_section = in_ctors; \ -+ } \ -+ } -+ -+ #define DTORS_SECTION_FUNCTION \ -+ void \ -+ dtors_section () \ -+ { \ -+ if (in_section != in_dtors) \ -+ { \ -+ fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ -+ in_section = in_dtors; \ -+ } \ -+ } -+ -+ /* Switch into a generic section. -+ This is currently only used to support section attributes. -+ -+ We make the section read-only and executable for a function decl, -+ read-only for a const data decl, and writable for a non-const data decl. */ -+ #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \ -+ fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", NAME, \ -+ (DECL) && TREE_CODE (DECL) == FUNCTION_DECL ? "ax" : \ -+ (DECL) && DECL_READONLY_SECTION (DECL, RELOC) ? "a" : "aw") -+ -+ -+ /* A C statement (sans semicolon) to output an element in the table of -+ global constructors. */ -+ #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ -+ do { \ -+ ctors_section (); \ -+ fprintf (FILE, "\t%s\t ", 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. */ -+ #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ -+ do { \ -+ dtors_section (); \ -+ fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ -+ assemble_name (FILE, NAME); \ -+ fprintf (FILE, "\n"); \ -+ } while (0) -+ -+ /* A C statement or statements to switch to the appropriate -+ section for output of DECL. DECL is either a `VAR_DECL' node -+ or a constant of some sort. RELOC indicates whether forming -+ the initial value of DECL requires link-time relocations. */ -+ -+ #define SELECT_SECTION(DECL,RELOC) \ -+ { \ -+ if (TREE_CODE (DECL) == STRING_CST) \ -+ { \ -+ if (! flag_writable_strings) \ -+ const_section (); \ -+ else \ -+ data_section (); \ -+ } \ -+ else if (TREE_CODE (DECL) == VAR_DECL) \ -+ { \ -+ if ((flag_pic && RELOC) \ -+ || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ -+ || !DECL_INITIAL (DECL) \ -+ || (DECL_INITIAL (DECL) != error_mark_node \ -+ && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ -+ data_section (); \ -+ else \ -+ const_section (); \ -+ } \ -+ else \ -+ const_section (); \ -+ } -+ -+ /* A C statement or statements to switch to the appropriate -+ section for output of RTX in mode MODE. RTX is some kind -+ of constant in RTL. The argument MODE is redundant except -+ in the case of a `const_int' rtx. Currently, these always -+ go into the const section. */ -+ -+ #undef SELECT_RTX_SECTION -+ #define SELECT_RTX_SECTION(MODE,RTX) const_section() -+ -+ /* Define the strings used for the special svr4 .type and .size directives. -+ These strings generally do not vary from one system running svr4 to -+ another, but if a given system (e.g. m88k running svr) needs to use -+ different pseudo-op names for these, they may be overridden in the -+ file which includes this one. */ -+ -+ #define TYPE_ASM_OP ".type" -+ #define SIZE_ASM_OP ".size" -+ -+ /* The following macro defines the format used to output the second -+ operand of the .type assembler directive. Different svr4 assemblers -+ expect various different forms for this operand. The one given here -+ is just a default. You may need to override it in your machine- -+ specific tm.h file (depending upon the particulars of your assembler). */ -+ -+ #define TYPE_OPERAND_FMT "@%s" -+ -+ /* Write the extra assembler code needed to declare a function's result. -+ Most svr4 assemblers don't require any special declaration of the -+ result value, but there are exceptions. */ -+ -+ #ifndef ASM_DECLARE_RESULT -+ #define ASM_DECLARE_RESULT(FILE, RESULT) -+ #endif -+ -+ /* These macros generate the special .type and .size directives which -+ are used to set the corresponding fields of the linker symbol table -+ entries in an ELF object file under SVR4. These macros also output -+ the starting labels for the relevant functions/objects. */ -+ -+ /* 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. */ -+ -+ #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ -+ do { \ -+ fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ -+ assemble_name (FILE, NAME); \ -+ putc (',', FILE); \ -+ fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ -+ putc ('\n', FILE); \ -+ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ -+ ASM_OUTPUT_LABEL(FILE, NAME); \ -+ } while (0) -+ -+ /* Write the extra assembler code needed to declare an object properly. */ -+ -+ #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ -+ do { \ -+ fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ -+ assemble_name (FILE, NAME); \ -+ putc (',', FILE); \ -+ fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ -+ putc ('\n', FILE); \ -+ size_directive_output = 0; \ -+ if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ -+ { \ -+ size_directive_output = 1; \ -+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ -+ assemble_name (FILE, NAME); \ -+ putc (',', FILE); \ -+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ -+ int_size_in_bytes (TREE_TYPE (DECL))); \ -+ fputc ('\n', FILE); \ -+ } \ -+ ASM_OUTPUT_LABEL(FILE, NAME); \ -+ } while (0) -+ -+ /* Output the size directive for a decl in rest_of_decl_compilation -+ in the case where we did not do so before the initializer. -+ Once we find the error_mark_node, we know that the value of -+ size_directive_output was set -+ by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ -+ -+ #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ -+ do { \ -+ char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ -+ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ -+ && ! AT_END && TOP_LEVEL \ -+ && DECL_INITIAL (DECL) == error_mark_node \ -+ && !size_directive_output) \ -+ { \ -+ size_directive_output = 1; \ -+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ -+ assemble_name (FILE, name); \ -+ putc (',', FILE); \ -+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ -+ int_size_in_bytes (TREE_TYPE (DECL))); \ -+ fputc ('\n', FILE); \ -+ } \ -+ } while (0) -+ -+ /* This is how to declare the size of a function. */ -+ -+ #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ -+ do { \ -+ if (!flag_inhibit_size_directive) \ -+ { \ -+ char label[256]; \ -+ static int labelno; \ -+ labelno++; \ -+ ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ -+ ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ -+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ -+ assemble_name (FILE, (FNAME)); \ -+ fprintf (FILE, ","); \ -+ assemble_name (FILE, label); \ -+ fprintf (FILE, "-"); \ -+ assemble_name (FILE, (FNAME)); \ -+ putc ('\n', FILE); \ -+ } \ -+ } while (0) -+ -+ /* 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) -+ -+ /* A table of bytes codes used by the ASM_OUTPUT_ASCII and -+ ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table -+ corresponds to a particular byte value [0..255]. For any -+ given byte value, if the value in the corresponding table -+ position is zero, the given character can be output directly. -+ If the table value is 1, the byte must be output as a \ooo -+ octal escape. If the tables value is anything else, then the -+ byte value should be output as a \ followed by the value -+ in the table. Note that we can use standard UN*X escape -+ sequences for many control characters, but we don't use -+ \a to represent BEL because some svr4 assemblers (e.g. on -+ the i386) don't know about that. Also, we don't use \v -+ since some versions of gas, such as 2.2 did not accept it. */ -+ -+ #define ESCAPES \ -+ "\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ -+ \0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ -+ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\ -+ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\ -+ \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ -+ \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ -+ \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ -+ \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1" -+ -+ /* Some svr4 assemblers have a limit on the number of characters which -+ can appear in the operand of a .string directive. If your assembler -+ has such a limitation, you should define STRING_LIMIT to reflect that -+ limit. Note that at least some svr4 assemblers have a limit on the -+ actual number of bytes in the double-quoted string, and that they -+ count each character in an escape sequence as one byte. Thus, an -+ escape sequence like \377 would count as four bytes. -+ -+ If your target assembler doesn't support the .string directive, you -+ should define this to zero. -+ */ -+ -+ #define STRING_LIMIT ((unsigned) 256) -+ -+ #define STRING_ASM_OP ".string" -+ -+ /* -+ * We always use gas here, so we don't worry about ECOFF assembler problems. -+ */ -+ #undef TARGET_GAS -+ #define TARGET_GAS (1) -+ -+ #if 0 -+ #undef PREFERRED_DEBUGGING_TYPE -+ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG -+ #endif -+ -+ /* 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 --git a/cross/COMMON/patches-egcs/patch-ah b/cross/COMMON/patches-egcs/patch-ah deleted file mode 100644 index 6ea3a3a45a1..00000000000 --- a/cross/COMMON/patches-egcs/patch-ah +++ /dev/null @@ -1,82 +0,0 @@ -$NetBSD: patch-ah,v 1.2 2000/02/19 09:46:14 tsutsui Exp $ - ---- config.sub.orig Sat Apr 4 01:21:57 1998 -+++ config.sub Thu Feb 17 01:16:53 2000 -@@ -165,7 +165,7 @@ - | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \ - | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp11 \ -- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ -+ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-unknown -@@ -212,7 +212,7 @@ - | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \ - | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ -- | sparc64-* | mips64-* | mipsel-* \ -+ | sparc64-* | mips64-* | mipsel-* | mipseb-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) ---- gcc/config.sub.orig Sun Apr 5 02:37:36 1998 -+++ gcc/config.sub Fri Feb 18 19:18:11 2000 -@@ -154,7 +154,7 @@ - | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ -- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ -+ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-unknown -@@ -182,7 +182,7 @@ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ -- | sparc64-* | mips64-* | mipsel-* \ -+ | sparc64-* | mips64-* | mipsel-* | mipseb-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) ---- gcc/config/mips/netbsd.h.orig Thu Feb 17 01:07:26 2000 -+++ gcc/config/mips/netbsd.h Fri Feb 18 19:21:45 2000 -@@ -20,7 +20,11 @@ - - /* Define default target values. */ - -+#ifdef TARGET_BIG_ENDIAN_DEFAULT -+#define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN -+#else - #define TARGET_ENDIAN_DEFAULT 0 -+#endif - #define TARGET_DEFAULT MASK_GAS - - /* Get generic mips ELF definitions. */ -@@ -40,10 +44,17 @@ - /* Define mips-specific netbsd predefines... */ - - #undef CPP_PREDEFINES -+#ifdef TARGET_BIG_ENDIAN_DEFAULT -+#define CPP_PREDEFINES \ -+ "-D__ANSI_COMPAT -DMIPSEB -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \ -+ -D__NetBSD__ -D__ELF__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \ -+ -D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)" -+#else - #define CPP_PREDEFINES \ - "-D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \ - -D__NetBSD__ -D__ELF__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \ - -D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)" -+#endif - - /* Always uses gas. */ - ---- /dev/null Fri Feb 18 19:02:34 2000 -+++ gcc/config/mips/t-mipseb Fri Feb 18 19:22:08 2000 -@@ -0,0 +1 @@ -+T_CFLAGS +=-DTARGET_BIG_ENDIAN_DEFAULT ---- /dev/null Fri Feb 18 19:02:34 2000 -+++ gcc/config/mips/t-mipsel Fri Feb 18 19:22:20 2000 -@@ -0,0 +1 @@ -+T_CFLAGS +=-DTARGET_LITTLE_ENDIAN_DEFAULT diff --git a/cross/COMMON/patches-egcs/patch-ai b/cross/COMMON/patches-egcs/patch-ai deleted file mode 100644 index c0ee46c9f46..00000000000 --- a/cross/COMMON/patches-egcs/patch-ai +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ai,v 1.1 2000/06/11 18:45:54 mycroft Exp $ - ---- gcc/c-common.c.orig Tue Aug 18 18:49:52 1998 -+++ gcc/c-common.c Sun Jun 11 14:41:38 2000 -@@ -1314,7 +1314,8 @@ - - if (integer_zerop (format_tree)) - { -- warning ("null format string"); -+ if (pedantic) -+ warning ("null format string"); - return; - } - if (TREE_CODE (format_tree) != ADDR_EXPR) diff --git a/cross/COMMON/patches-egcs/patch-aj b/cross/COMMON/patches-egcs/patch-aj deleted file mode 100644 index 8beebb39de4..00000000000 --- a/cross/COMMON/patches-egcs/patch-aj +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-aj,v 1.1 2000/09/30 19:04:24 fredb Exp $ - ---- gcc/cpphash.c.orig Thu Jun 1 01:38:11 2000 -+++ gcc/cpphash.c Thu Jun 1 01:54:57 2000 -@@ -88,7 +88,7 @@ - /* Lookups pass no hashcode. #define passes one. Look for no hashcode. */ - if (islookup && !strncmp(name, "unix", len) && !warned_unix) { - warned_unix++; -- warning("deprecated symbol \"unix\" is no longer predefined"); -+ cpp_warning(pfile, "deprecated symbol \"unix\" is no longer predefined"); - } - return (HASHNODE *) 0; - } diff --git a/cross/COMMON/patches-egcs/patch-ak b/cross/COMMON/patches-egcs/patch-ak deleted file mode 100644 index b375f6aaf74..00000000000 --- a/cross/COMMON/patches-egcs/patch-ak +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ak,v 1.1 2006/01/05 19:30:45 joerg Exp $ - ---- gcc/f/com.h.orig 2005-12-23 17:46:13.000000000 +0000 -+++ gcc/f/com.h -@@ -301,7 +301,7 @@ void ffecom_finish_decl (tree decl, tree - void ffecom_finish_progunit (void); - tree ffecom_get_invented_identifier (char *pattern, char *text, - int number); --ffeinfoKindtype ffecom_gfrt_basictype (ffecomGfrt ix); -+ffeinfoBasictype ffecom_gfrt_basictype (ffecomGfrt ix); - ffeinfoKindtype ffecom_gfrt_kindtype (ffecomGfrt ix); - void ffecom_init_0 (void); - void ffecom_init_2 (void); diff --git a/cross/COMMON/patches-egcs/patch-sh b/cross/COMMON/patches-egcs/patch-sh deleted file mode 100644 index 6c1e1bcb6e1..00000000000 --- a/cross/COMMON/patches-egcs/patch-sh +++ /dev/null @@ -1,540 +0,0 @@ -$NetBSD: patch-sh,v 1.1 2001/01/04 01:19:32 itojun Exp $ - ---- config.sub- Wed Jan 3 21:37:56 2001 -+++ config.sub Wed Jan 3 21:38:16 2001 -@@ -165,3 +165,3 @@ - | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \ -- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ -+ | we32k | ns16k | clipper | i370 | sh | shel | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp11 \ -@@ -213,3 +213,3 @@ - | xps100-* | clipper-* | orion-* \ -- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ -+ | sparclite-* | pdp11-* | sh-* | shel-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* | mipseb-* \ -@@ -679,2 +679,5 @@ - os=-hms -+ ;; -+ shel) -+ basic_machine=sh-hitachi - ;; ---- libio/floatconv.c- Wed Jan 3 21:40:32 2001 -+++ libio/floatconv.c Wed Jan 3 21:40:42 2001 -@@ -151,7 +151,7 @@ - #if defined(MIPSEL) || defined(__alpha__) - #define IEEE_8087 - #endif --#if defined(__sparc__) || defined(sparc) || defined(MIPSEB) -+#if defined(__sparc__) || defined(sparc) || defined(MIPSEB) || defined(__sh__) - #define IEEE_MC68k - #endif - ---- gcc/configure.in- Wed Jan 3 21:41:07 2001 -+++ gcc/configure.in Wed Jan 3 21:42:27 2001 -@@ -318,6 +318,9 @@ - pyramid-*-*) - cpu_type=pyr - ;; -+ sh*-*-*) -+ cpu_type=sh -+ ;; - sparc*-*-*) - cpu_type=sparc - ;; -@@ -2570,6 +2573,30 @@ - sh-*-rtems*) - tmake_file="sh/t-sh t-rtems" - tm_file=sh/rtems.h -+ float_format=sh -+ ;; -+ sh-*-netbsdcoff) -+ tm_file=sh/netbsdcoff.h -+ use_collect2= -+ fixincludes=fixinc.wrap -+ float_format=sh -+ ;; -+ shel-*-netbsdcoff) -+ tm_file=sh/netbsdelcoff.h -+ use_collect2= -+ fixincludes=fixinc.wrap -+ float_format=sh -+ ;; -+ sh-*-netbsdelf) -+ tm_file=sh/netbsdelf.h -+ use_collect2= -+ fixincludes=fixinc.wrap -+ float_format=sh -+ ;; -+ shel-*-netbsdelf) -+ tm_file=sh/netbsdelelf.h -+ use_collect2= -+ fixincludes=fixinc.wrap - float_format=sh - ;; - sh-*-*) ---- gcc/configure- Wed Jan 3 21:41:09 2001 -+++ gcc/configure Wed Jan 3 21:42:37 2001 -@@ -2220,6 +2220,9 @@ - pyramid-*-*) - cpu_type=pyr - ;; -+ sh*-*-*) -+ cpu_type=sh -+ ;; - sparc*-*-*) - cpu_type=sparc - ;; -@@ -4482,6 +4485,30 @@ - sh-*-rtems*) - tmake_file="sh/t-sh t-rtems" - tm_file=sh/rtems.h -+ float_format=sh -+ ;; -+ sh-*-netbsdcoff) -+ tm_file=sh/netbsdcoff.h -+ use_collect2= -+ fixincludes=fixinc.wrap -+ float_format=sh -+ ;; -+ shel-*-netbsdcoff) -+ tm_file=sh/netbsdelcoff.h -+ use_collect2= -+ fixincludes=fixinc.wrap -+ float_format=sh -+ ;; -+ sh-*-netbsdelf) -+ tm_file=sh/netbsdelf.h -+ use_collect2= -+ fixincludes=fixinc.wrap -+ float_format=sh -+ ;; -+ shel-*-netbsdelf) -+ tm_file=sh/netbsdelelf.h -+ use_collect2= -+ fixincludes=fixinc.wrap - float_format=sh - ;; - sh-*-*) -diff -uN gcc/config/sh/lib1funcs.asm gcc/config/sh/lib1funcs.asm ---- gcc/config/sh/lib1funcs.asm Wed Jan 3 21:39:06 2001 -+++ gcc/config/sh/lib1funcs.asm Wed Jan 3 21:40:10 2001 -@@ -707,7 +707,7 @@ - mov.l r0,@(0,r4) - ___movstrSI0: - rts -- or r0,r0,r0 -+ nop - - .align 4 - -diff -uN gcc/config/sh/netbsdcoff.h gcc/config/sh/netbsdcoff.h ---- gcc/config/sh/netbsdcoff.h Thu Jan 1 09:00:00 1970 -+++ gcc/config/sh/netbsdcoff.h Wed Jan 3 21:43:23 2001 -@@ -0,0 +1,59 @@ -+#include <sh/sh.h> -+ -+#undef CPP_SPEC -+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \ -+%{ml:-D__LITTLE_ENDIAN__} \ -+%{m1:-D__sh1__} \ -+%{m2:-D__sh2__} \ -+%{m3:-D__sh3__} \ -+%{m3e:-D__SH3E__} \ -+%{!m1:%{!m2:%{!m3:%{!m3e:-D__sh1__}}}}" -+ -+#undef CPP_PREDEFINES -+#define CPP_PREDEFINES "-D__sh__ -Dunix -Dsh3 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(sh) -Amachine(sh)" -+ -+/* XXX -fpic -fPIC? (msaitoh) */ -+#undef ASM_SPEC -+#define ASM_SPEC "%{ml:-little} %{mrelax:-relax}" -+ -+#undef LIB_SPEC -+#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" -+ -+#undef LINK_SPEC -+#define LINK_SPEC \ -+ "%{ml:-m shlunx} %{mrelax:-relax} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}" -+ -+/* We have atexit(3). */ -+ -+#define HAVE_ATEXIT -+ -+/* Implicit library calls should use memcpy, not bcopy, etc. */ -+ -+#define TARGET_MEM_FUNCTIONS -+ -+/* Handle #pragma weak and #pragma pack. */ -+ -+#define HANDLE_SYSV_PRAGMA -+ -+ -+/* 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 -+ -+/* Until they use ELF or something that handles dwarf2 unwinds -+ and initialization stuff better. */ -+#undef DWARF2_UNWIND_INFO -+ -diff -uN gcc/config/sh/netbsdelcoff.h gcc/config/sh/netbsdelcoff.h ---- gcc/config/sh/netbsdelcoff.h Thu Jan 1 09:00:00 1970 -+++ gcc/config/sh/netbsdelcoff.h Wed Jan 3 21:43:23 2001 -@@ -0,0 +1,64 @@ -+#include <sh/sh.h> -+ -+#undef CPP_SPEC -+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \ -+%{!mb:-D__LITTLE_ENDIAN__} \ -+%{m1:-D__sh1__} \ -+%{m2:-D__sh2__} \ -+%{m3:-D__sh3__} \ -+%{m3e:-D__SH3E__} \ -+%{!m1:%{!m2:%{!m3:%{!m3e:-D__sh1__}}}}" -+ -+#undef CPP_PREDEFINES -+#define CPP_PREDEFINES "-D__sh__ -Dunix -Dsh3 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(sh) -Amachine(sh)" -+ -+/* XXX -fpic -fPIC? (msaitoh) */ -+#undef ASM_SPEC -+#define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}" -+ -+#undef LIB_SPEC -+#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" -+ -+#undef LINK_SPEC -+#define LINK_SPEC \ -+ "%{!mb:-m shlunx} %{mrelax:-relax} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}" -+ -+/* set default to little endian */ -+ -+#undef TARGET_DEFAULT -+#define TARGET_DEFAULT LITTLE_ENDIAN_BIT -+ -+/* We have atexit(3). */ -+ -+#define HAVE_ATEXIT -+ -+/* Implicit library calls should use memcpy, not bcopy, etc. */ -+ -+#define TARGET_MEM_FUNCTIONS -+ -+/* Handle #pragma weak and #pragma pack. */ -+ -+#define HANDLE_SYSV_PRAGMA -+ -+ -+/* 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 -+ -+/* Until they use ELF or something that handles dwarf2 unwinds -+ and initialization stuff better. */ -+#undef DWARF2_UNWIND_INFO -+ -diff -uN gcc/config/sh/netbsdelelf.h gcc/config/sh/netbsdelelf.h ---- gcc/config/sh/netbsdelelf.h Thu Jan 1 09:00:00 1970 -+++ gcc/config/sh/netbsdelelf.h Wed Jan 3 21:43:23 2001 -@@ -0,0 +1,142 @@ -+/* Definitions of target machine for gcc for Hitachi Super-H using ELF. -+ Copyright (C) 1996 Free Software Foundation, Inc. -+ Contributed by Ian Lance Taylor <ian@cygnus.com>. -+ -+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. */ -+ -+/* Get generic SH definitions. */ -+#include <sh/sh.h> -+ -+/* No SDB debugging info. */ -+#undef SDB_DEBUGGING_INFO -+ -+/* Undefine some macros defined in both sh.h and svr4.h. */ -+#undef IDENT_ASM_OP -+#undef ASM_FILE_END -+#undef ASM_OUTPUT_SOURCE_LINE -+#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END -+#undef CTORS_SECTION_ASM_OP -+#undef DTORS_SECTION_ASM_OP -+#undef ASM_OUTPUT_SECTION_NAME -+#undef ASM_OUTPUT_CONSTRUCTOR -+#undef ASM_OUTPUT_DESTRUCTOR -+#undef ASM_DECLARE_FUNCTION_NAME -+#undef PREFERRED_DEBUGGING_TYPE -+#undef MAX_OFILE_ALIGNMENT -+ -+/* Be ELF-like. */ -+#include <svr4.h> -+ -+/* Get generic NetBSD ELF definitions. */ -+#define NETBSD_ELF -+#include <netbsd.h> -+ -+/* The prefix to add to user-visible assembler symbols. -+ Note that svr4.h redefined it from the original value (that we want) -+ in sh.h */ -+ -+#undef USER_LABEL_PREFIX -+#define USER_LABEL_PREFIX "_" -+ -+#undef LOCAL_LABEL_PREFIX -+#define LOCAL_LABEL_PREFIX "." -+ -+#undef ASM_FILE_START -+#define ASM_FILE_START(FILE) do { \ -+ output_file_directive ((FILE), main_input_filename); \ -+ if (TARGET_LITTLE_ENDIAN) \ -+ fprintf ((FILE), "\t.little\n"); \ -+} while (0) -+ -+#undef CPP_SPEC -+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \ -+%{!mb:-D__LITTLE_ENDIAN__} \ -+%{m1:-D__sh1__} \ -+%{m2:-D__sh2__} \ -+%{m3:-D__sh3__} \ -+%{m3e:-D__SH3E__} \ -+%{!m1:%{!m2:%{!m3:%{!m3e:-D__sh1__}}}}" -+ -+/* Let code know that this is ELF. */ -+#define CPP_PREDEFINES \ -+"-D__sh__ -D__sh3__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ \ -+-Asystem(unix) -Asystem(NetBSD) -Acpu(sh3) -Amachine(sh3)" -+ -+/* svr4.h undefined DBX_REGISTER_NUMBER, so we need to define it -+ again. */ -+#define DBX_REGISTER_NUMBER(REGNO) \ -+ (((REGNO) >= 22 && (REGNO) <= 39) ? ((REGNO) + 1) : (REGNO)) -+ -+/* SH ELF, unlike most ELF implementations, uses underscores before -+ symbol names. */ -+#undef ASM_OUTPUT_LABELREF -+#define ASM_OUTPUT_LABELREF(STREAM,NAME) \ -+ asm_fprintf (STREAM, "%U%s", NAME) -+ -+#undef ASM_GENERATE_INTERNAL_LABEL -+#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ -+ sprintf ((STRING), "*%s%s%d", LOCAL_LABEL_PREFIX, (PREFIX), (NUM)) -+ -+#undef ASM_OUTPUT_INTERNAL_LABEL -+#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ -+ asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM)) -+ -+#undef ASM_OUTPUT_SOURCE_LINE -+#define ASM_OUTPUT_SOURCE_LINE(file, line) \ -+do \ -+ { \ -+ static int sym_lineno = 1; \ -+ asm_fprintf ((file), ".stabn 68,0,%d,%LLM%d-", \ -+ (line), sym_lineno); \ -+ assemble_name ((file), \ -+ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\ -+ asm_fprintf ((file), "\n%LLM%d:\n", sym_lineno); \ -+ sym_lineno += 1; \ -+ } \ -+while (0) -+ -+#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END -+#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ -+do { \ -+ text_section (); \ -+ fprintf ((FILE), "\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO); \ -+} while (0) -+ -+/* HANDLE_SYSV_PRAGMA (defined by svr4.h) takes precedence over HANDLE_PRAGMA. -+ We want to use the HANDLE_PRAGMA from sh.h. */ -+#undef HANDLE_SYSV_PRAGMA -+ -+#undef ASM_SPEC -+#define ASM_SPEC \ -+ "%{!mb:-little} %{mrelax:-relax} %{fpic:-k} %{fPIC:-k}" -+ -+#undef LINK_SPEC -+#define LINK_SPEC \ -+ "%{!mb:-m elf32shlunx} %{mrelax:-relax} \ -+ %{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}}" -+ -+#undef TARGET_DEFAULT -+#define TARGET_DEFAULT LITTLE_ENDIAN_BIT -diff -uN gcc/config/sh/netbsdelf.h gcc/config/sh/netbsdelf.h ---- gcc/config/sh/netbsdelf.h Thu Jan 1 09:00:00 1970 -+++ gcc/config/sh/netbsdelf.h Wed Jan 3 21:43:23 2001 -@@ -0,0 +1,130 @@ -+/* Definitions of target machine for gcc for Hitachi Super-H using ELF. -+ Copyright (C) 1996 Free Software Foundation, Inc. -+ Contributed by Ian Lance Taylor <ian@cygnus.com>. -+ -+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. */ -+ -+/* Get generic SH definitions. */ -+#include <sh/sh.h> -+ -+/* No SDB debugging info. */ -+#undef SDB_DEBUGGING_INFO -+ -+/* Undefine some macros defined in both sh.h and svr4.h. */ -+#undef IDENT_ASM_OP -+#undef ASM_FILE_END -+#undef ASM_OUTPUT_SOURCE_LINE -+#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END -+#undef CTORS_SECTION_ASM_OP -+#undef DTORS_SECTION_ASM_OP -+#undef ASM_OUTPUT_SECTION_NAME -+#undef ASM_OUTPUT_CONSTRUCTOR -+#undef ASM_OUTPUT_DESTRUCTOR -+#undef ASM_DECLARE_FUNCTION_NAME -+#undef PREFERRED_DEBUGGING_TYPE -+#undef MAX_OFILE_ALIGNMENT -+ -+/* Be ELF-like. */ -+#include <svr4.h> -+ -+/* Get generic NetBSD ELF definitions. */ -+#define NETBSD_ELF -+#include <netbsd.h> -+ -+/* The prefix to add to user-visible assembler symbols. -+ Note that svr4.h redefined it from the original value (that we want) -+ in sh.h */ -+ -+#undef USER_LABEL_PREFIX -+#define USER_LABEL_PREFIX "_" -+ -+#undef LOCAL_LABEL_PREFIX -+#define LOCAL_LABEL_PREFIX "." -+ -+#undef ASM_FILE_START -+#define ASM_FILE_START(FILE) do { \ -+ output_file_directive ((FILE), main_input_filename); \ -+ if (TARGET_LITTLE_ENDIAN) \ -+ fprintf ((FILE), "\t.little\n"); \ -+} while (0) -+ -+/* Let code know that this is ELF. */ -+#define CPP_PREDEFINES \ -+"-D__sh__ -D__sh3__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ \ -+-Asystem(unix) -Asystem(NetBSD) -Acpu(sh3) -Amachine(sh3)" -+ -+/* svr4.h undefined DBX_REGISTER_NUMBER, so we need to define it -+ again. */ -+#define DBX_REGISTER_NUMBER(REGNO) \ -+ (((REGNO) >= 22 && (REGNO) <= 39) ? ((REGNO) + 1) : (REGNO)) -+ -+/* SH ELF, unlike most ELF implementations, uses underscores before -+ symbol names. */ -+#undef ASM_OUTPUT_LABELREF -+#define ASM_OUTPUT_LABELREF(STREAM,NAME) \ -+ asm_fprintf (STREAM, "%U%s", NAME) -+ -+#undef ASM_GENERATE_INTERNAL_LABEL -+#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ -+ sprintf ((STRING), "*%s%s%d", LOCAL_LABEL_PREFIX, (PREFIX), (NUM)) -+ -+#undef ASM_OUTPUT_INTERNAL_LABEL -+#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ -+ asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM)) -+ -+#undef ASM_OUTPUT_SOURCE_LINE -+#define ASM_OUTPUT_SOURCE_LINE(file, line) \ -+do \ -+ { \ -+ static int sym_lineno = 1; \ -+ asm_fprintf ((file), ".stabn 68,0,%d,%LLM%d-", \ -+ (line), sym_lineno); \ -+ assemble_name ((file), \ -+ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\ -+ asm_fprintf ((file), "\n%LLM%d:\n", sym_lineno); \ -+ sym_lineno += 1; \ -+ } \ -+while (0) -+ -+#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END -+#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ -+do { \ -+ text_section (); \ -+ fprintf ((FILE), "\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO); \ -+} while (0) -+ -+/* HANDLE_SYSV_PRAGMA (defined by svr4.h) takes precedence over HANDLE_PRAGMA. -+ We want to use the HANDLE_PRAGMA from sh.h. */ -+#undef HANDLE_SYSV_PRAGMA -+ -+#undef ASM_SPEC -+#define ASM_SPEC \ -+ "%{ml:-little} %{mrelax:-relax} %{fpic:-k} %{fPIC:-k}" -+ -+#undef LINK_SPEC -+#define LINK_SPEC \ -+ "%{ml:-m elf32shlunx} %{mrelax:-relax} \ -+ %{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}}" diff --git a/cross/COMMON/patches-egcs/patch-st b/cross/COMMON/patches-egcs/patch-st deleted file mode 100644 index 29c7c4265ab..00000000000 --- a/cross/COMMON/patches-egcs/patch-st +++ /dev/null @@ -1,746 +0,0 @@ ---- gcc/config/sh/sh.c.orig Wed Feb 24 10:44:34 1999 -+++ gcc/config/sh/sh.c Mon Jan 22 21:09:51 2001 -@@ -22,6 +22,8 @@ - Improved by Jim Wilson (wilson@cygnus.com). */ - - #include "config.h" -+#include "system.h" -+#include "insn-config.h" - - #include <stdio.h> - -@@ -29,11 +31,15 @@ - #include "tree.h" - #include "flags.h" - #include "insn-flags.h" -+#include "except.h" - #include "expr.h" -+#include "function.h" - #include "regs.h" - #include "hard-reg-set.h" - #include "output.h" - #include "insn-attr.h" -+#include "toplev.h" -+#include "recog.h" - - int code_for_indirect_jump_scratch = CODE_FOR_indirect_jump_scratch; - -@@ -131,7 +137,8 @@ - switch (GET_CODE (x)) - { - case REG: -- fprintf (stream, "@%s", reg_names[REGNO (x)]); -+ case SUBREG: -+ fprintf (stream, "@%s", reg_names[true_regnum (x)]); - break; - - case PLUS: -@@ -143,13 +150,19 @@ - { - case CONST_INT: - fprintf (stream, "@(%d,%s)", INTVAL (index), -- reg_names[REGNO (base)]); -+ reg_names[true_regnum (base)]); - break; - - case REG: -- fprintf (stream, "@(r0,%s)", -- reg_names[MAX (REGNO (base), REGNO (index))]); -+ case SUBREG: -+ { -+ int base_num = true_regnum (base); -+ int index_num = true_regnum (index); -+ -+ fprintf (stream, "@(r0,%s)", -+ reg_names[MAX (base_num,index_num)]); - break; -+ } - - default: - debug_rtx (x); -@@ -159,11 +172,11 @@ - break; - - case PRE_DEC: -- fprintf (stream, "@-%s", reg_names[REGNO (XEXP (x, 0))]); -+ fprintf (stream, "@-%s", reg_names[true_regnum (XEXP (x, 0))]); - break; - - case POST_INC: -- fprintf (stream, "@%s+", reg_names[REGNO (XEXP (x, 0))]); -+ fprintf (stream, "@%s+", reg_names[true_regnum (XEXP (x, 0))]); - break; - - default: -@@ -230,16 +243,31 @@ - fputs (reg_names[REGNO (x) + 1], (stream)); - break; - case MEM: -- print_operand_address (stream, -- XEXP (adj_offsettable_operand (x, 4), 0)); -+ if (GET_CODE (XEXP (x, 0)) != PRE_DEC -+ && GET_CODE (XEXP (x, 0)) != POST_INC) -+ x = adj_offsettable_operand (x, 4); -+ print_operand_address (stream, XEXP (x, 0)); - break; - } - break; -+ case 'o': -+ switch (GET_CODE (x)) -+ { -+ case PLUS: fputs ("add", stream); break; -+ case MINUS: fputs ("sub", stream); break; -+ case MULT: fputs ("mul", stream); break; -+ case DIV: fputs ("div", stream); break; -+ } -+ break; - default: - switch (GET_CODE (x)) - { - case REG: -- fputs (reg_names[REGNO (x)], (stream)); -+ if (REGNO (x) >= FIRST_FP_REG && REGNO (x) <= LAST_FP_REG -+ && GET_MODE_SIZE (GET_MODE (x)) > 4) -+ fprintf ((stream), "d%s", reg_names[REGNO (x)]+1); -+ else -+ fputs (reg_names[REGNO (x)], (stream)); - break; - case MEM: - output_address (XEXP (x, 0)); -@@ -402,6 +430,7 @@ - if ((code != EQ && code != NE - && (sh_compare_op1 != const0_rtx - || code == GTU || code == GEU || code == LTU || code == LEU)) -+ || (mode == DImode && sh_compare_op1 != const0_rtx) - || TARGET_SH3E && GET_MODE_CLASS (mode) == MODE_FLOAT) - sh_compare_op1 = force_reg (mode, sh_compare_op1); - -@@ -694,9 +723,9 @@ - - char * - output_ieee_ccmpeq (insn, operands) -- rtx insn, operands; -+ rtx insn, *operands; - { -- output_branchy_insn (NE, "bt\t%l9\\;fcmp/eq\t%1,%0", insn, operands); -+ return output_branchy_insn (NE, "bt\t%l9\\;fcmp/eq\t%1,%0", insn, operands); - } - - /* Output to FILE the start of the assembler file. */ -@@ -1602,8 +1631,16 @@ - case 5: - { - int i = 16 - size; -- emit_insn (gen_shl_sext_ext (dest, source, GEN_INT (16 - insize), -- GEN_INT (16))); -+ if (! rtx_equal_function_value_matters -+ && ! reload_in_progress && ! reload_completed) -+ emit_insn (gen_shl_sext_ext (dest, source, left_rtx, size_rtx)); -+ else -+ { -+ operands[0] = dest; -+ operands[2] = GEN_INT (16 - insize); -+ gen_shifty_hi_op (ASHIFT, operands); -+ emit_insn (gen_extendhisi2 (dest, gen_lowpart (HImode, dest))); -+ } - /* Don't use gen_ashrsi3 because it generates new pseudos. */ - while (--i >= 0) - gen_ashift (ASHIFTRT, 1, dest); -@@ -2124,7 +2161,7 @@ - for (i = XVECLEN (pattern, 0) - 1; i >= 0; i--) - { - part = XVECEXP (pattern, 0, i); -- if (part == reg_part) -+ if (part == reg_part || GET_CODE (part) == CLOBBER) - continue; - if (reg_mentioned_p (reg, ((GET_CODE (part) == SET - && GET_CODE (SET_DEST (part)) == REG) -@@ -2464,6 +2501,13 @@ - } - else - jump = emit_jump_insn_after (gen_return (), insn); -+ /* Emit a barrier so that reorg knows that any following instructions -+ are not reachable via a fall-through path. -+ But don't do this when not optimizing, since we wouldn't supress the -+ alignment for the barrier then, and could end up with out-of-range -+ pc-relative loads. */ -+ if (optimize) -+ emit_barrier_after (jump); - emit_label_after (bp->near_label, insn); - JUMP_LABEL (jump) = bp->far_label; - if (! invert_jump (insn, label)) -@@ -2481,7 +2525,7 @@ - - for (insn = first; insn; insn = NEXT_INSN (insn)) - { -- rtx vec_lab, pat, prev, prevpat, x; -+ rtx vec_lab, pat, prev, prevpat, x, braf_label; - - if (GET_CODE (insn) != JUMP_INSN - || GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC) -@@ -2504,10 +2548,15 @@ - if (GET_CODE (x) == LABEL_REF && XEXP (x, 0) == vec_lab) - break; - } -+ -+ /* Emit the reference label of the braf where it belongs, right after -+ the casesi_jump_2 (i.e. braf). */ -+ braf_label = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0); -+ emit_label_after (braf_label, prev); -+ - /* Fix up the ADDR_DIF_VEC to be relative - to the reference address of the braf. */ -- XEXP (XEXP (pat, 0), 0) -- = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0); -+ XEXP (XEXP (pat, 0), 0) = braf_label; - } - } - ---- gcc/config/sh/sh.h.orig Mon Jun 1 23:25:44 1998 -+++ gcc/config/sh/sh.h Mon Jan 22 21:09:51 2001 -@@ -1143,7 +1143,8 @@ - else if ((GET_CODE (X) == POST_INC || GET_CODE (X) == PRE_DEC) \ - && BASE_REGISTER_RTX_P (XEXP ((X), 0))) \ - goto LABEL; \ -- else if (GET_CODE (X) == PLUS && MODE != PSImode) \ -+ else if (GET_CODE (X) == PLUS \ -+ && ((MODE) != PSImode || reload_completed)) \ - { \ - rtx xop0 = XEXP ((X), 0); \ - rtx xop1 = XEXP ((X), 1); \ -@@ -1465,7 +1466,7 @@ - and another. */ - - #define REGISTER_MOVE_COST(SRCCLASS, DSTCLASS) \ -- ((DSTCLASS) == PR_REG ? 10 \ -+ ((DSTCLASS) == PR_REGS ? 10 \ - : (((DSTCLASS) == FP_REGS && (SRCCLASS) == GENERAL_REGS) \ - || ((DSTCLASS) == GENERAL_REGS && (SRCCLASS) == FP_REGS)) ? 4 \ - : 1) -@@ -1566,10 +1567,10 @@ - } - - #define ASM_OUTPUT_REG_PUSH(file, v) \ -- fprintf ((file), "\tmov.l\tr%s,-@r15\n", (v)); -+ fprintf ((file), "\tmov.l\tr%d,@-r15\n", (v)); - - #define ASM_OUTPUT_REG_POP(file, v) \ -- fprintf ((file), "\tmov.l\t@r15+,r%s\n", (v)); -+ fprintf ((file), "\tmov.l\t@r15+,r%d\n", (v)); - - /* The assembler's names for the registers. RFP need not always be used as - the Real framepointer; it can also be used as a normal general register. -@@ -1957,3 +1958,5 @@ - #define HAVE_ATEXIT - - #define SH_DYNAMIC_SHIFT_COST (TARGET_SH3 ? (TARGET_SMALLCODE ? 1 : 2) : 20) -+ -+#define DWARF_LINE_MIN_INSTR_LENGTH 2 ---- gcc/config/sh/sh.md.orig Thu Apr 23 22:37:16 1998 -+++ gcc/config/sh/sh.md Mon Jan 22 21:09:51 2001 -@@ -661,7 +661,7 @@ - ;; This reload would clobber the value in r0 we are trying to store. - ;; If we let reload allocate r0, then this problem can never happen. - --(define_insn "" -+(define_insn "udivsi3_i1" - [(set (match_operand:SI 0 "register_operand" "=z") - (udiv:SI (reg:SI 4) (reg:SI 5))) - (clobber (reg:SI 18)) -@@ -674,9 +674,9 @@ - (set_attr "needs_delay_slot" "yes")]) - - (define_expand "udivsi3" -- [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "")) -+ [(set (match_dup 3) (symbol_ref:SI "__udivsi3")) -+ (set (reg:SI 4) (match_operand:SI 1 "general_operand" "")) - (set (reg:SI 5) (match_operand:SI 2 "general_operand" "")) -- (set (match_dup 3) (symbol_ref:SI "__udivsi3")) - (parallel [(set (match_operand:SI 0 "register_operand" "") - (udiv:SI (reg:SI 4) - (reg:SI 5))) -@@ -685,9 +685,26 @@ - (clobber (reg:SI 4)) - (use (match_dup 3))])] - "" -- "operands[3] = gen_reg_rtx(SImode);") -+ " -+{ -+ rtx first, last; - --(define_insn "" -+ operands[3] = gen_reg_rtx(SImode); -+ /* Emit the move of the address to a pseudo outside of the libcall. */ -+ emit_move_insn (operands[3], -+ gen_rtx_SYMBOL_REF (SImode, \"__udivsi3\")); -+ last = gen_udivsi3_i1 (operands[0], operands[3]); -+ first = emit_move_insn (gen_rtx_REG (SImode, 4), operands[1]); -+ emit_move_insn (gen_rtx_REG (SImode, 5), operands[2]); -+ last = emit_insn (last); -+ /* Wrap the sequence in REG_LIBCALL / REG_RETVAL notes so that loop -+ invariant code motion can move it. */ -+ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); -+ REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); -+ DONE; -+}") -+ -+(define_insn "divsi3_i1" - [(set (match_operand:SI 0 "register_operand" "=z") - (div:SI (reg:SI 4) (reg:SI 5))) - (clobber (reg:SI 18)) -@@ -702,9 +719,9 @@ - (set_attr "needs_delay_slot" "yes")]) - - (define_expand "divsi3" -- [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "")) -+ [(set (match_dup 3) (symbol_ref:SI "__sdivsi3")) -+ (set (reg:SI 4) (match_operand:SI 1 "general_operand" "")) - (set (reg:SI 5) (match_operand:SI 2 "general_operand" "")) -- (set (match_dup 3) (symbol_ref:SI "__sdivsi3")) - (parallel [(set (match_operand:SI 0 "register_operand" "") - (div:SI (reg:SI 4) - (reg:SI 5))) -@@ -715,13 +732,29 @@ - (clobber (reg:SI 3)) - (use (match_dup 3))])] - "" -- "operands[3] = gen_reg_rtx(SImode);") -+ " -+{ -+ rtx first, last; -+ -+ operands[3] = gen_reg_rtx(SImode); -+ /* Emit the move of the address to a pseudo outside of the libcall. */ -+ emit_move_insn (operands[3], gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3\")); -+ last = gen_divsi3_i1 (operands[0], operands[3]); -+ first = emit_move_insn (gen_rtx_REG (SImode, 4), operands[1]); -+ emit_move_insn (gen_rtx_REG (SImode, 5), operands[2]); -+ last = emit_insn (last); -+ /* Wrap the sequence in REG_LIBCALL / REG_RETVAL notes so that loop -+ invariant code motion can move it. */ -+ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); -+ REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); -+ DONE; -+}") - - ;; ------------------------------------------------------------------------- - ;; Multiplication instructions - ;; ------------------------------------------------------------------------- - --(define_insn "" -+(define_insn "umulhisi3_i" - [(set (reg:SI 21) - (mult:SI (zero_extend:SI (match_operand:HI 0 "arith_reg_operand" "r")) - (zero_extend:SI (match_operand:HI 1 "arith_reg_operand" "r"))))] -@@ -729,7 +762,7 @@ - "mulu %1,%0" - [(set_attr "type" "smpy")]) - --(define_insn "" -+(define_insn "mulhisi3_i" - [(set (reg:SI 21) - (mult:SI (sign_extend:SI - (match_operand:HI 0 "arith_reg_operand" "r")) -@@ -748,7 +781,18 @@ - (set (match_operand:SI 0 "arith_reg_operand" "") - (reg:SI 21))] - "" -- "") -+ " -+{ -+ rtx first, last; -+ -+ first = emit_insn (gen_mulhisi3_i (operands[1], operands[2])); -+ last = emit_move_insn (operands[0], gen_rtx_REG (SImode, 21)); -+ /* Wrap the sequence in REG_LIBCALL / REG_RETVAL notes so that loop -+ invariant code motion can move it. */ -+ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); -+ REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); -+ DONE; -+}") - - (define_expand "umulhisi3" - [(set (reg:SI 21) -@@ -759,7 +803,18 @@ - (set (match_operand:SI 0 "arith_reg_operand" "") - (reg:SI 21))] - "" -- "") -+ " -+{ -+ rtx first, last; -+ -+ first = emit_insn (gen_umulhisi3_i (operands[1], operands[2])); -+ last = emit_move_insn (operands[0], gen_rtx_REG (SImode, 21)); -+ /* Wrap the sequence in REG_LIBCALL / REG_RETVAL notes so that loop -+ invariant code motion can move it. */ -+ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); -+ REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); -+ DONE; -+}") - - ;; mulsi3 on the SH2 can be done in one instruction, on the SH1 we generate - ;; a call to a routine which clobbers known registers. -@@ -782,7 +837,6 @@ - (define_expand "mulsi3_call" - [(set (reg:SI 4) (match_operand:SI 1 "general_operand" "")) - (set (reg:SI 5) (match_operand:SI 2 "general_operand" "")) -- (set (match_dup 3) (symbol_ref:SI "__mulsi3")) - (parallel[(set (match_operand:SI 0 "register_operand" "") - (mult:SI (reg:SI 4) - (reg:SI 5))) -@@ -792,9 +846,9 @@ - (clobber (reg:SI 3)) - (clobber (reg:SI 2)) - (clobber (reg:SI 1)) -- (use (match_dup 3))])] -+ (use (match_operand:SI 3 "register_operand" ""))])] - "" -- "operands[3] = gen_reg_rtx(SImode);") -+ "") - - (define_insn "mul_l" - [(set (reg:SI 21) -@@ -813,82 +867,120 @@ - "" - " - { -+ rtx first, last; -+ - if (!TARGET_SH2) - { -- FAIL; -- /* ??? Does this give worse or better code? */ -- emit_insn (gen_mulsi3_call (operands[0], operands[1], operands[2])); -- DONE; -+ /* The address must be set outside the libcall, -+ since it goes into a pseudo. */ -+ rtx addr = force_reg (SImode, gen_rtx_SYMBOL_REF (SImode, \"__mulsi3\")); -+ rtx insns = gen_mulsi3_call (operands[0], operands[1], operands[2], addr); -+ first = XVECEXP (insns, 0, 0); -+ last = XVECEXP (insns, 0, XVECLEN (insns, 0) - 1); -+ emit_insn (insns); - } -+ else -+ { -+ rtx macl = gen_rtx_REG (SImode, MACL_REG); -+ -+ first = emit_insn (gen_mul_l (operands[1], operands[2])); -+ /* consec_sets_giv can only recognize the first insn that sets a -+ giv as the giv insn. So we must tag this also with a REG_EQUAL -+ note. */ -+ last = emit_insn (gen_movsi_i ((operands[0]), macl)); -+ } -+ /* Wrap the sequence in REG_LIBCALL / REG_RETVAL notes so that loop -+ invariant code motion can move it. */ -+ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); -+ REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); -+ DONE; - }") - - (define_insn "mulsidi3_i" -- [(set (reg:DI 20) -- (mult:DI (sign_extend:DI (match_operand:SI 0 "arith_reg_operand" "r")) -- (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "r"))))] -+ [(set (reg:SI 20) -+ (truncate:SI -+ (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 0 "arith_reg_operand" "r")) -+ (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "r"))) -+ (const_int 32)))) -+ (set (reg:SI 21) -+ (mult:SI (match_dup 0) -+ (match_dup 1)))] - "TARGET_SH2" - "dmuls.l %1,%0" - [(set_attr "type" "dmpy")]) - --(define_expand "mulsidi3" -- [(set (reg:DI 20) -+(define_insn "mulsidi3" -+ [(set (match_operand:DI 0 "arith_reg_operand" "=r") -+ (mult:DI (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "r")) -+ (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "r")))) -+ (clobber (reg:DI 20))] -+ "TARGET_SH2" -+ "#") -+ -+(define_split -+ [(set (match_operand:DI 0 "arith_reg_operand" "") - (mult:DI (sign_extend:DI (match_operand:SI 1 "arith_reg_operand" "")) - (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "")))) -- (set (match_operand:DI 0 "arith_reg_operand" "") -- (reg:DI 20))] -+ (clobber (reg:DI 20))] - "TARGET_SH2" -+ [(const_int 0)] - " - { -- /* We must swap the two words when copying them from MACH/MACL to the -- output register. */ -- if (TARGET_LITTLE_ENDIAN) -- { -- rtx low_dst = operand_subword (operands[0], 0, 1, DImode); -- rtx high_dst = operand_subword (operands[0], 1, 1, DImode); -- -- emit_insn (gen_mulsidi3_i (operands[1], operands[2])); -- -- emit_insn (gen_rtx (CLOBBER, VOIDmode, operands[0])); -- emit_move_insn (low_dst, gen_rtx (REG, SImode, 21)); -- emit_move_insn (high_dst, gen_rtx (REG, SImode, 20)); -- DONE; -- } -+ rtx low_dst = gen_lowpart (SImode, operands[0]); -+ rtx high_dst = gen_highpart (SImode, operands[0]); -+ -+ emit_insn (gen_mulsidi3_i (operands[1], operands[2])); -+ -+ emit_move_insn (low_dst, gen_rtx_REG (SImode, 21)); -+ emit_move_insn (high_dst, gen_rtx_REG (SImode, 20)); -+ /* We need something to tag the possible REG_EQUAL notes on to. */ -+ emit_move_insn (operands[0], operands[0]); -+ DONE; - }") - - (define_insn "umulsidi3_i" -- [(set (reg:DI 20) -- (mult:DI (zero_extend:DI (match_operand:SI 0 "arith_reg_operand" "r")) -- (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "r"))))] -+ [(set (reg:SI 20) -+ (truncate:SI -+ (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 0 "arith_reg_operand" "r")) -+ (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "r"))) -+ (const_int 32)))) -+ (set (reg:SI 21) -+ (mult:SI (match_dup 0) -+ (match_dup 1)))] - "TARGET_SH2" - "dmulu.l %1,%0" - [(set_attr "type" "dmpy")]) - --(define_expand "umulsidi3" -- [(set (reg:DI 20) -+(define_insn "umulsidi3" -+ [(set (match_operand:DI 0 "arith_reg_operand" "=r") -+ (mult:DI (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "r")) -+ (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "r")))) -+ (clobber (reg:DI 20))] -+ "TARGET_SH2" -+ "#") -+ -+(define_split -+ [(set (match_operand:DI 0 "arith_reg_operand" "") - (mult:DI (zero_extend:DI (match_operand:SI 1 "arith_reg_operand" "")) - (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "")))) -- (set (match_operand:DI 0 "arith_reg_operand" "") -- (reg:DI 20))] -+ (clobber (reg:DI 20))] - "TARGET_SH2" -+ [(const_int 0)] - " - { -- /* We must swap the two words when copying them from MACH/MACL to the -- output register. */ -- if (TARGET_LITTLE_ENDIAN) -- { -- rtx low_dst = operand_subword (operands[0], 0, 1, DImode); -- rtx high_dst = operand_subword (operands[0], 1, 1, DImode); -- -- emit_insn (gen_umulsidi3_i (operands[1], operands[2])); -- -- emit_insn (gen_rtx (CLOBBER, VOIDmode, operands[0])); -- emit_move_insn (low_dst, gen_rtx (REG, SImode, 21)); -- emit_move_insn (high_dst, gen_rtx (REG, SImode, 20)); -- DONE; -- } -+ rtx low_dst = gen_lowpart (SImode, operands[0]); -+ rtx high_dst = gen_highpart (SImode, operands[0]); -+ -+ emit_insn (gen_umulsidi3_i (operands[1], operands[2])); -+ -+ emit_move_insn (low_dst, gen_rtx_REG (SImode, 21)); -+ emit_move_insn (high_dst, gen_rtx_REG (SImode, 20)); -+ /* We need something to tag the possible REG_EQUAL notes on to. */ -+ emit_move_insn (operands[0], operands[0]); -+ DONE; - }") - --(define_insn "" -+(define_insn "smulsi3_highpart_i" - [(set (reg:SI 20) - (truncate:SI - (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 0 "arith_reg_operand" "r")) -@@ -909,9 +1001,27 @@ - (set (match_operand:SI 0 "arith_reg_operand" "") - (reg:SI 20))] - "TARGET_SH2" -- "") -+ " -+{ -+ rtx first, last; - --(define_insn "" -+ first = emit_insn (gen_smulsi3_highpart_i (operands[1], operands[2])); -+ last = emit_move_insn (operands[0], gen_rtx_REG (SImode, 20)); -+ /* Wrap the sequence in REG_LIBCALL / REG_RETVAL notes so that loop -+ invariant code motion can move it. */ -+ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); -+ REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); -+ /* expand_binop can't find a suitable code in mul_highpart_optab to -+ make a REG_EQUAL note from, so make one here. -+ ??? Alternatively, we could put this at the calling site of expand_binop, -+ i.e. expand_mult_highpart. */ -+ REG_NOTES (last) -+ = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (SET_SRC (single_set (first))), -+ REG_NOTES (last)); -+ DONE; -+}") -+ -+(define_insn "umulsi3_highpart_i" - [(set (reg:SI 20) - (truncate:SI - (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 0 "arith_reg_operand" "r")) -@@ -932,7 +1042,18 @@ - (set (match_operand:SI 0 "arith_reg_operand" "") - (reg:SI 20))] - "TARGET_SH2" -- "") -+ " -+{ -+ rtx first, last; -+ -+ first = emit_insn (gen_umulsi3_highpart_i (operands[1], operands[2])); -+ last = emit_move_insn (operands[0], gen_rtx_REG (SImode, 20)); -+ /* Wrap the sequence in REG_LIBCALL / REG_RETVAL notes so that loop -+ invariant code motion can move it. */ -+ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last, REG_NOTES (first)); -+ REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first, REG_NOTES (last)); -+ DONE; -+}") - - ;; ------------------------------------------------------------------------- - ;; Logical operations -@@ -1825,19 +1946,20 @@ - "" - "sett") - --;; t/r is first, so that it will be preferred over r/r when reloading a move --;; of a pseudo-reg into the T reg -+;; t/r must come after r/r, lest reload will try to reload stuff like -+;; (set (subreg:SI (mem:QI (plus:SI (reg:SI 15 r15) (const_int 12)) 0) 0) -+;; (made from (set (subreg:SI (reg:QI 73) 0) ) into T. - (define_insn "movsi_i" -- [(set (match_operand:SI 0 "general_movdst_operand" "=t,r,r,r,r,r,m,<,<,xl,x,l,r") -- (match_operand:SI 1 "general_movsrc_operand" "r,Q,rI,m,xl,t,r,x,l,r,>,>,i"))] -+ [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,t,r,r,r,m,<,<,xl,x,l,r") -+ (match_operand:SI 1 "general_movsrc_operand" "Q,rI,r,mr,xl,t,r,x,l,r,>,>,i"))] - " - ! TARGET_SH3E - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "@ -- cmp/pl %1 - mov.l %1,%0 - mov %1,%0 -+ cmp/pl %1 - mov.l %1,%0 - sts %1,%0 - movt %0 -@@ -1848,7 +1970,7 @@ - lds.l %1,%0 - lds.l %1,%0 - fake %1,%0" -- [(set_attr "type" "*,pcload_si,move,load_si,move,move,store,store,pstore,move,load,pload,pcload_si") -+ [(set_attr "type" "pcload_si,move,*,load_si,move,move,store,store,pstore,move,load,pload,pcload_si") - (set_attr "length" "*,*,*,*,*,*,*,*,*,*,*,*,*")]) - - ;; t/r must come after r/r, lest reload will try to reload stuff like -@@ -1856,8 +1978,8 @@ - ;; ??? This allows moves from macl to fpul to be recognized, but these moves - ;; will require a reload. - (define_insn "movsi_ie" -- [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,t,r,r,r,m,<,<,xl,x,l,r,y,r,y") -- (match_operand:SI 1 "general_movsrc_operand" "Q,rI,r,m,xl,t,r,x,l,r,>,>,i,r,y,y"))] -+ [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,t,r,r,r,m,<,<,xl,x,l,y,r,y,r,y") -+ (match_operand:SI 1 "general_movsrc_operand" "Q,rI,r,mr,xl,t,r,x,l,r,>,>,>,i,r,y,y"))] - "TARGET_SH3E - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" -@@ -1874,16 +1996,17 @@ - lds %1,%0 - lds.l %1,%0 - lds.l %1,%0 -+ lds.l %1,%0 - fake %1,%0 - lds %1,%0 - sts %1,%0 - ! move optimized away" -- [(set_attr "type" "pcload_si,move,*,load_si,move,move,store,store,pstore,move,load,pload,pcload_si,gp_fpul,gp_fpul,nil") -- (set_attr "length" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,0")]) -+ [(set_attr "type" "pcload_si,move,*,load_si,move,move,store,store,pstore,move,load,pload,load,pcload_si,gp_fpul,gp_fpul,nil") -+ (set_attr "length" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,0")]) - - (define_insn "movsi_i_lowpart" - [(set (strict_low_part (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,r,m,r")) -- (match_operand:SI 1 "general_movsrc_operand" "Q,rI,m,xl,t,r,i"))] -+ (match_operand:SI 1 "general_movsrc_operand" "Q,rI,mr,xl,t,r,i"))] - "register_operand (operands[0], SImode) - || register_operand (operands[1], SImode)" - "@ -@@ -2087,7 +2210,8 @@ - FAIL; - reg = XEXP (addr, 0); - const_int = XEXP (addr, 1); -- if (GET_CODE (reg) != REG || GET_CODE (const_int) != CONST_INT) -+ if (! (BASE_REGISTER_RTX_P (reg) && INDEX_REGISTER_RTX_P (operands[2]) -+ && GET_CODE (const_int) == CONST_INT)) - FAIL; - emit_move_insn (operands[2], const_int); - emit_move_insn (operands[0], -@@ -2113,7 +2237,8 @@ - FAIL; - reg = XEXP (addr, 0); - const_int = XEXP (addr, 1); -- if (GET_CODE (reg) != REG || GET_CODE (const_int) != CONST_INT) -+ if (! (BASE_REGISTER_RTX_P (reg) && INDEX_REGISTER_RTX_P (operands[2]) -+ && GET_CODE (const_int) == CONST_INT)) - FAIL; - emit_move_insn (operands[2], const_int); - emit_move_insn (change_address (operands[1], VOIDmode, -@@ -2249,7 +2374,7 @@ - ;; This one has the additional purpose to record a possible scratch register - ;; for the following branch. - (define_insn "indirect_jump_scratch" -- [(set (match_operand 0 "register_operand" "r") -+ [(set (match_operand 0 "register_operand" "=r") - (unspec [(match_operand 1 "const_int_operand" "")] 4))] - "" - "" -@@ -2478,7 +2603,7 @@ - { - int i; - -- emit_call_insn (gen_call (operands[0], const0_rtx, const0_rtx, const0_rtx)); -+ emit_call_insn (gen_call (operands[0], const0_rtx)); - - for (i = 0; i < XVECLEN (operands[2], 0); i++) - { -@@ -2974,6 +3099,7 @@ - (use (match_operand:SI 0 "arith_reg_operand" "r")) - (use (reg:SI 6)) - (clobber (reg:SI 17)) -+ (clobber (reg:SI 18)) - (clobber (reg:SI 4)) - (clobber (reg:SI 5)) - (clobber (reg:SI 6)) -@@ -3144,10 +3270,9 @@ - - size /= 8; - orig_address = XEXP (operands[0], 0); -- addr_target = gen_reg_rtx (SImode); - shift_reg = gen_reg_rtx (SImode); - emit_insn (gen_movsi (shift_reg, operands[3])); -- emit_insn (gen_addsi3 (addr_target, orig_address, GEN_INT (size - 1))); -+ addr_target = copy_addr_to_reg (plus_constant (orig_address, size - 1)); - - operands[0] = change_address (operands[0], QImode, addr_target); - emit_insn (gen_movqi (operands[0], gen_rtx (SUBREG, QImode, shift_reg, 0))); diff --git a/cross/Makefile b/cross/Makefile index bc34e9c3e2a..388a3a13353 100644 --- a/cross/Makefile +++ b/cross/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.60 2014/04/06 16:15:06 jakllsch Exp $ +# $NetBSD: Makefile,v 1.61 2014/12/12 13:30:07 joerg Exp $ # COMMENT= Cross-platform development utilities -#SUBDIR+= COMMON # not a real package SUBDIR+= GenFw SUBDIR+= atasm SUBDIR+= avr-binutils |