From 86549073422520f45c638d079180782e78fd8e60 Mon Sep 17 00:00:00 2001 From: minoura Date: Mon, 6 Nov 2000 03:15:14 +0000 Subject: Import cross-i386-netbsdpe, cross compile environment for PEACE/i386. This package obsoletes broken cross-i386-cygwin32. From the PEACE repository, http://cvs.kshosen.ac.jp/cvsweb.cgi/peace/pkgsrc/cross/i386-netbsdpe/ --- cross/i386-netbsdpe/Makefile | 35 +++ cross/i386-netbsdpe/files/featuretest.h | 20 ++ cross/i386-netbsdpe/files/i386_limits.h | 97 +++++++ cross/i386-netbsdpe/files/limits.h | 86 ++++++ cross/i386-netbsdpe/files/md5 | 5 + cross/i386-netbsdpe/files/patch-sum | 5 + cross/i386-netbsdpe/files/syslimits.h | 84 ++++++ cross/i386-netbsdpe/patches/binutils-aa | 13 + cross/i386-netbsdpe/patches/binutils-ab | 10 + cross/i386-netbsdpe/patches/patch-ae | 13 + cross/i386-netbsdpe/patches/patch-af | 23 ++ cross/i386-netbsdpe/patches/patch-ag | 459 ++++++++++++++++++++++++++++++++ cross/i386-netbsdpe/pkg/COMMENT | 1 + cross/i386-netbsdpe/pkg/DESCR | 1 + cross/i386-netbsdpe/pkg/MESSAGE | 12 + cross/i386-netbsdpe/pkg/PLIST | 6 + 16 files changed, 870 insertions(+) create mode 100644 cross/i386-netbsdpe/Makefile create mode 100644 cross/i386-netbsdpe/files/featuretest.h create mode 100644 cross/i386-netbsdpe/files/i386_limits.h create mode 100644 cross/i386-netbsdpe/files/limits.h create mode 100644 cross/i386-netbsdpe/files/md5 create mode 100644 cross/i386-netbsdpe/files/patch-sum create mode 100644 cross/i386-netbsdpe/files/syslimits.h create mode 100644 cross/i386-netbsdpe/patches/binutils-aa create mode 100644 cross/i386-netbsdpe/patches/binutils-ab create mode 100644 cross/i386-netbsdpe/patches/patch-ae create mode 100644 cross/i386-netbsdpe/patches/patch-af create mode 100644 cross/i386-netbsdpe/patches/patch-ag create mode 100644 cross/i386-netbsdpe/pkg/COMMENT create mode 100644 cross/i386-netbsdpe/pkg/DESCR create mode 100644 cross/i386-netbsdpe/pkg/MESSAGE create mode 100644 cross/i386-netbsdpe/pkg/PLIST (limited to 'cross/i386-netbsdpe') diff --git a/cross/i386-netbsdpe/Makefile b/cross/i386-netbsdpe/Makefile new file mode 100644 index 00000000000..4a539609b12 --- /dev/null +++ b/cross/i386-netbsdpe/Makefile @@ -0,0 +1,35 @@ +# $NetBSD: Makefile,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $ +# + +DISTVERSION= 1.0.0.0 +DISTFILES= # none + +MAINTAINER= peace-sacrifice@hauN.ORG +HOMEPAGE= http://chiharu.hauN.ORG/peace/ + +WRKSRC= ${WRKDIR}/${EGCS_DISTNAME} + +USE_CROSS_BINUTILS= yes +BINUTILS_GNUTARGET= pe-i386 +BINUTILS_LDEMULATION= i386pe +USE_CROSS_EGCS= yes +EGCS_FAKE_RUNTIME= yes + +TARGET_ARCH= i386-netbsdpe + +BINUTILS_EXTRAS= dlltool windres + +post-patch: + for i in patches/binutils-*; do \ + ${PATCH} -d ${BINUTILS_WRKSRC} --forward --quiet -E < $$i; \ + done + cd ${BINUTILS_WRKSRC}/bfd && autoconf + cd ${BINUTILS_WRKSRC}/gas && autoconf + cd ${WRKDIR}/${EGCS_DISTNAME}/gcc && autoconf +post-configure: + ${CP} ${FILESDIR}/i386_limits.h ${SYS_INCLUDE}/machine/limits.h + ${CP} ${FILESDIR}/syslimits.h ${SYS_INCLUDE}/sys/ + ${CP} ${FILESDIR}/featuretest.h ${SYS_INCLUDE}/sys/ + ${CP} ${FILESDIR}/limits.h ${SYS_INCLUDE}/ + +.include "../COMMON/cross.mk" diff --git a/cross/i386-netbsdpe/files/featuretest.h b/cross/i386-netbsdpe/files/featuretest.h new file mode 100644 index 00000000000..862fc4a2110 --- /dev/null +++ b/cross/i386-netbsdpe/files/featuretest.h @@ -0,0 +1,20 @@ +/* $NetBSD: featuretest.h,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $ */ + +/* + * Written by Klaus Klein , February 2, 1998. + * Public domain. + */ + +#ifndef _SYS_FEATURETEST_H_ +#define _SYS_FEATURETEST_H_ + +#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) +#define _POSIX_C_SOURCE 1L +#endif + +#if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ + !defined(_REENTRANT) +#define _REENTRANT +#endif + +#endif /* !defined(_SYS_FEATURETEST_H_) */ diff --git a/cross/i386-netbsdpe/files/i386_limits.h b/cross/i386-netbsdpe/files/i386_limits.h new file mode 100644 index 00000000000..ce848ab8c98 --- /dev/null +++ b/cross/i386-netbsdpe/files/i386_limits.h @@ -0,0 +1,97 @@ +/* $NetBSD: i386_limits.h,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $ */ + +/* + * Copyright (c) 1988 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)limits.h 7.2 (Berkeley) 6/28/90 + */ + +#ifndef _MACHINE_LIMITS_H_ +#define _MACHINE_LIMITS_H_ + +#define CHAR_BIT 8 /* number of bits in a char */ +#define MB_LEN_MAX 32 /* no multibyte characters */ + +#define SCHAR_MAX 0x7f /* max value for a signed char */ +#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */ + +#define UCHAR_MAX 0xffU /* max value for an unsigned char */ +#define CHAR_MAX 0x7f /* max value for a char */ +#define CHAR_MIN (-0x7f-1) /* min value for a char */ + +#define USHRT_MAX 0xffffU /* max value for an unsigned short */ +#define SHRT_MAX 0x7fff /* max value for a short */ +#define SHRT_MIN (-0x7fff-1) /* min value for a short */ + +#define UINT_MAX 0xffffffffU /* max value for an unsigned int */ +#define INT_MAX 0x7fffffff /* max value for an int */ +#define INT_MIN (-0x7fffffff-1) /* min value for an int */ + +#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */ +#define LONG_MAX 0x7fffffffL /* max value for a long */ +#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */ + +#if !defined(_ANSI_SOURCE) +#define SSIZE_MAX INT_MAX /* max value for a ssize_t */ + +#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \ + defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L +#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */ +#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */ +#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */ +#endif + +#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) +#define SIZE_T_MAX UINT_MAX /* max value for a size_t */ + +#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */ +#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */ +#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */ + +#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */ +#endif /* !_ANSI_SOURCE */ + +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \ + defined(_XOPEN_SOURCE) +#define LONG_BIT 32 +#define WORD_BIT 32 + +#define DBL_DIG 15 +#define DBL_MAX 1.7976931348623157E+308 +#define DBL_MIN 2.2250738585072014E-308 + +#define FLT_DIG 6 +#define FLT_MAX 3.40282347E+38F +#define FLT_MIN 1.17549435E-38F +#endif + +#endif /* _MACHINE_LIMITS_H_ */ diff --git a/cross/i386-netbsdpe/files/limits.h b/cross/i386-netbsdpe/files/limits.h new file mode 100644 index 00000000000..98f35c16bfb --- /dev/null +++ b/cross/i386-netbsdpe/files/limits.h @@ -0,0 +1,86 @@ +/* $NetBSD: limits.h,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $ */ + +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)limits.h 8.2 (Berkeley) 1/4/94 + */ + +#ifndef _LIMITS_H_ +#define _LIMITS_H_ + +#if !defined(_ANSI_SOURCE) +#define _POSIX_ARG_MAX 4096 +#define _POSIX_CHILD_MAX 6 +#define _POSIX_LINK_MAX 8 +#define _POSIX_LOGIN_NAME_MAX 9 +#define _POSIX_MAX_CANON 255 +#define _POSIX_MAX_INPUT 255 +#define _POSIX_NAME_MAX 14 +#define _POSIX_NGROUPS_MAX 0 +#define _POSIX_OPEN_MAX 16 +#define _POSIX_PATH_MAX 255 +#define _POSIX_PIPE_BUF 512 +#define _POSIX_SSIZE_MAX 32767 +#define _POSIX_STREAM_MAX 8 +#define _POSIX_TZNAME_MAX 3 + +#define _POSIX2_BC_BASE_MAX 99 +#define _POSIX2_BC_DIM_MAX 2048 +#define _POSIX2_BC_SCALE_MAX 99 +#define _POSIX2_BC_STRING_MAX 1000 +#define _POSIX2_COLL_WEIGHTS_MAX 2 +#define _POSIX2_EXPR_NEST_MAX 32 +#define _POSIX2_LINE_MAX 2048 +#define _POSIX2_RE_DUP_MAX 255 + +#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) +#define _XOPEN_IOV_MAX 16 + +#define PASS_MAX 128 + +#define NL_ARGMAX 9 +#define NL_LANGMAX 14 +#define NL_MSGMAX 32767 +#define NL_NMAX 1 +#define NL_SETMAX 255 +#define NL_TEXTMAX 2048 + +#define TMP_MAX 308915776 +#endif /* !_POSIX_C_SOURCE || _XOPEN_SOURCE */ + +#endif /* !_ANSI_SOURCE */ + +#include +#include + +#endif /* !_LIMITS_H_ */ diff --git a/cross/i386-netbsdpe/files/md5 b/cross/i386-netbsdpe/files/md5 new file mode 100644 index 00000000000..9336c0620bd --- /dev/null +++ b/cross/i386-netbsdpe/files/md5 @@ -0,0 +1,5 @@ +$NetBSD: md5,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $ + +MD5 (binutils-2.9.1.tar.gz) = 8f9ad1a6e96742fd3069479171a63c22 +MD5 (egcs-1.1.1.tar.gz) = 0b3f0e856dcbb2241c183081fc7271af +MD5 (egcs-1.1.1-NetBSD-19980104.diff.gz) = 8c4d952d999ead62f6604948c65c2454 diff --git a/cross/i386-netbsdpe/files/patch-sum b/cross/i386-netbsdpe/files/patch-sum new file mode 100644 index 00000000000..b68a1b3a87f --- /dev/null +++ b/cross/i386-netbsdpe/files/patch-sum @@ -0,0 +1,5 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $ + +MD5 (patch-ae) = 99d80e024658acdf2b0644bad1cb2fac +MD5 (patch-af) = e9dd99401b0213988988da696c3b5825 +MD5 (patch-ag) = 13027c5cf5d30e8342396a1f70b803f8 diff --git a/cross/i386-netbsdpe/files/syslimits.h b/cross/i386-netbsdpe/files/syslimits.h new file mode 100644 index 00000000000..61a8a9649ba --- /dev/null +++ b/cross/i386-netbsdpe/files/syslimits.h @@ -0,0 +1,84 @@ +/* $NetBSD: syslimits.h,v 1.1.1.1 2000/11/06 03:15:15 minoura Exp $ */ + +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)syslimits.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _SYS_SYSLIMITS_H_ +#define _SYS_SYSLIMITS_H_ + +#include + +#if !defined(_ANSI_SOURCE) +#define ARG_MAX (256 * 1024) /* max bytes for an exec function */ +#define CHILD_MAX 80 /* max simultaneous processes */ +#define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */ +#define LINK_MAX 32767 /* max file link count */ +#define MAX_CANON 255 /* max bytes in term canon input line */ +#define MAX_INPUT 255 /* max bytes in terminal input */ +#define NAME_MAX 255 /* max bytes in a file name */ +#define NGROUPS_MAX 16 /* max supplemental group id's */ +#define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */ +#define OPEN_MAX 64 /* max open files per process */ +#define PATH_MAX 1024 /* max bytes in pathname */ +#define PIPE_BUF 512 /* max bytes for atomic pipe writes */ + +#define BC_BASE_MAX INT_MAX /* max ibase/obase values in bc(1) */ +#define BC_DIM_MAX 65535 /* max array elements in bc(1) */ +#define BC_SCALE_MAX INT_MAX /* max scale value in bc(1) */ +#define BC_STRING_MAX INT_MAX /* max const string length in bc(1) */ +#define COLL_WEIGHTS_MAX 2 /* max weights for order keyword */ +#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ +#define LINE_MAX 2048 /* max bytes in an input line */ +#define RE_DUP_MAX 255 /* max RE's in interval notation */ + +/* + * IEEE Std 1003.1c-95, adopted in X/Open CAE Specification Issue 5 Version 2 + */ +#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \ + (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 +#define LOGIN_NAME_MAX 17 /* max login name length incl. NUL */ +#endif + +/* + * X/Open CAE Specification Issue 5 Version 2 + */ +#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) +#define IOV_MAX 1024 /* max # of iovec's for readv(2) etc. */ +#define NZERO 20 /* default "nice" */ +#endif /* !_POSIX_C_SOURCE || _XOPEN_SOURCE */ + +#endif /* !_ANSI_SOURCE */ + +#endif /* !_SYS_SYSLIMITS_H_ */ diff --git a/cross/i386-netbsdpe/patches/binutils-aa b/cross/i386-netbsdpe/patches/binutils-aa new file mode 100644 index 00000000000..b0b9e9b7e84 --- /dev/null +++ b/cross/i386-netbsdpe/patches/binutils-aa @@ -0,0 +1,13 @@ +--- bfd/config.bfd.dist Sun Oct 1 20:56:02 2000 ++++ bfd/config.bfd Sun Oct 1 20:56:55 2000 +@@ -195,6 +195,10 @@ + targ_selvecs=i386bsd_vec + targ_underscore=yes + ;; ++ i[3456]86-*-netbsdpe*) ++ targ_defvec=i386pe_vec ++ targ_selvecs="i386pe_vec i386pei_vec" ++ ;; + i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) + targ_defvec=i386netbsd_vec + targ_selvecs=i386bsd_vec diff --git a/cross/i386-netbsdpe/patches/binutils-ab b/cross/i386-netbsdpe/patches/binutils-ab new file mode 100644 index 00000000000..fbdb0b51b09 --- /dev/null +++ b/cross/i386-netbsdpe/patches/binutils-ab @@ -0,0 +1,10 @@ +--- gas/configure.in.dist Sun Oct 1 20:59:05 2000 ++++ gas/configure.in Sun Oct 1 20:59:46 2000 +@@ -150,6 +150,7 @@ + i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; + i386-*-bsd*) fmt=aout em=386bsd ;; + i386-*-netbsd0.8) fmt=aout em=386bsd ;; ++ i386-*-netbsdpe*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; + i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; + i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; diff --git a/cross/i386-netbsdpe/patches/patch-ae b/cross/i386-netbsdpe/patches/patch-ae new file mode 100644 index 00000000000..c01ecfbc0e8 --- /dev/null +++ b/cross/i386-netbsdpe/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1.1.1 2000/11/06 03:15:15 minoura Exp $ + +--- gcc/config.sub.dist Sun Oct 1 07:57:03 2000 ++++ gcc/config.sub Sun Oct 1 07:57:51 2000 +@@ -732,7 +732,7 @@ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -uxpv* | -beos* ) ++ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -netbsdpe* ) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) diff --git a/cross/i386-netbsdpe/patches/patch-af b/cross/i386-netbsdpe/patches/patch-af new file mode 100644 index 00000000000..9f9dab2cf52 --- /dev/null +++ b/cross/i386-netbsdpe/patches/patch-af @@ -0,0 +1,23 @@ +$NetBSD: patch-af,v 1.1.1.1 2000/11/06 03:15:15 minoura Exp $ + +--- gcc/configure.in.dist Sun Oct 1 07:58:07 2000 ++++ gcc/configure.in Sun Oct 1 08:36:41 2000 +@@ -869,6 +869,18 @@ + fixincludes=fixinc.wrap + tmake_file=t-netbsd + ;; ++ i[[34567]]86-*-netbsdpe* ) ++ xm_file="${xm_file} i386/xm-cygwin32.h" ++ tmake_file=i386/t-cygwin32 ++ tm_file=i386/netbsd-pe.h ++ xmake_file=i386/x-cygwin32 ++ extra_objs=winnt.o ++ fixincludes=Makefile.in ++ if [[ x$enable_threads = xyes ]]; then ++ thread_file='win32' ++ fi ++ exeext=.exe ++ ;; + i[[34567]]86-*-netbsd*) + tm_file=i386/netbsd.h + xm_file=i386/xm-netbsd.h diff --git a/cross/i386-netbsdpe/patches/patch-ag b/cross/i386-netbsdpe/patches/patch-ag new file mode 100644 index 00000000000..f69ae7d51e9 --- /dev/null +++ b/cross/i386-netbsdpe/patches/patch-ag @@ -0,0 +1,459 @@ +$NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $ + +--- /dev/null Sun Oct 1 23:26:03 2000 ++++ gcc/config/i386/netbsd-pe.h Sun Oct 1 23:31:12 2000 +@@ -0,0 +1,454 @@ ++/* Operating system specific defines to be used when targeting GCC for ++ hosting on Windows NT 3.x, using a Unix style C library and tools, ++ as distinct from winnt.h, which is used to build GCC for use with a ++ windows style library and tool set and uses the Microsoft tools. ++ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#define YES_UNDERSCORES ++ ++#define DBX_DEBUGGING_INFO ++#define SDB_DEBUGGING_INFO ++#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ++ ++#include "i386/gas.h" ++#include "dbxcoff.h" ++ ++/* Support the __declspec keyword by turning them into attributes. ++ We currently only support: dllimport and dllexport. ++ Note that the current way we do this may result in a collision with ++ predefined attributes later on. This can be solved by using one attribute, ++ say __declspec__, and passing args to it. The problem with that approach ++ is that args are not accumulated: each new appearance would clobber any ++ existing args. */ ++ ++#ifdef CPP_PREDEFINES ++#undef CPP_PREDEFINES ++#endif ++ ++#define CPP_PREDEFINES "-Di386 -D__CYGWIN32__ -D__PEACE__ \ ++ -D_X86_=1 -D__STDC__=1 \ ++ -D__stdcall=__attribute__((__stdcall__)) \ ++ -D__cdecl=__attribute__((__cdecl__)) \ ++ -D__declspec(x)=__attribute__((x)) \ ++ -Asystem(winnt) -Acpu(i386) -Amachine(i386)" ++ ++#undef CPP_SPEC ++#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ ++ %{!mwindows:-D__NetBSD__ -D__PECOFF__} \ ++ %{mwindows:-D_WIN32 -DWINNT}" ++ ++/* We have to dynamic link to get to the system DLLs. All of libc, libm and ++ the Unix stuff is in cygwin.dll. The import library is called ++ 'libcygwin.a'. For Windows applications, include more libraries, but ++ always include kernel32. We'd like to specific subsystem windows to ++ ld, but that doesn't work just yet. */ ++ ++#undef LIB_SPEC ++#define LIB_SPEC "%{mwindows:-luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 \ ++ -lkernel32 -lm} -lc" ++#define LINK_SPEC "%{mwindows:--subsystem windows}" ++ ++/* Normally, -lgcc is not needed since everything in it is in the DLL, but we ++ want to allow things to be added to it when installing new versions of ++ GCC without making a new CYGWIN.DLL, so we leave it. */ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC "crt0%O%s" ++ ++#define SIZE_TYPE "unsigned int" ++#define PTRDIFF_TYPE "int" ++#define WCHAR_UNSIGNED 1 ++#define WCHAR_TYPE_SIZE 16 ++#define WCHAR_TYPE "short unsigned int" ++#define HAVE_ATEXIT 1 ++ ++ ++/* Ignore dllimport for functions. */ ++#define TARGET_NOP_FUN_DLLIMPORT (target_flags & 0x20000) ++ ++#undef SUBTARGET_SWITCHES ++#define SUBTARGET_SWITCHES \ ++ { "nop-fun-dllimport", 0x20000 }, \ ++ { "no-nop-fun-dllimport", -0x20000 }, \ ++ { "windows", 0x0 }, ++ ++/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS ++ is a valid machine specific attribute for DECL. ++ The attributes in ATTRIBUTES have previously been assigned to DECL. */ ++extern int i386_pe_valid_decl_attribute_p (); ++ ++#undef VALID_MACHINE_DECL_ATTRIBUTE ++#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \ ++ i386_pe_valid_decl_attribute_p (DECL, ATTRIBUTES, IDENTIFIER, ARGS) ++ ++/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS ++ is a valid machine specific attribute for TYPE. ++ The attributes in ATTRIBUTES have previously been assigned to TYPE. */ ++ ++#undef VALID_MACHINE_TYPE_ATTRIBUTE ++#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \ ++ i386_pe_valid_type_attribute_p (TYPE, ATTRIBUTES, IDENTIFIER, ARGS) ++extern int i386_pe_valid_type_attribute_p (); ++ ++extern union tree_node *i386_pe_merge_decl_attributes (); ++#define MERGE_MACHINE_DECL_ATTRIBUTES(OLD, NEW) \ ++ i386_pe_merge_decl_attributes ((OLD), (NEW)) ++ ++/* Used to implement dllexport overriding dllimport semantics. It's also used ++ to handle vtables - the first pass won't do anything because ++ DECL_CONTEXT (DECL) will be 0 so i386_pe_dll{ex,im}port_p will return 0. ++ It's also used to handle dllimport override semantics. */ ++#if 0 ++#define REDO_SECTION_INFO_P(DECL) \ ++ ((DECL_MACHINE_ATTRIBUTES (DECL) != NULL_TREE) \ ++ || (TREE_CODE (DECL) == VAR_DECL && DECL_VIRTUAL_P (DECL))) ++#else ++#define REDO_SECTION_INFO_P(DECL) 1 ++#endif ++ ++ ++#undef EXTRA_SECTIONS ++#define EXTRA_SECTIONS in_ctor, in_dtor, in_drectve ++ ++#undef EXTRA_SECTION_FUNCTIONS ++#define EXTRA_SECTION_FUNCTIONS \ ++ CTOR_SECTION_FUNCTION \ ++ DTOR_SECTION_FUNCTION \ ++ DRECTVE_SECTION_FUNCTION \ ++ SWITCH_TO_SECTION_FUNCTION ++ ++#define CTOR_SECTION_FUNCTION \ ++void \ ++ctor_section () \ ++{ \ ++ if (in_section != in_ctor) \ ++ { \ ++ fprintf (asm_out_file, "\t.section .ctor\n"); \ ++ in_section = in_ctor; \ ++ } \ ++} ++ ++#define DTOR_SECTION_FUNCTION \ ++void \ ++dtor_section () \ ++{ \ ++ if (in_section != in_dtor) \ ++ { \ ++ fprintf (asm_out_file, "\t.section .dtor\n"); \ ++ in_section = in_dtor; \ ++ } \ ++} ++ ++#define DRECTVE_SECTION_FUNCTION \ ++void \ ++drectve_section () \ ++{ \ ++ if (in_section != in_drectve) \ ++ { \ ++ fprintf (asm_out_file, "%s\n", "\t.section .drectve\n"); \ ++ in_section = in_drectve; \ ++ } \ ++} ++ ++/* Switch to SECTION (an `enum in_section'). ++ ++ ??? This facility should be provided by GCC proper. ++ The problem is that we want to temporarily switch sections in ++ ASM_DECLARE_OBJECT_NAME and then switch back to the original section ++ afterwards. */ ++#define SWITCH_TO_SECTION_FUNCTION \ ++void \ ++switch_to_section (section, decl) \ ++ enum in_section section; \ ++ tree decl; \ ++{ \ ++ switch (section) \ ++ { \ ++ case in_text: text_section (); break; \ ++ case in_data: data_section (); break; \ ++ case in_named: named_section (decl, NULL, 0); break; \ ++ case in_ctor: ctor_section (); break; \ ++ case in_dtor: dtor_section (); break; \ ++ case in_drectve: drectve_section (); break; \ ++ default: abort (); break; \ ++ } \ ++} ++ ++#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ ++ do { \ ++ ctor_section (); \ ++ fprintf (FILE, "%s\t", ASM_LONG); \ ++ assemble_name (FILE, NAME); \ ++ fprintf (FILE, "\n"); \ ++ } while (0) ++ ++#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ ++ do { \ ++ dtor_section (); \ ++ fprintf (FILE, "%s\t", ASM_LONG); \ ++ assemble_name (FILE, NAME); \ ++ fprintf (FILE, "\n"); \ ++ } while (0) ++ ++/* Define this macro if references to a symbol must be treated ++ differently depending on something about the variable or ++ function named by the symbol (such as what section it is in). ++ ++ On i386 running Windows NT, modify the assembler name with a suffix ++ consisting of an atsign (@) followed by string of digits that represents ++ the number of bytes of arguments passed to the function, if it has the ++ attribute STDCALL. ++ ++ In addition, we must mark dll symbols specially. Definitions of ++ dllexport'd objects install some info in the .drectve section. ++ References to dllimport'd objects are fetched indirectly via ++ _imp__. If both are declared, dllexport overrides. This is also ++ needed to implement one-only vtables: they go into their own ++ section and we need to set DECL_SECTION_NAME so we do that here. ++ Note that we can be called twice on the same decl. */ ++ ++extern void i386_pe_encode_section_info (); ++ ++#ifdef ENCODE_SECTION_INFO ++#undef ENCODE_SECTION_INFO ++#endif ++#define ENCODE_SECTION_INFO(DECL) i386_pe_encode_section_info (DECL) ++ ++/* Utility used only in this file. */ ++#define I386_PE_STRIP_ENCODING(SYM_NAME) \ ++ ((SYM_NAME) + ((SYM_NAME)[0] == '@' ? 3 : 0)) ++ ++/* This macro gets just the user-specified name ++ out of the string in a SYMBOL_REF. Discard ++ trailing @[NUM] encoded by ENCODE_SECTION_INFO. */ ++#undef STRIP_NAME_ENCODING ++#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ ++do { \ ++ char *_p; \ ++ char *_name = I386_PE_STRIP_ENCODING (SYMBOL_NAME); \ ++ for (_p = _name; *_p && *_p != '@'; ++_p) \ ++ ; \ ++ if (*_p == '@') \ ++ { \ ++ int _len = _p - _name; \ ++ (VAR) = (char *) alloca (_len + 1); \ ++ strncpy ((VAR), _name, _len); \ ++ (VAR)[_len] = '\0'; \ ++ } \ ++ else \ ++ (VAR) = _name; \ ++} while (0) ++ ++ ++/* Output a reference to a label. */ ++#undef ASM_OUTPUT_LABELREF ++#define ASM_OUTPUT_LABELREF(STREAM, NAME) \ ++ fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \ ++ I386_PE_STRIP_ENCODING (NAME)) \ ++ ++/* Output a common block. */ ++#undef ASM_OUTPUT_COMMON ++#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ ++do { \ ++ if (i386_pe_dllexport_name_p (NAME)) \ ++ { \ ++ drectve_section (); \ ++ fprintf ((STREAM), "\t.ascii \" -export:%s\"\n", \ ++ I386_PE_STRIP_ENCODING (NAME)); \ ++ } \ ++ if (! i386_pe_dllimport_name_p (NAME)) \ ++ { \ ++ fprintf ((STREAM), "\t.comm\t"); \ ++ assemble_name ((STREAM), (NAME)); \ ++ fprintf ((STREAM), ", %d\t%s %d\n", \ ++ (ROUNDED), ASM_COMMENT_START, (SIZE)); \ ++ } \ ++} while (0) ++ ++/* Output the label for an initialized variable. */ ++#undef ASM_DECLARE_OBJECT_NAME ++#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ ++do { \ ++ if (i386_pe_dllexport_name_p (NAME)) \ ++ { \ ++ enum in_section save_section = in_section; \ ++ drectve_section (); \ ++ fprintf ((STREAM), "\t.ascii \" -export:%s\"\n", \ ++ I386_PE_STRIP_ENCODING (NAME)); \ ++ switch_to_section (save_section, (DECL)); \ ++ } \ ++ ASM_OUTPUT_LABEL ((STREAM), (NAME)); \ ++} while (0) ++ ++ ++/* Emit code to check the stack when allocating more that 4000 ++ bytes in one go. */ ++ ++#define CHECK_STACK_LIMIT 4000 ++ ++/* By default, target has a 80387, uses IEEE compatible arithmetic, ++ and returns float values in the 387 and needs stack probes */ ++#undef TARGET_DEFAULT ++ ++#define TARGET_DEFAULT \ ++ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE) ++ ++/* This is how to output an assembler line ++ that says to advance the location counter ++ to a multiple of 2**LOG bytes. */ ++ ++#undef ASM_OUTPUT_ALIGN ++#define ASM_OUTPUT_ALIGN(FILE,LOG) \ ++ if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG)) ++ ++/* Define this macro if in some cases global symbols from one translation ++ unit may not be bound to undefined symbols in another translation unit ++ without user intervention. For instance, under Microsoft Windows ++ symbols must be explicitly imported from shared libraries (DLLs). */ ++#define MULTIPLE_SYMBOL_SPACES ++ ++#define UNIQUE_SECTION_P(DECL) DECL_ONE_ONLY (DECL) ++extern void i386_pe_unique_section (); ++#define UNIQUE_SECTION(DECL,RELOC) i386_pe_unique_section (DECL, RELOC) ++ ++#define SUPPORTS_ONE_ONLY 1 ++ ++/* A C statement to output something to the assembler file to switch to section ++ NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or ++ NULL_TREE. Some target formats do not support arbitrary sections. Do not ++ define this macro in such cases. */ ++#undef ASM_OUTPUT_SECTION_NAME ++#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \ ++do { \ ++ static struct section_info \ ++ { \ ++ struct section_info *next; \ ++ char *name; \ ++ enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \ ++ } *sections; \ ++ struct section_info *s; \ ++ char *mode; \ ++ enum sect_enum type; \ ++ \ ++ for (s = sections; s; s = s->next) \ ++ if (!strcmp (NAME, s->name)) \ ++ break; \ ++ \ ++ if (DECL && TREE_CODE (DECL) == FUNCTION_DECL) \ ++ type = SECT_EXEC, mode = "x"; \ ++ else if (DECL && DECL_READONLY_SECTION (DECL, RELOC)) \ ++ type = SECT_RO, mode = ""; \ ++ else \ ++ type = SECT_RW, mode = "w"; \ ++ \ ++ if (s == 0) \ ++ { \ ++ s = (struct section_info *) xmalloc (sizeof (struct section_info)); \ ++ s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME)); \ ++ strcpy (s->name, NAME); \ ++ s->type = type; \ ++ s->next = sections; \ ++ sections = s; \ ++ fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode); \ ++ /* Functions may have been compiled at various levels of \ ++ optimization so we can't use `same_size' here. Instead, \ ++ have the linker pick one. */ \ ++ if ((DECL) && DECL_ONE_ONLY (DECL)) \ ++ fprintf (STREAM, "\t.linkonce %s\n", \ ++ TREE_CODE (DECL) == FUNCTION_DECL \ ++ ? "discard" : "same_size"); \ ++ } \ ++ else \ ++ { \ ++ fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode); \ ++ } \ ++} while (0) ++ ++/* Write the extra assembler code needed to declare a function ++ properly. If we are generating SDB debugging information, this ++ will happen automatically, so we only need to handle other cases. */ ++#undef ASM_DECLARE_FUNCTION_NAME ++#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ++ do \ ++ { \ ++ if (i386_pe_dllexport_name_p (NAME)) \ ++ { \ ++ drectve_section (); \ ++ fprintf ((FILE), "\t.ascii \" -export:%s\"\n", \ ++ I386_PE_STRIP_ENCODING (NAME)); \ ++ function_section (DECL); \ ++ } \ ++ if (write_symbols != SDB_DEBUG) \ ++ i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \ ++ ASM_OUTPUT_LABEL (FILE, NAME); \ ++ } \ ++ while (0) ++ ++/* Add an external function to the list of functions to be declared at ++ the end of the file. */ ++#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ ++ do \ ++ { \ ++ if (TREE_CODE (DECL) == FUNCTION_DECL) \ ++ i386_pe_record_external_function (NAME); \ ++ } \ ++ while (0) ++ ++/* Declare the type properly for any external libcall. */ ++#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ ++ i386_pe_declare_function_type (FILE, XSTR (FUN, 0), 1) ++ ++/* Output function declarations at the end of the file. */ ++#define ASM_FILE_END(FILE) \ ++ i386_pe_asm_file_end (FILE) ++ ++#undef ASM_COMMENT_START ++#define ASM_COMMENT_START " #" ++ ++/* DWARF2 Unwinding doesn't work with exception handling yet. */ ++#define DWARF2_UNWIND_INFO 0 ++ ++/* Don't assume anything about the header files. */ ++#define NO_IMPLICIT_EXTERN_C ++ ++/* External function declarations. */ ++ ++#ifndef PROTO ++#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) ++#define PROTO(ARGS) ARGS ++#else ++#define PROTO(ARGS) () ++#endif ++#endif ++ ++#ifdef BUFSIZ /* stdio.h has been included, ok to use FILE * */ ++#define STDIO_PROTO(ARGS) PROTO(ARGS) ++#else ++#define STDIO_PROTO(ARGS) () ++#endif ++ ++extern void i386_pe_record_external_function PROTO((char *)); ++extern void i386_pe_declare_function_type STDIO_PROTO((FILE *, char *, int)); ++extern void i386_pe_asm_file_end STDIO_PROTO((FILE *)); ++ ++/* For Win32 ABI compatibility */ ++#undef DEFAULT_PCC_STRUCT_RETURN ++#define DEFAULT_PCC_STRUCT_RETURN 0 ++ diff --git a/cross/i386-netbsdpe/pkg/COMMENT b/cross/i386-netbsdpe/pkg/COMMENT new file mode 100644 index 00000000000..d1ab3fb41b8 --- /dev/null +++ b/cross/i386-netbsdpe/pkg/COMMENT @@ -0,0 +1 @@ +Cross-compile environment for PEACE/i386 diff --git a/cross/i386-netbsdpe/pkg/DESCR b/cross/i386-netbsdpe/pkg/DESCR new file mode 100644 index 00000000000..5f00b6f0e77 --- /dev/null +++ b/cross/i386-netbsdpe/pkg/DESCR @@ -0,0 +1 @@ +This cross-compile environment is for PE/COFF NetBSD/i386. diff --git a/cross/i386-netbsdpe/pkg/MESSAGE b/cross/i386-netbsdpe/pkg/MESSAGE new file mode 100644 index 00000000000..ef3c9052063 --- /dev/null +++ b/cross/i386-netbsdpe/pkg/MESSAGE @@ -0,0 +1,12 @@ +============================================================================= +$NetBSD: MESSAGE,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $ + +This pkg DOES NOT install headers or runtime link libraries. Only the +compilers are installed. + +In order to have a complete development setup, you need to install +includes and libraries in ${CROSSBASE}/i386-netbsdpe/include and +${CROSSBASE}/i386-netbsdpe/lib respectively, or symlink these paths to +the appropriate places. + +============================================================================= diff --git a/cross/i386-netbsdpe/pkg/PLIST b/cross/i386-netbsdpe/pkg/PLIST new file mode 100644 index 00000000000..98b1a65c0f7 --- /dev/null +++ b/cross/i386-netbsdpe/pkg/PLIST @@ -0,0 +1,6 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $ +bin/${TARGET_ARCH}-dlltool +bin/${TARGET_ARCH}-windres +${TARGET_ARCH}/bin/dlltool +${TARGET_ARCH}/bin/windres +${TARGET_ARCH}/include/assert.h -- cgit v1.2.3