switch to gcc 3.3.2 as a stable port

okay naddy@
This commit is contained in:
espie 2004-01-31 14:58:03 +00:00
parent 8cae9bc0af
commit a5f864f628
64 changed files with 830 additions and 2008 deletions

View File

@ -1,30 +1,33 @@
# $OpenBSD: Makefile,v 1.80 2003/06/30 12:19:23 espie Exp $
# $OpenBSD: Makefile,v 1.81 2004/01/31 14:58:03 espie Exp $
ONLY_FOR_ARCHS= alpha i386 m68k sparc sparc64 powerpc
ONLY_FOR_ARCHS= alpha i386 m68k sparc sparc64 powerpc vax
MAKE_GXX=Yes
MAKE_FORTRAN=Yes
MAKE_OBJC=Yes
# Java is still mostly broken (boehm-gc)
MAKE_JAVA=No
.if ${MACHINE_ARCH} == "i386"
MAKE_JAVA=Yes
#MAKE_ADA=Yes
MAKE_ADA=No
#AS_PATH=/usr/bin/as
#LD_PATH=/usr/bin/ld
.else
MAKE_ADA=No
.endif
MAKE_GXX?=No
MAKE_FORTRAN?=No
MAKE_OBJC?=No
MAKE_JAVA?=No
MAKE_ADA?=No
MYDIR=lang/egcs/snapshot
# This is a configuration file for gcc
COM= 'GNU compiler collection'
COMMENT= ${COM}: core C compiler
COMMENT-c++ = ${COM}: C++ compiler
COMMENT-estdc= ${COM}: C++ compiler library
COMMENT-chill= ${COM}: Chill compiler
COMMENT-g77= ${COM}: f77 compiler
COMMENT-java= ${COM}: java compiler
COMMENT-objc= ${COM}: obj C compiler
@ -33,7 +36,6 @@ COMMENT-ada= ${COM}: Ada compiler
PKGNAME= gcc-$V
PKGNAME-c++ = g++-$V
PKGNAME-estdc = libstdc++-$V
PKGNAME-chill= gchill-$V
PKGNAME-g77= g77-$V
PKGNAME-java= gcj-$V
PKGNAME-objc= gobjc-$V
@ -41,6 +43,12 @@ PKGNAME-ada= gnat-$V
BUILD_DEPENDS= ::devel/autoconf/2.13
BUILD_DEPENDS+= ::devel/metaauto
SUBPACKAGE?=
.if ${MAKE_JAVA:L} == "yes"
. if !defined(PACKAGING) || ${SUBPACKAGE} == "-java"
LIB_DEPENDS+=gc::devel/boehm-gc
. endif
.endif
# This can be patched out, apart from java that wants a pure parser.
BUILD_DEPENDS+= :bison-*:devel/bison
@ -59,7 +67,7 @@ PERMIT_DISTFILES_CDROM=Yes
# see files/tests for precise testing procedure
.if defined(MAKE_JAVA) && ${MAKE_JAVA:L} == "yes"
.if ${MAKE_JAVA:L} == "yes"
MAKE_GXX=Yes
.endif
@ -70,13 +78,13 @@ DESCR=${PKGDIR}/DESCR
REGRESS_DEPENDS=::devel/dejagnu
# No way around it, java wants a pure parser
.if defined(MAKE_JAVA) && ${MAKE_JAVA:L} == "yes"
.if ${MAKE_JAVA:L} == "yes"
BUILD_DEPENDS+=:bison-*:devel/bison
.endif
#### fetch section
V=3.2.3
V=3.3.2
DIRECTORY=releases/${DISTNAME}/
DISTNAME= gcc-$V
@ -152,7 +160,7 @@ MASTER_SITES=${SITES:S/%DATE%/${LATEST_DATE}/}
#ac_dirs=gcc libiberty libstdc++-v3 libf2c/libI77 libffi fastjar libjava
ac_dirs=gcc libiberty libf2c/libI77 libffi fastjar libjava
rm_dirs=zlib texinfo #boehm-gc
rm_dirs=zlib texinfo boehm-gc
# get openbsd configuration files where they should be
post-patch:
@ -185,24 +193,24 @@ CONFIGURE_STYLE= gnu
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/gcc
LANGS=c
.if defined(MAKE_GXX) && ${MAKE_GXX:L} == "yes"
.if ${MAKE_GXX:L} == "yes"
LANGS:=${LANGS},c++
MULTI_PACKAGES+=-c++ -estdc
.endif
.if defined(MAKE_FORTRAN) && ${MAKE_FORTRAN:L} == "yes"
.if ${MAKE_FORTRAN:L} == "yes"
LANGS:=${LANGS},f77
MULTI_PACKAGES+=-g77
.endif
.if defined(MAKE_OBJC) && ${MAKE_OBJC:L} == "yes"
.if ${MAKE_OBJC:L} == "yes"
LANGS:=${LANGS},objc
MULTI_PACKAGES+=-objc
.endif
.if defined(MAKE_JAVA) && ${MAKE_JAVA:L} == "yes"
.if ${MAKE_JAVA:L} == "yes"
LANGS:=${LANGS},java
MULTI_PACKAGES+=-java
CONFIGURE_ARGS+=--enable-java-gc=system-boehm
.endif
.if defined(MAKE_ADA) && ${MAKE_ADA:L} == "yes"
.if ${MAKE_ADA:L} == "yes"
LANGS:=${LANGS},ada
MULTI_PACKAGES+=-ada
@ -226,12 +234,9 @@ CONFIGURE_ARGS= --verbose --program-transform-name=s,^,e, \
CONFIGURE_ARGS+=--enable-cpp
CONFIGURE_ARGS+=--enable-languages=${LANGS}
.if defined(MAKE_JAVA) && ${MAKE_JAVA:L} == "yes"
.if ${MAKE_JAVA:L} == "yes"
CONFIGURE_ARGS+=--enable-sjlj-exceptions
# For boehm-gc
#CONFIGURE_ENV+= LDFLAGS="${LDFLAGS} -L/usr/local/lib -lgc"
#CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
.endif
@ -258,8 +263,10 @@ SEPARATE_BUILD=concurrent
####
# build section
# should work without gmake. If it turns out to be needed, this must be
# reported to MAINTAINER.
# Issues without gmake:
# stuff doesn't get passed thru correctly to libtool in multi-do
# libstdc++-v3 wants gmake
# java wants gmake
USE_GMAKE= yes
# you shouldn't skip bootstrap unless you know what you're doing
@ -283,9 +290,7 @@ pre-build:
post-build:
# avoid packaging include copies along...
find ${WRKBUILD} -name \*.orig|xargs rm
mkdir -p ${WRKBUILD}/gcc/include/machine
cp ${FILESDIR}/include/machine/ansi.h ${WRKBUILD}/gcc/include/machine
.if defined(MAKE_ADA) && ${MAKE_ADA:L} == "yes"
.if ${MAKE_ADA:L} == "yes"
cd ${WRKBUILD}/gcc && env ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} gnatlib_and_tools
.endif
@ -295,21 +300,21 @@ post-install:
# Tests still need to be performed at the end of install, I don't know why.
REGRESS_DEPENDS+=::lang/egcs/stable
.if defined(MAKE_GXX) && ${MAKE_GXX:L} == "yes"
REGRESS_DEPENDS+=::lang/egcs/stable,-c++,-estdc
REGRESS_DEPENDS+=::${MYDIR}
.if ${MAKE_GXX:L} == "yes"
REGRESS_DEPENDS+=::${MYDIR},-c++,-estdc
.endif
.if defined(MAKE_FORTRAN) && ${MAKE_FORTRAN:L} == "yes"
REGRESS_DEPENDS+=::lang/egcs/stable,-g77
.if ${MAKE_FORTRAN:L} == "yes"
REGRESS_DEPENDS+=::${MYDIR},-g77
.endif
.if defined(MAKE_OBJC) && ${MAKE_OBJC:L} == "yes"
REGRESS_DEPENDS+=::lang/egcs/stable,-objc
.if ${MAKE_OBJC:L} == "yes"
REGRESS_DEPENDS+=::${MYDIR},-objc
.endif
.if defined(MAKE_JAVA) && ${MAKE_JAVA:L} == "yes"
REGRESS_DEPENDS+=::lang/egcs/stable,-java
.if ${MAKE_JAVA:L} == "yes"
REGRESS_DEPENDS+=::${MYDIR},-java
.endif
.if defined(MAKE_ADA) && ${MAKE_ADA:L} == "yes"
REGRESS_DEPENDS+=::lang/egcs/stable,-ada
.if ${MAKE_ADA:L} == "yes"
REGRESS_DEPENDS+=::${MYDIR},-ada
.endif
TEST_RESULT=${WRKBUILD}/test.result
@ -341,10 +346,10 @@ GCC_NAME=${WRKBUILD}/gcc/xgcc
.if defined(PACKAGING) && defined(SUBPACKAGE)
. if !empty(SUBPACKAGE) && ${SUBPACKAGE} != "-estdc"
RUN_DEPENDS+=::lang/egcs/stable
RUN_DEPENDS+=::${MYDIR}
. endif
. if ${SUBPACKAGE} == "-c++"
RUN_DEPENDS+=::lang/egcs/stable,-estdc
RUN_DEPENDS+=::${MYDIR},-estdc
. endif
.endif

View File

@ -1,3 +1,3 @@
MD5 (egcs/gcc-3.2.3.tar.bz2) = 23d1146d5efa0e0bfad9968dbb418e1e
RMD160 (egcs/gcc-3.2.3.tar.bz2) = 64b599c5ee29475785c910ccaf9ccc41ee5244e7
SHA1 (egcs/gcc-3.2.3.tar.bz2) = 86d0af66a78ae2fb39c63403569d0f4349cf93fb
MD5 (egcs/gcc-3.3.2.tar.bz2) = 65999f654102f5438ac8562d13a6eced
RMD160 (egcs/gcc-3.3.2.tar.bz2) = e0b6d709fb75c4f3640f2b9886168f3166b94df8
SHA1 (egcs/gcc-3.3.2.tar.bz2) = 8750024a3e5a79d17a610d93cb5f171097e3ffee

View File

@ -34,8 +34,15 @@ Boston, MA 02111-1307, USA. */
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
/* Run-time target specifications */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__unix__ -D__ELF__ -D__i386__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD)"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
OPENBSD_OS_CPP_BUILTINS_ELF(); \
builtin_define ("__unix__"); \
builtin_assert ("system=bsd"); \
} \
while (0)
/* As an elf system, we need crtbegin/crtend stuff. */
#undef STARTFILE_SPEC
@ -57,9 +64,6 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_UNSIGNED
#define WCHAR_UNSIGNED 0
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD

View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdbool.h,v 1.1 2002/01/01 09:32:27 espie Exp $ */
/* $OpenBSD: stdbool.h,v 1.2 2004/01/31 14:58:03 espie Exp $ */
#ifndef _STDBOOL_H
#define _STDBOOL_H

View File

@ -1,113 +0,0 @@
$OpenBSD: patch-boehm-gc_dyn_load_c,v 1.1 2002/06/09 00:35:38 espie Exp $
--- boehm-gc/dyn_load.c.orig Mon Jun 3 21:27:26 2002
+++ boehm-gc/dyn_load.c Mon Jun 3 21:37:23 2002
@@ -57,7 +57,9 @@
!defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
!defined(RS6000) && !defined(SCO_ELF) && \
!(defined(FREEBSD) && defined(__ELF__)) && \
- !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD)
+ !(defined(NETBSD) && defined(__ELF__)) && \
+ !(defined(OPENBSD)) && \
+ !defined(HURD)
--> We only know how to find data segments of dynamic libraries for the
--> above. Additional SVR4 variants might not be too
--> hard to add.
@@ -81,7 +83,9 @@
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || \
- (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
+ (defined(NETBSD) && defined(__ELF__)) || \
+ (defined(OPENBSD) && defined(__ELF__) || \
+ defined(HURD)
# include <stddef.h>
# include <elf.h>
# include <link.h>
@@ -263,9 +267,86 @@ void GC_register_dynamic_libraries()
# endif /* !USE_PROC ... */
# endif /* SUNOS */
+#if defined(OPENBSD) && !defined(__ELF__)
+
+#include <link.h>
+
+#ifdef LINT
+ struct _dynamic _DYNAMIC;
+#endif
+
+static struct so_map *
+GC_FirstDLOpenedLinkMap()
+{
+ extern struct _dynamic _DYNAMIC;
+
+ if( &_DYNAMIC == 0) {
+ return(0);
+ }
+ return(_DYNAMIC.d_un.d_dst->sdt_loaded);
+}
+
+
+#if 0
+/* Return the address of the ld.so allocated common symbol */
+/* with the least address, or 0 if none. */
+static ptr_t GC_first_common()
+{
+ ptr_t result = 0;
+ extern struct _dynamic _DYNAMIC;
+ struct rtc_symb * curr_symbol;
+
+ if( &_DYNAMIC == 0) {
+ return(0);
+ }
+ curr_symbol = _DYNAMIC.ldd -> ldd_cp;
+ for (; curr_symbol != 0; curr_symbol = curr_symbol -> rtc_next) {
+ if (result == 0
+ || (ptr_t)(curr_symbol -> rtc_sp -> n_value) < result) {
+ result = (ptr_t)(curr_symbol -> rtc_sp -> n_value);
+ }
+ }
+ return(result);
+}
+#endif
+
+void GC_register_dynamic_libraries()
+{
+ struct so_map *lm = GC_FirstDLOpenedLinkMap();
+
+
+ for (lm = GC_FirstDLOpenedLinkMap();
+ lm != (struct so_map *) 0; lm = lm->som_next)
+ {
+ struct exec *e;
+
+ e = (struct exec *) lm->som_addr;
+ GC_add_roots_inner(
+ ((char *) (N_DATOFF(*e) + lm->som_addr)),
+ ((char *) (N_BSSADDR(*e) + e->a_bss + lm->lm_addr)),
+ TRUE);
+ }
+#if 0
+ {
+ static ptr_t common_start = 0;
+ ptr_t common_end;
+ extern ptr_t GC_find_limit();
+
+ if (common_start == 0) common_start = GC_first_common();
+ if (common_start != 0) {
+ common_end = GC_find_limit(common_start, TRUE);
+ GC_add_roots_inner((char *)common_start, (char *)common_end, TRUE);
+ }
+ }
+#endif
+}
+#endif
+
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || \
- (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
+ (defined(NETBSD) && defined(__ELF__)) || \
+ (defined(OPENBSD) && defined(__ELF__)) || \
+ defined(HURD)
#ifdef USE_PROC_FOR_LIBRARIES

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-boehm-gc_include_private_gcconfig_h,v 1.1 2002/06/09 00:35:38 espie Exp $
--- boehm-gc/include/private/gcconfig.h.orig Mon Jun 3 21:18:07 2002
+++ boehm-gc/include/private/gcconfig.h Mon Jun 3 21:27:09 2002
@@ -553,6 +553,7 @@
# define HEURISTIC2
extern char etext[];
# define DATASTART ((ptr_t)(etext))
+# define DYNAMIC_LOADING
# endif
# ifdef NETBSD
# define OS_TYPE "NETBSD"

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-configure_in,v 1.4 2003/02/15 14:38:27 espie Exp $
--- configure.in.orig Mon Jul 8 12:00:57 2002
+++ configure.in Sun Nov 24 16:55:22 2002
@@ -1053,6 +1053,9 @@ case "${target}" in
configdirs="$configdirs grez"
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ *-*-openbsd*)
+ noconfigdirs="$noconfigdirs target-boehm-gc"
+ ;;
*-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_ada_adaint_c,v 1.1 2002/05/29 01:42:08 espie Exp $
--- gcc/ada/adaint.c.orig Wed May 29 03:31:59 2002
+++ gcc/ada/adaint.c Wed May 29 03:32:50 2002
@@ -619,7 +619,7 @@ __gnat_open_new_temp (path, fmode)
strcpy (path, "GNAT-XXXXXX");
-#if defined (linux) && !defined (__vxworks)
+#if (defined (linux) && !defined (__vxworks)) || defined(__OpenBSD__)
return mkstemp (path);
#elif defined (__Lynx__)
mktemp (path);

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_ada_gnatchop_adb,v 1.1 2002/11/24 15:43:30 espie Exp $
--- gcc/ada/gnatchop.adb.orig Sun Dec 16 02:13:40 2001
+++ gcc/ada/gnatchop.adb Sun Nov 24 16:36:34 2002
@@ -1640,7 +1640,7 @@ procedure Gnatchop is
begin
-- Check presence of required executables
- Gnat_Cmd := Locate_Executable ("gcc");
+ Gnat_Cmd := Locate_Executable ("egcc");
if Gnat_Cmd = null then
goto No_Files_Written;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_ada_gnatlink_adb,v 1.1 2002/11/24 15:43:30 espie Exp $
--- gcc/ada/gnatlink.adb.orig Sat May 4 05:28:12 2002
+++ gcc/ada/gnatlink.adb Sun Nov 24 16:36:34 2002
@@ -109,7 +109,7 @@ procedure Gnatlink is
subtype chars_ptr is System.Address;
- Gcc : String_Access := Program_Name ("gcc");
+ Gcc : String_Access := Program_Name ("egcc");
Read_Mode : constant String := "r" & ASCII.Nul;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_ada_make_adb,v 1.1 2002/11/24 15:43:30 espie Exp $
--- gcc/ada/make.adb.orig Sat May 4 05:28:19 2002
+++ gcc/ada/make.adb Sun Nov 24 16:36:34 2002
@@ -412,7 +412,7 @@ package body Make is
-- Compiler, Binder & Linker Data and Subprograms --
----------------------------------------------------
- Gcc : String_Access := Program_Name ("gcc");
+ Gcc : String_Access := Program_Name ("egcc");
Gnatbind : String_Access := Program_Name ("gnatbind");
Gnatlink : String_Access := Program_Name ("gnatlink");
-- Default compiler, binder, linker programs

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_ada_mdlltool_adb,v 1.1 2002/11/24 15:43:30 espie Exp $
--- gcc/ada/mdlltool.adb.orig Sat May 4 05:28:20 2002
+++ gcc/ada/mdlltool.adb Sun Nov 24 16:36:34 2002
@@ -42,7 +42,7 @@ package body MDLL.Tools is
Dlltool_Name : constant String := "dlltool";
Dlltool_Exec : OS_Lib.String_Access;
- Gcc_Name : constant String := "gcc";
+ Gcc_Name : constant String := "egcc";
Gcc_Exec : OS_Lib.String_Access;
Gnatbind_Name : constant String := "gnatbind";

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_ada_mlib-utl_adb,v 1.1 2002/11/24 15:43:30 espie Exp $
--- gcc/ada/mlib-utl.adb.orig Tue Oct 2 15:45:38 2001
+++ gcc/ada/mlib-utl.adb Sun Nov 24 16:36:34 2002
@@ -42,7 +42,7 @@ package body MLib.Utl is
Initialized : Boolean := False;
- Gcc_Name : constant String := "gcc";
+ Gcc_Name : constant String := "egcc";
Gcc_Exec : OS_Lib.String_Access;
Ar_Name : constant String := "ar";

View File

@ -1,30 +1,28 @@
$OpenBSD: patch-gcc_attribs_c,v 1.3 2003/06/26 18:39:52 avsm Exp $
--- gcc/attribs.c.orig Thu Jun 26 18:07:53 2003
+++ gcc/attribs.c Thu Jun 26 18:19:35 2003
@@ -88,6 +88,8 @@ static tree handle_deprecated_attribute
$OpenBSD: patch-gcc_c-common_c,v 1.1 2004/01/31 14:58:03 espie Exp $
--- gcc/c-common.c.orig 2003-11-11 12:54:41.000000000 +0100
+++ gcc/c-common.c 2003-11-11 12:56:12.000000000 +0100
@@ -765,6 +765,8 @@ static tree handle_deprecated_attribute
bool *));
static tree handle_vector_size_attribute PARAMS ((tree *, tree, tree, int,
bool *));
+static tree handle_bounded_attribute PARAMS ((tree *, tree, tree, int,
+ bool *));
static tree vector_size_helper PARAMS ((tree, tree));
/* Table of machine-independent attributes common to all C-like languages. */
@@ -148,6 +150,8 @@ static const struct attribute_spec c_com
static tree handle_nonnull_attribute PARAMS ((tree *, tree, tree, int,
bool *));
static tree handle_nothrow_attribute PARAMS ((tree *, tree, tree, int,
@@ -850,6 +852,8 @@ const struct attribute_spec c_common_att
handle_deprecated_attribute },
{ "vector_size", 1, 1, false, true, false,
handle_vector_size_attribute },
+ { "bounded", 3, 4, false, true, false,
+ handle_bounded_attribute },
{ NULL, 0, 0, false, false, false, NULL }
};
@@ -1355,6 +1359,21 @@ vector_size_helper (type, bottom)
TREE_THIS_VOLATILE (outer) = TREE_THIS_VOLATILE (type);
{ "visibility", 1, 1, true, false, false,
handle_visibility_attribute },
{ "tls_model", 1, 1, true, false, false,
@@ -6381,6 +6385,21 @@ vector_size_helper (type, bottom)
return outer;
+}
+
}
+/* Handle a "bounded" attribute; arguments as in
+ struct attribute_spec.handler.
+ Just a stub for now. */
@ -38,6 +36,8 @@ $OpenBSD: patch-gcc_attribs_c,v 1.3 2003/06/26 18:39:52 avsm Exp $
+ bool *no_add_attrs ATTRIBUTE_UNUSED;
+{
+ return NULL_TREE;
}
/* Split SPECS_ATTRS, a list of declspecs and prefix attributes, into two
+}
+
/* Handle the "nonnull" attribute. */
static tree
handle_nonnull_attribute (node, name, args, flags, no_add_attrs)

View File

@ -1,54 +0,0 @@
$OpenBSD: patch-gcc_c-format_c,v 1.1 2002/09/17 12:55:05 espie Exp $
--- gcc/c-format.c.orig Tue Sep 17 14:34:09 2002
+++ gcc/c-format.c Tue Sep 17 14:37:51 2002
@@ -73,7 +73,7 @@ set_Wformat (setting)
/* This must be in the same order as format_types, with format_type_error
last. */
-enum format_type { printf_format_type, scanf_format_type,
+enum format_type { printf_format_type, syslog_format_type, scanf_format_type,
strftime_format_type, strfmon_format_type,
format_type_error };
@@ -786,6 +786,28 @@ static const format_char_info print_char
{ NULL, 0, 0, NOLENGTHS, NULL, NULL }
};
+static const format_char_info syslog_char_table[] =
+{
+ /* C89 conversion specifiers. */
+ { "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM }, "-wp0 +'I", "i" },
+ { "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i" },
+ { "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0'I", "i" },
+ { "fgG", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'", "" },
+ { "eE", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "" },
+ { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "" },
+ { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR" },
+ { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c" },
+ { "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM }, "", "W" },
+ /* C99 conversion specifiers. */
+ { "F", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'", "" },
+ { "aA", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "" },
+ /* X/Open conversion specifiers. */
+ { "C", 0, STD_EXT, { TEX_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "" },
+ { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R" },
+ { "m", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "" },
+ { NULL, 0, 0, NOLENGTHS, NULL, NULL }
+};
+
static const format_char_info scan_char_table[] =
{
/* C89 conversion specifiers. */
@@ -844,6 +866,12 @@ static const format_char_info monetary_c
static const format_kind_info format_types[] =
{
{ "printf", printf_length_specs, print_char_table, " +#0-'I", NULL,
+ printf_flag_specs, printf_flag_pairs,
+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
+ 'w', 0, 'p', 0, 'L',
+ &integer_type_node, &integer_type_node
+ },
+ { "syslog", printf_length_specs, syslog_char_table, " +#0-'I", NULL,
printf_flag_specs, printf_flag_pairs,
FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
'w', 0, 'p', 0, 'L',

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-gcc_config_alpha_openbsd1_h,v 1.1 2002/06/03 18:33:33 espie Exp $
--- gcc/config/alpha/openbsd1.h.orig Mon Jun 3 17:18:18 2002
+++ gcc/config/alpha/openbsd1.h Mon Jun 3 17:17:57 2002
@@ -0,0 +1,23 @@
+/* Configuration fragment for an alpha OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define OBSD_HAS_DECLARE_FUNCTION_NAME
+#define OBSD_HAS_DECLARE_FUNCTION_SIZE
+#define OBSD_HAS_DECLARE_OBJECT

View File

@ -1,130 +0,0 @@
$OpenBSD: patch-gcc_config_alpha_openbsd_h,v 1.4 2003/07/24 12:15:48 naddy Exp $
--- gcc/config/alpha/openbsd.h.orig Fri Nov 3 00:29:08 2000
+++ gcc/config/alpha/openbsd.h Mon Jul 21 15:59:22 2003
@@ -21,28 +21,28 @@ Boston, MA 02111-1307, USA. */
/* We settle for little endian for now. */
#define TARGET_ENDIAN_DEFAULT 0
-#include <alpha/alpha.h>
-
-#define OBSD_NO_DYNAMIC_LIBRARIES
-#define OBSD_HAS_DECLARE_FUNCTION_NAME
-#define OBSD_HAS_DECLARE_FUNCTION_SIZE
-#define OBSD_HAS_DECLARE_OBJECT
-
-/* alpha ecoff supports only weak aliases, see below. */
-#define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS (FILE,NAME,0)
-
-#include <openbsd.h>
-
/* Controlling the compilation driver. */
/* alpha needs __start. */
#undef LINK_SPEC
#define LINK_SPEC \
- "%{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{assert*}"
+ "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+ %{shared:-shared} %{R*} \
+ %{static:-Bstatic} \
+ %{!static:-Bdynamic} \
+ %{assert*} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
+ crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
/* run-time target specifications */
-#define CPP_PREDEFINES "-D__unix__ -D__ANSI_COMPAT -Asystem=unix \
--D__OpenBSD__ -D__alpha__ -D__alpha"
+#define CPP_PREDEFINES "-D__unix__ -D__ANSI_COMPAT -Asystem=unix -D__OpenBSD__ -D__ELF__"
/* Layout of source language data types. */
@@ -60,67 +60,22 @@ Boston, MA 02111-1307, USA. */
#define WCHAR_TYPE_SIZE 32
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+/* #undef PREFERRED_DEBUGGING_TYPE */
+/* #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG */
+/* Output and generation of labels. */
#define LOCAL_LABEL_PREFIX "."
-/* We don't have an init section yet. */
-#undef HAS_INIT_SECTION
-
-/* collect2 support (assembler format: macros for initialization). */
-
-/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
- library with the proper functions to handle this -> collect2 will
- default to using nm. */
-#undef OBJECT_FORMAT_COFF
-#undef EXTENDED_COFF
-
-/* Assembler format: exception region output. */
-
-/* All configurations that don't use elf must be explicit about not using
- dwarf unwind information. egcs doesn't try too hard to check internal
- configuration files... */
-#ifdef INCOMING_RETURN_ADDR_RTX
-#undef DWARF2_UNWIND_INFO
-#define DWARF2_UNWIND_INFO 0
-#endif
-
-/* Assembler format: file framework. */
-
-/* Taken from alpha/osf.h. This used to be common to all alpha
- configurations, but elf has departed from it.
- Check alpha/alpha.h, alpha/osf.h for it when egcs is upgraded. */
-#ifndef ASM_FILE_START
-#define ASM_FILE_START(FILE) \
-{ \
- alpha_write_verstamp (FILE); \
- fprintf (FILE, "\t.set noreorder\n"); \
- fprintf (FILE, "\t.set volatile\n"); \
- fprintf (FILE, "\t.set noat\n"); \
- if (TARGET_SUPPORT_ARCH) \
- fprintf (FILE, "\t.arch %s\n", \
- TARGET_CPU_EV6 ? "ev6" \
- : (TARGET_CPU_EV5 \
- ? (TARGET_MAX ? "pca56" : TARGET_BWX ? "ev56" : "ev5") \
- : "ev4")); \
- \
- ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \
-}
-#endif
-
-/* Assembler format: label output. */
-
-#define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
- do { \
- fputs ("\t.weakext\t", FILE); \
- assemble_name (FILE, NAME); \
- if (VALUE) \
- { \
- fputs (" , ", FILE); \
- assemble_name (FILE, VALUE); \
- } \
- fputc ('\n', FILE); \
- } while (0)
-
+/* .set on alpha is not used to output labels. */
+#undef SET_ASM_OP
+/* So, provide corresponding default, without the .set. */
+#undef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
+#define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \
+ do { \
+ assemble_name (FILE, SY); \
+ fputc ('=', FILE); \
+ assemble_name (FILE, HI); \
+ fputc ('-', FILE); \
+ assemble_name (FILE, LO); \
+ } while (0)

View File

@ -1,68 +0,0 @@
$OpenBSD: patch-gcc_config_gcc,v 1.15 2003/06/26 00:19:50 espie Exp $
--- gcc/config.gcc.orig Thu Jan 30 09:03:42 2003
+++ gcc/config.gcc Thu May 22 17:53:28 2003
@@ -582,9 +582,11 @@ alpha*-*-netbsd*)
;;
alpha*-*-openbsd*)
+ tm_file="alpha/alpha.h alpha/elf.h alpha/openbsd1.h openbsd.h ${tm_file}"
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
tmake_file="alpha/t-alpha alpha/t-ieee"
+ gas=yes gnu_ld=yes
;;
alpha*-dec-osf*)
@@ -1262,11 +1264,26 @@ x86_64-*-netbsd*)
tm_file="${tm_file} i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
float_format=i386
;;
-i[34567]86-*-openbsd*)
+# Change ...[012] to i[34567]86-*-openbsd3.[0123] after we move to 3.4
+i[34567]86-*-openbsd2* | i[34567]86-*-openbsd3.[012])
# needed to unconfuse gdb
tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
# we need collect2 until our bug is fixed...
use_collect2=yes
+ tm_file="i386/i386.h i386/att.h svr4.h i386/openbsd.h i386/perform.h"
+ gas=yes
+ gnu_ld=yes
+ stabs=yes
+ ;;
+i[34567]86-*-openbsd*)
+ # needed to unconfuse gdb
+ tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
+ tm_file="i386/i386.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
+ tm_file="${tm_file} exec-stack.h"
+ tm_file="${tm_file} openbsd.h i386/openbsdelf.h"
+ gas=yes
+ gnu_ld=yes
+ stabs=yes
;;
i[34567]86-*-coff*)
tm_file=i386/i386-coff.h
@@ -2751,8 +2768,8 @@ romp-*-openbsd*)
# Nothing special
;;
powerpc-*-openbsd*)
- tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
- extra_headers=
+ tm_file="rs6000/rs6000.h rs6000/openbsd1.h dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h openbsd.h ${tm_file}"
+ tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-openbsd"
;;
powerpc64-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux64.h"
@@ -3060,6 +3077,13 @@ sparc-*-openbsd*)
tmake_file="t-libc-ok t-openbsd sparc/t-openbsd"
# we need collect2 until our bug is fixed...
use_collect2=yes
+ ;;
+sparc64-*-openbsd*)
+ tm_file="sparc/openbsd1-64.h sparc/sparc.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
+ xm_file=sparc/xm-sp64.h
+ gas=yes gnu_ld=yes
+ with_cpu=ultrasparc
+ float_format=i128
;;
sparc64-*-openbsd*)
tm_file="sparc/openbsd1-64.h sparc/sparc.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-gcc_config_i386_i386_c,v 1.5 2002/11/24 15:42:48 espie Exp $
--- gcc/config/i386/i386.c.orig Thu Oct 31 19:39:32 2002
+++ gcc/config/i386/i386.c Sat Nov 23 23:25:33 2002
@@ -10921,6 +10921,9 @@ x86_initialize_trampoline (tramp, fnaddr
if (offset > TRAMPOLINE_SIZE)
abort ();
}
+#ifdef FINALIZE_TRAMPOLINE
+ FINALIZE_TRAMPOLINE (tramp);
+#endif
}
#define def_builtin(MASK, NAME, TYPE, CODE) \

View File

@ -1,28 +0,0 @@
$OpenBSD: patch-gcc_config_i386_openbsd_h,v 1.6 2002/09/14 10:14:51 espie Exp $
--- gcc/config/i386/openbsd.h.orig Tue May 28 23:29:47 2002
+++ gcc/config/i386/openbsd.h Thu Sep 12 14:52:17 2002
@@ -103,3 +103,24 @@ Boston, MA 02111-1307, USA. */
/* OpenBSD gas currently does not support quad, so do not use it. */
#undef ASM_QUAD
+
+#undef FINALIZE_TRAMPOLINE
+#define FINALIZE_TRAMPOLINE(TRAMP) \
+ emit_library_call(gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), \
+ 0, VOIDmode, 1, memory_address (SImode, (TRAMP)), Pmode)
+
+#define TRANSFER_FROM_TRAMPOLINE \
+extern void __enable_execute_stack (void *); \
+void \
+__enable_execute_stack (addr) \
+ void *addr; \
+{ \
+ long size = getpagesize (); \
+ long mask = ~(size-1); \
+ char *page = (char *) (((long) addr) & mask); \
+ char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \
+ \
+ /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \
+ if (mprotect (page, end - page, 7) < 0) \
+ perror ("mprotect of trampoline code"); \
+}

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-gcc_config_in,v 1.1 2002/06/09 00:33:57 espie Exp $
--- gcc/config.in.orig Mon Jun 3 16:38:59 2002
+++ gcc/config.in Mon Jun 3 16:39:52 2002
@@ -153,6 +153,9 @@
/* Define if you have the kill function. */
#undef HAVE_KILL
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
/* Define if you have the lstat function. */
#undef HAVE_LSTAT

View File

@ -1,30 +0,0 @@
--- gcc/config/openbsd.h.orig Sun Nov 11 22:20:02 2001
+++ gcc/config/openbsd.h Tue Feb 11 22:27:44 2003
@@ -74,7 +74,7 @@ Boston, MA 02111-1307, USA. */
/* Controlling the compilation driver. */
/* CPP_SPEC appropriate for OpenBSD. We deal with -posix and -pthread.
- XXX the way threads are handling currently is not very satisfying,
+ XXX the way threads are handled currently is not very satisfying,
since all code must be compiled with -pthread to work.
This two-stage defines makes it easy to pick that for targets that
have subspecs. */
@@ -84,10 +84,9 @@ Boston, MA 02111-1307, USA. */
#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
#endif
-/* LIB_SPEC appropriate for OpenBSD. Select the appropriate libc,
- depending on profiling and threads. Basically,
- -lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */
-#define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}"
+/* LIB_SPEC appropriate for OpenBSD. Include -lpthread if -pthread is
+ specified on the command line. */
+#define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
#ifndef OBSD_HAS_CORRECT_SPECS
@@ -308,3 +307,4 @@ do { \
as this depends on a few other details as well... */
#define HANDLE_SYSV_PRAGMA
+#define LIBSTDCXX "-lestdc++"

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_crtsavres_asm,v 1.1 2002/06/07 01:38:59 drahn Exp $
--- gcc/config/rs6000/crtsavres.asm.orig Tue Feb 19 13:40:41 2002
+++ gcc/config/rs6000/crtsavres.asm Thu May 30 23:54:20 2002
@@ -39,7 +39,7 @@
.file "crtsavres.asm"
.section ".text"
- #include "ppc-asm.h"
+ #include "rs6000/ppc-asm.h"
#ifndef __powerpc64__

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_eabi_asm,v 1.1 2002/06/07 01:38:59 drahn Exp $
--- gcc/config/rs6000/eabi.asm.orig Tue Feb 19 13:40:41 2002
+++ gcc/config/rs6000/eabi.asm Thu May 30 21:55:17 2002
@@ -38,7 +38,7 @@
.file "eabi.asm"
.section ".text"
- #include "ppc-asm.h"
+ #include "rs6000/ppc-asm.h"
#ifndef __powerpc64__

View File

@ -1,28 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_openbsd1_h,v 1.1 2002/05/29 23:00:27 espie Exp $
--- gcc/config/rs6000/openbsd1.h.orig Thu May 30 00:56:45 2002
+++ gcc/config/rs6000/openbsd1.h Thu May 30 00:57:11 2002
@@ -0,0 +1,24 @@
+/* Configuration file for an rs6000 OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define OBSD_HAS_CORRECT_SPECS
+#define OBSD_HAS_DECLARE_FUNCTION_NAME
+#define OBSD_HAS_DECLARE_FUNCTION_SIZE
+#define OBSD_HAS_DECLARE_OBJECT

View File

@ -1,87 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_openbsd_h,v 1.3 2003/07/24 13:43:44 brad Exp $
--- gcc/config/rs6000/openbsd.h.orig Sun Jul 20 02:12:17 2003
+++ gcc/config/rs6000/openbsd.h Sun Jul 20 02:15:24 2003
@@ -0,0 +1,83 @@
+/* Configuration file for an rs6000 OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* XXX need to check ASM_WEAKEN_LABEL/ASM_GLOBALIZE_LABEL. */
+
+/* Run-time target specifications. */
+#define CPP_PREDEFINES \
+ "-D__ELF__ -D__PPC -D__PPC__ -D__powerpc -D__powerpc__ -Acpu(powerpc) -Amachine(powerpc)"
+
+#undef CPP_OS_DEFAULT_SPEC
+#define CPP_OS_DEFAULT_SPEC "%(cpp_os_openbsd)"
+
+#undef LINKER_NAME
+#define LINKER_NAME "ld"
+
+#undef LINK_SPEC
+#define LINK_SPEC "%{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}} \
+ %{static:-static}}"
+
+#undef LIB_DEFAULT_SPEC
+#define LIB_DEFAULT_SPEC "%(lib_openbsd)"
+
+#undef STARTFILE_DEFAULT_SPEC
+#define STARTFILE_DEFAULT_SPEC "%(startfile_openbsd)"
+
+#undef ENDFILE_DEFAULT_SPEC
+#define ENDFILE_DEFAULT_SPEC "%(endfile_openbsd)"
+
+#undef LINK_START_DEFAULT_SPEC
+#define LINK_START_DEFAULT_SPEC "%(link_start_openbsd)"
+
+#undef LINK_OS_DEFAULT_SPEC
+#define LINK_OS_DEFAULT_SPEC "%(link_os_openbsd)"
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (PowerPC OpenBSD)");
+
+/* Default ABI to use */
+#undef RS6000_ABI_NAME
+#define RS6000_ABI_NAME "openbsd"
+
+/* Define this macro as a C expression for the initializer of an
+ array of string to tell the driver program which options are
+ defaults for this target and thus do not need to be handled
+ specially when using `MULTILIB_OPTIONS'.
+
+ Do not define this macro if `MULTILIB_OPTIONS' is not defined in
+ the target makefile fragment or if none of the options listed in
+ `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
+
+#undef MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS { "mbig", "mcall-openbsd" }
+
+/* collect2 support (Macros for initialization). */
+
+
+/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
+ library with the proper functions to handle this -> collect2 will
+ default to using nm. */
+#undef OBJECT_FORMAT_COFF
+
+

View File

@ -1,233 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_sysv4_h,v 1.4 2003/02/15 14:38:27 espie Exp $
--- gcc/config/rs6000/sysv4.h.orig Thu Jan 30 15:03:42 2003
+++ gcc/config/rs6000/sysv4.h Tue Feb 11 22:30:12 2003
@@ -197,6 +197,8 @@ do { \
rs6000_current_abi = ABI_V4; \
else if (!strcmp (rs6000_abi_name, "linux")) \
rs6000_current_abi = ABI_V4; \
+ else if (!strcmp (rs6000_abi_name, "openbsd")) \
+ rs6000_current_abi = ABI_V4; \
else if (!strcmp (rs6000_abi_name, "gnu")) \
rs6000_current_abi = ABI_V4; \
else if (!strcmp (rs6000_abi_name, "netbsd")) \
@@ -911,6 +913,7 @@ do { \
%{mcall-freebsd: -mbig} \
%{mcall-i960-old: -mlittle} \
%{mcall-linux: -mbig} \
+ %{mcall-openbsd: -mbig} \
%{mcall-gnu: -mbig} \
%{mcall-netbsd: -mbig} \
}}}}"
@@ -935,11 +938,13 @@ do { \
%{mcall-freebsd: -mbig %(cc1_endian_big) } \
%{mcall-i960-old: -mlittle %(cc1_endian_little) } \
%{mcall-linux: -mbig %(cc1_endian_big) } \
+ %{mcall-openbsd: -mbig %{cc1_endian_big} } \
%{mcall-gnu: -mbig %(cc1_endian_big) } \
%{mcall-netbsd: -mbig %(cc1_endian_big) } \
- %{!mcall-aixdesc: %{!mcall-freebsd: %{!mcall-i960-old: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: \
+ %{!mcall-aixdesc: %{!mcall-freebsd: %{!mcall-i960-old: %{!mcall-linux: \
+ %{!mcall-openbsd: %{!mcall-gnu: %{!mcall-netbsd: \
%(cc1_endian_default) \
- }}}}}} \
+ }}}}}}} \
}}}} \
%{mno-sdata: -msdata=none } \
%{meabi: %{!mcall-*: -mcall-sysv }} \
@@ -948,6 +953,7 @@ do { \
%{mcall-freebsd: -mno-eabi } \
%{mcall-i960-old: -meabi } \
%{mcall-linux: -mno-eabi } \
+ %{mcall-openbsd: -mno-eabi } \
%{mcall-gnu: -mno-eabi } \
%{mcall-netbsd: -mno-eabi }}} \
%{msdata: -msdata=default} \
@@ -979,10 +985,12 @@ do { \
%{msim: %(link_start_sim) } \
%{mcall-freebsd: %(link_start_freebsd) } \
%{mcall-linux: %(link_start_linux) } \
+%{mcall-openbsd: %(link_start_openbsd) } \
%{mcall-gnu: %(link_start_gnu) } \
%{mcall-netbsd: %(link_start_netbsd) } \
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-gnu: \
- %{!mcall-netbsd: %{!mcall-freebsd: %(link_start_default) }}}}}}}}"
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: \
+ %{!mcall-openbsd: %{!mcall-gnu: \
+ %{!mcall-netbsd: %{!mcall-freebsd: %(link_start_default) }}}}}}}}}"
#define LINK_START_DEFAULT_SPEC ""
@@ -1036,9 +1044,12 @@ do { \
%{msim: %(link_os_sim) } \
%{mcall-freebsd: %(link_os_freebsd) } \
%{mcall-linux: %(link_os_linux) } \
+%{mcall-openbsd: %(link_os_openbsd) } \
%{mcall-gnu: %(link_os_gnu) } \
%{mcall-netbsd: %(link_os_netbsd) } \
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(link_os_default) }}}}}}}}"
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: \
+ %{!mcall-openbsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: \
+ %(link_os_default) }}}}}}}}}"
#define LINK_OS_DEFAULT_SPEC ""
@@ -1083,11 +1094,12 @@ do { \
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
%{mcall-freebsd: %(cpp_endian_big) } \
%{mcall-linux: %(cpp_endian_big) } \
+ %{mcall-openbsd: %(cpp_endian_big) } \
%{mcall-gnu: %(cpp_endian_big) } \
%{mcall-netbsd: %(cpp_endian_big) } \
%{mcall-i960-old: %(cpp_endian_little) } \
%{mcall-aixdesc: %(cpp_endian_big) } \
- %{!mcall-linux: %{!mcall-gnu: %{!mcall-freebsd: %{!mcall-netbsd: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}}}"
+ %{!mcall-linux: %{!mcall-openbsd: %{!mcall-gnu: %{!mcall-freebsd: %{!mcall-netbsd: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}}}}"
#define CPP_ENDIAN_DEFAULT_SPEC "%(cpp_endian_big)"
@@ -1100,9 +1112,10 @@ do { \
%{msim: %(cpp_os_sim) } \
%{mcall-freebsd: %(cpp_os_freebsd) } \
%{mcall-linux: %(cpp_os_linux) } \
+%{mcall-openbsd: %(cpp_os_openbsd) } \
%{mcall-gnu: %(cpp_os_gnu) } \
%{mcall-netbsd: %(cpp_os_netbsd) } \
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(cpp_os_default) }}}}}}}}"
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-gnu: %{!mcall-netbsd: %(cpp_os_default) }}}}}}}}}"
#define CPP_OS_DEFAULT_SPEC ""
@@ -1115,9 +1128,10 @@ do { \
%{msim: %(startfile_sim) } \
%{mcall-freebsd: %(startfile_freebsd) } \
%{mcall-linux: %(startfile_linux) } \
+%{mcall-openbsd: %(startfile_openbsd) } \
%{mcall-gnu: %(startfile_gnu) } \
%{mcall-netbsd: %(startfile_netbsd) } \
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(startfile_default) }}}}}}}}"
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-gnu: %{!mcall-netbsd: %(startfile_default) }}}}}}}}}"
#define STARTFILE_DEFAULT_SPEC ""
@@ -1130,9 +1144,10 @@ do { \
%{msim: %(lib_sim) } \
%{mcall-freebsd: %(lib_freebsd) } \
%{mcall-linux: %(lib_linux) } \
+%{mcall-openbsd: %(lib_openbsd) } \
%{mcall-gnu: %(lib_gnu) } \
%{mcall-netbsd: %(lib_netbsd) } \
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(lib_default) }}}}}}}}"
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-gnu: %{!mcall-netbsd: %(lib_default) }}}}}}}}}"
#define LIB_DEFAULT_SPEC ""
@@ -1145,10 +1160,11 @@ do { \
%{msim: %(endfile_sim)} \
%{mcall-freebsd: %(endfile_freebsd) } \
%{mcall-linux: %(endfile_linux) } \
+%{mcall-openbsd: %(endfile_openbsd) } \
%{mcall-gnu: %(endfile_gnu) } \
%{mcall-netbsd: %(endfile_netbsd) } \
%{mvxworks: %(endfile_vxworks) } \
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %{!mvxworks: %(endfile_default) }}}}}}}}}"
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-gnu: %{!mcall-netbsd: %{!mvxworks: %(endfile_default) }}}}}}}}}}"
#define ENDFILE_DEFAULT_SPEC ""
@@ -1333,6 +1349,47 @@ ncrtn.o%s"
%{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }"
+/* OpenBSD support. */
+#ifndef LIB_OPENBSD_SPEC
+#define LIB_OPENBSD_SPEC "%{mnewlib: --start-group %(libc_openbsd) --end-group } %{!mnewlib: %(libc_openbsd) }"
+#endif
+
+#ifndef LIBC_OPENBSD_SPEC
+#define LIBC_OPENBSD_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
+#endif
+
+#ifndef STARTFILE_OPENBSD_SPEC
+#define STARTFILE_OPENBSD_SPEC "\
+%{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
+%{mnewlib: ecrti.o%s} \
+%{!mnewlib: %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
+#endif
+/*
+%{!mnewlib: crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
+*/
+
+#ifndef ENDFILE_OPENBSD_SPEC
+#define ENDFILE_OPENBSD_SPEC "\
+%{mnewlib: ecrtn.o%s} \
+%{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s}}"
+#endif
+/*
+%{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
+*/
+
+#ifndef LINK_START_OPENBSD_SPEC
+#define LINK_START_OPENBSD_SPEC "-Ttext 0x400074"
+#endif
+
+#ifndef LINK_OS_OPENBSD_SPEC
+#define LINK_OS_OPENBSD_SPEC ""
+#endif
+
+#ifndef CPP_OS_OPENBSD_SPEC
+#define CPP_OS_OPENBSD_SPEC "-D__unix__ -D__OpenBSD__ \
+-Asystem(unix) -Asystem(OpenBSD) " OBSD_CPP_SPEC
+#endif
+
/* VxWorks support. */
/* VxWorks does all the library stuff itself. */
#define LIB_VXWORKS_SPEC ""
@@ -1391,6 +1448,8 @@ ncrtn.o%s"
{ "lib_gnu", LIB_GNU_SPEC }, \
{ "lib_linux", LIB_LINUX_SPEC }, \
{ "lib_netbsd", LIB_NETBSD_SPEC }, \
+ { "lib_openbsd", LIB_OPENBSD_SPEC }, \
+ { "libc_openbsd", LIBC_OPENBSD_SPEC }, \
{ "lib_vxworks", LIB_VXWORKS_SPEC }, \
{ "lib_default", LIB_DEFAULT_SPEC }, \
{ "startfile_ads", STARTFILE_ADS_SPEC }, \
@@ -1401,6 +1460,7 @@ ncrtn.o%s"
{ "startfile_gnu", STARTFILE_GNU_SPEC }, \
{ "startfile_linux", STARTFILE_LINUX_SPEC }, \
{ "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
+ { "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
{ "startfile_vxworks", STARTFILE_VXWORKS_SPEC }, \
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \
{ "endfile_ads", ENDFILE_ADS_SPEC }, \
@@ -1411,6 +1471,7 @@ ncrtn.o%s"
{ "endfile_gnu", ENDFILE_GNU_SPEC }, \
{ "endfile_linux", ENDFILE_LINUX_SPEC }, \
{ "endfile_netbsd", ENDFILE_NETBSD_SPEC }, \
+ { "endfile_openbsd", ENDFILE_OPENBSD_SPEC }, \
{ "endfile_vxworks", ENDFILE_VXWORKS_SPEC }, \
{ "endfile_default", ENDFILE_DEFAULT_SPEC }, \
{ "link_path", LINK_PATH_SPEC }, \
@@ -1425,6 +1486,7 @@ ncrtn.o%s"
{ "link_start_gnu", LINK_START_GNU_SPEC }, \
{ "link_start_linux", LINK_START_LINUX_SPEC }, \
{ "link_start_netbsd", LINK_START_NETBSD_SPEC }, \
+ { "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
{ "link_start_vxworks", LINK_START_VXWORKS_SPEC }, \
{ "link_start_default", LINK_START_DEFAULT_SPEC }, \
{ "link_os", LINK_OS_SPEC }, \
@@ -1436,6 +1498,7 @@ ncrtn.o%s"
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
+ { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
{ "link_os_vxworks", LINK_OS_VXWORKS_SPEC }, \
{ "link_os_default", LINK_OS_DEFAULT_SPEC }, \
{ "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \
@@ -1453,6 +1516,7 @@ ncrtn.o%s"
{ "cpp_os_gnu", CPP_OS_GNU_SPEC }, \
{ "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
{ "cpp_os_netbsd", CPP_OS_NETBSD_SPEC }, \
+ { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \
{ "cpp_os_vxworks", CPP_OS_VXWORKS_SPEC }, \
{ "cpp_os_rtems", CPP_OS_RTEMS_SPEC }, \
{ "cpp_os_default", CPP_OS_DEFAULT_SPEC },

View File

@ -1,59 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_t-openbsd,v 1.2 2002/06/07 01:38:59 drahn Exp $
--- gcc/config/rs6000/t-openbsd.orig Thu May 30 22:09:28 2002
+++ gcc/config/rs6000/t-openbsd Thu May 30 22:18:47 2002
@@ -0,0 +1,55 @@
+# include t-rs6000 too
+# this is taken from t-ppccomm
+# but crt* removed.
+
+
+LIB2FUNCS_EXTRA = tramp.S
+
+# This one can't end up in shared libgcc
+LIB2FUNCS_STATIC_EXTRA = eabi.S
+
+# We want fine grained libraries, so use the new code to build the
+# floating point emulation libraries.
+FPBIT = fp-bit.c
+DPBIT = dp-bit.c
+
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+ cat $(srcdir)/config/fp-bit.c > dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#define FLOAT' > fp-bit.c
+ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+eabi.S: $(srcdir)/config/rs6000/eabi.asm
+ cat $(srcdir)/config/rs6000/eabi.asm > eabi.S
+
+tramp.S: $(srcdir)/config/rs6000/tramp.asm
+ cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
+
+# Switch synonyms
+MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \
+ msoft-float=mcpu?403 \
+ msoft-float=mcpu?ec603e \
+ msoft-float=mcpu?801 \
+ msoft-float=mcpu?821 \
+ msoft-float=mcpu?823 \
+ msoft-float=mcpu?860
+MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian
+MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+EXTRA_MULTILIB_PARTS = crtsavres$(objext)
+
+crtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm
+ cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S
+
+$(T)crtsavres$(objext): crtsavres.S
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavres.S -o $(T)crtsavres$(objext)
+
+# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
+CRTSTUFF_T_CFLAGS = -msdata=none
+# Make sure crt*.o are built with -fPIC even if configured with
+# --enable-shared --disable-multilib
+CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_tramp_asm,v 1.1 2002/06/07 01:38:59 drahn Exp $
--- gcc/config/rs6000/tramp.asm.orig Sat Dec 1 02:34:11 2001
+++ gcc/config/rs6000/tramp.asm Thu May 30 21:54:10 2002
@@ -37,7 +37,7 @@
.file "tramp.asm"
.section ".text"
- #include "ppc-asm.h"
+ #include "rs6000/ppc-asm.h"
.type trampoline_initial,@object
.align 2

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-gcc_config_sparc_openbsd1-64_h,v 1.3 2002/09/14 10:14:51 espie Exp $
--- gcc/config/sparc/openbsd1-64.h.orig Thu May 30 22:42:33 2002
+++ gcc/config/sparc/openbsd1-64.h Thu Sep 12 14:50:59 2002
@@ -22,3 +22,27 @@ Boston, MA 02111-1307, USA. */
#define OBSD_HAS_DECLARE_FUNCTION_SIZE
#define OBSD_HAS_DECLARE_OBJECT
+/* Configuration file for sparc64 OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define OBSD_HAS_DECLARE_FUNCTION_NAME
+#define OBSD_HAS_DECLARE_FUNCTION_SIZE
+#define OBSD_HAS_DECLARE_OBJECT
+

View File

@ -1,236 +0,0 @@
$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.9 2002/09/14 10:14:51 espie Exp $
--- gcc/config/sparc/openbsd64.h.orig Thu May 30 22:42:33 2002
+++ gcc/config/sparc/openbsd64.h Thu Sep 12 14:50:59 2002
@@ -57,6 +57,232 @@ Boston, MA 02111-1307, USA. */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 128
+#undef WINT_TYPE
+#define WINT_TYPE "long int"
+
+#undef WINT_TYPE_SIZE
+#define WINT_TYPE_SIZE 32
+
+#define HANDLE_PRAGMA_REDEFINE_EXTNAME 1
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+ %{shared:-shared} %{R*} \
+ %{static:-Bstatic} \
+ %{!static:-Bdynamic} \
+ %{assert*} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
+ crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
+#undef ASM_CPU_DEFAULT_SPEC
+#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusa"
+
+#undef ASM_CPU_SPEC
+#define ASM_CPU_SPEC "\
+%{mcpu=v8plus:-xarch=v8plus} \
+%{mcpu=ultrasparc:-xarch=v8plusa} \
+%{!mcpu*:%(asm_cpu_default)} \
+"
+
+/* Same as sparc.h */
+#undef DBX_REGISTER_NUMBER
+#define DBX_REGISTER_NUMBER(REGNO) \
+ (TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO)
+
+/* We use stabs-in-elf by default, because that is what the native
+ toolchain uses. */
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
+#undef ASM_OUTPUT_SKIP
+#define ASM_OUTPUT_SKIP(FILE,SIZE) \
+ fprintf (FILE, "\t.skip %u\n", (SIZE))
+
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX "."
+
+/* This is how to output a definition of an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class. */
+
+#undef ASM_OUTPUT_INTERNAL_LABEL
+#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
+ fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
+
+/* This is how to output a reference to an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class. */
+
+#undef ASM_OUTPUT_INTERNAL_LABELREF
+#define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM) \
+ fprintf (FILE, ".L%s%d", PREFIX, NUM)
+
+/* This is how to store into the string LABEL
+ the symbol_ref name of an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class.
+ This is suitable for output with `assemble_name'. */
+
+#undef ASM_GENERATE_INTERNAL_LABEL
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
+ sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
+
+/* Select a format to encode pointers in exception handling data. CODE
+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
+ true if the symbol may be affected by dynamic relocations.
+
+ Some Solaris dynamic linkers don't handle unaligned section relative
+ relocs properly, so force them to be aligned. */
+#ifndef HAVE_AS_SPARC_UA_PCREL
+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
+#endif
+
+/* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
+ Instead, it is enabled here, because it does work under Solaris. */
+/* Define for support of TFmode long double and REAL_ARITHMETIC.
+ Sparc ABI says that long double is 4 words. */
+#define LONG_DOUBLE_TYPE_SIZE 128
+
+/* But indicate that it isn't supported by the hardware. */
+#define WIDEST_HARDWARE_FP_SIZE 64
+
+#define STDC_0_IN_SYSTEM_HEADERS 1
+
+#define MULDI3_LIBCALL "__mul64"
+#define DIVDI3_LIBCALL "__div64"
+#define UDIVDI3_LIBCALL "__udiv64"
+#define MODDI3_LIBCALL "__rem64"
+#define UMODDI3_LIBCALL "__urem64"
+
+#undef INIT_SUBTARGET_OPTABS
+#define INIT_SUBTARGET_OPTABS \
+ fixsfdi_libfunc \
+ = init_one_libfunc (TARGET_ARCH64 ? "__ftol" : "__ftoll"); \
+ fixunssfdi_libfunc \
+ = init_one_libfunc (TARGET_ARCH64 ? "__ftoul" : "__ftoull"); \
+ fixdfdi_libfunc \
+ = init_one_libfunc (TARGET_ARCH64 ? "__dtol" : "__dtoll"); \
+ fixunsdfdi_libfunc \
+ = init_one_libfunc (TARGET_ARCH64 ? "__dtoul" : "__dtoull")
+
+
+/*
+ * Attempt to turn on access permissions for the stack.
+ *
+ * This code must be defined when compiling gcc but not when compiling
+ * libgcc2.a, unless we're generating code for 64 bits SPARC
+ *
+ * _SC_STACK_PROT is only defined for post 2.6, but we want this code
+ * to run always. 2.6 can change the stack protection but has no way to
+ * query it.
+ *
+ */
+
+/* This declares mprotect (used in TRANSFER_FROM_TRAMPOLINE) for
+ libgcc2.c. */
+/* We don't want to include this because sys/mman.h is not present on
+ some non-Solaris configurations that use sol2.h. */
+#if 0 /* def L_trampoline */
+#include <sys/mman.h>
+#endif
+
+#define TRANSFER_FROM_TRAMPOLINE \
+static int need_enable_exec_stack; \
+ \
+static void check_enabling(void) __attribute__ ((constructor)); \
+static void check_enabling(void) \
+{ \
+ extern long sysconf(int); \
+ \
+ int prot = (int) sysconf(515 /*_SC_STACK_PROT */); \
+ if (prot != 7) \
+ need_enable_exec_stack = 1; \
+} \
+ \
+extern void __enable_execute_stack (void *); \
+void \
+__enable_execute_stack (addr) \
+ void *addr; \
+{ \
+ if (!need_enable_exec_stack) \
+ return; \
+ else { \
+ long size = getpagesize (); \
+ long mask = ~(size-1); \
+ char *page = (char *) (((long) addr) & mask); \
+ char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \
+ \
+ /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \
+ if (mprotect (page, end - page, 7) < 0) \
+ perror ("mprotect of trampoline code"); \
+ } \
+}
+/* Configuration file for sparc64 OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparc64 OpenBSD ELF)")
+
+/* XXX - do we really want HARD_QUAD? */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+(MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
+ + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
+
+#undef SPARC_DEFAULT_CMODEL
+#define SPARC_DEFAULT_CMODEL CM_MEDMID
+
+/* Run-time target specifications. */
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__sparc64__ -D__sparcv9__ -D__sparc_v9__ -D__arch64__ -D__ELF__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)"
+
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC ""
+
+#undef MD_EXEC_PREFIX
+#undef MD_STARTFILE_PREFIX
+
+#undef ASM_SPEC
+#define ASM_SPEC "\
+%{v:-V} -s %{fpic:-K PIC} %{fPIC:-K PIC} \
+%{mlittle-endian:-EL} \
+%(asm_cpu) %(asm_arch) \
+"
+
+/* Layout of source language data types. */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 128
+
#undef LINK_SPEC
#define LINK_SPEC \
"%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-gcc_config_sparc_openbsd_h,v 1.3 2004/01/31 14:58:03 espie Exp $
--- gcc/config/sparc/openbsd.h.orig 2003-11-11 15:37:54.000000000 +0100
+++ gcc/config/sparc/openbsd.h 2003-11-11 15:39:02.000000000 +0100
@@ -23,7 +23,14 @@ Boston, MA 02111-1307, USA. */
#include <openbsd.h>
/* Run-time target specifications. */
-#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__OpenBSD__ -Asystem=unix -Asystem=OpenBSD -Acpu=sparc -Amachine=sparc"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ OPENBSD_OS_CPP_BUILTINS_ELF(); \
+ builtin_define ("__sparc"); \
+ builtin_define ("__sparc__"); \
+ } \
+ while (0)
/* Layout of source language data types */

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_java_jcf-parse_c,v 1.2 2002/06/03 18:32:30 espie Exp $
--- gcc/java/jcf-parse.c.orig Mon Apr 22 22:36:47 2002
+++ gcc/java/jcf-parse.c Mon Jun 3 16:41:58 2002
@@ -876,7 +876,7 @@ parse_source_file_1 (file, finput)
/* There's no point in trying to find the current encoding unless we
are going to do something intelligent with it -- hence the test
for iconv. */
-#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO)
+#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_LANGINFO_CODESET)
setlocale (LC_CTYPE, "");
if (current_encoding == NULL)
current_encoding = nl_langinfo (CODESET);

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_java_jv-scan_c,v 1.2 2002/06/03 18:32:30 espie Exp $
--- gcc/java/jv-scan.c.orig Fri Feb 1 22:07:31 2002
+++ gcc/java/jv-scan.c Mon Jun 3 16:42:13 2002
@@ -199,7 +199,7 @@ DEFUN (main, (argc, argv),
/* There's no point in trying to find the current encoding
unless we are going to do something intelligent with it
-- hence the test for iconv. */
-#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO)
+#if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_LANGINFO_CODESET)
setlocale (LC_CTYPE, "");
if (encoding == NULL)
encoding = nl_langinfo (CODESET);

View File

@ -1,57 +0,0 @@
$OpenBSD: patch-gcc_lists_c,v 1.1 2002/06/09 00:31:52 espie Exp $
--- gcc/lists.c.orig Sat Jun 8 14:47:57 2002
+++ gcc/lists.c Sat Jun 8 16:08:39 2002
@@ -25,23 +25,22 @@ Software Foundation, 59 Temple Place - S
#include "rtl.h"
#include "ggc.h"
-static void free_list PARAMS ((rtx *, rtx *));
static void zap_lists PARAMS ((void *));
/* Functions for maintaining cache-able lists of EXPR_LIST and INSN_LISTs. */
/* An INSN_LIST containing all INSN_LISTs allocated but currently unused. */
-static rtx unused_insn_list;
+rtx unused_insn_list;
/* An EXPR_LIST containing all EXPR_LISTs allocated but currently unused. */
-static rtx unused_expr_list;
+rtx unused_expr_list;
/* This function will free an entire list of either EXPR_LIST or INSN_LIST
nodes. This is to be used only only lists that consist exclusively of
nodes of one type only. This is only called by free_EXPR_LIST_list
and free_INSN_LIST_list. */
-static void
+void
free_list (listp, unused_listp)
rtx *listp, *unused_listp;
{
@@ -122,26 +121,6 @@ void
init_EXPR_INSN_LIST_cache ()
{
ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
-}
-
-/* This function will free up an entire list of EXPR_LIST nodes. */
-void
-free_EXPR_LIST_list (listp)
- rtx *listp;
-{
- if (*listp == 0)
- return;
- free_list (listp, &unused_expr_list);
-}
-
-/* This function will free up an entire list of INSN_LIST nodes. */
-void
-free_INSN_LIST_list (listp)
- rtx *listp;
-{
- if (*listp == 0)
- return;
- free_list (listp, &unused_insn_list);
}
/* This function will free up an individual EXPR_LIST node. */

View File

@ -1,36 +0,0 @@
$OpenBSD: patch-gcc_rtl_h,v 1.2 2002/09/14 10:14:51 espie Exp $
--- gcc/rtl.h.orig Sun May 19 11:05:27 2002
+++ gcc/rtl.h Thu Sep 12 14:51:00 2002
@@ -1517,12 +1517,30 @@ extern rtx find_first_parameter_load PAR
extern rtx find_use_as_address PARAMS ((rtx, rtx, HOST_WIDE_INT));
void init_EXPR_INSN_LIST_cache PARAMS ((void));
-void free_EXPR_LIST_list PARAMS ((rtx *));
-void free_INSN_LIST_list PARAMS ((rtx *));
void free_EXPR_LIST_node PARAMS ((rtx));
void free_INSN_LIST_node PARAMS ((rtx));
rtx alloc_INSN_LIST PARAMS ((rtx, rtx));
rtx alloc_EXPR_LIST PARAMS ((int, rtx, rtx));
+
+/* An INSN_LIST containing all INSN_LISTs allocated but currently unused. */
+extern rtx unused_insn_list;
+
+/* An EXPR_LIST containing all EXPR_LISTs allocated but currently unused. */
+extern rtx unused_expr_list;
+
+void free_list PARAMS ((rtx *, rtx *));
+
+#define free_EXPR_LIST_list(p) do { \
+ rtx *myp = (p); \
+ if (*myp) \
+ free_list(myp, &unused_expr_list); \
+ } while(0)
+
+#define free_INSN_LIST_list(p) do { \
+ rtx *myp = (p); \
+ if (*myp) \
+ free_list(myp, &unused_insn_list); \
+ } while(0)
/* regclass.c */

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_testsuite_g++_old-deja_old-deja_exp,v 1.1 2003/06/28 09:57:05 espie Exp $
--- gcc/testsuite/g++.old-deja/old-deja.exp.orig Sat Jun 28 11:44:23 2003
+++ gcc/testsuite/g++.old-deja/old-deja.exp Sat Jun 28 11:44:31 2003
@@ -52,7 +52,7 @@ foreach file [lsort [find $srcdir/$subdi
# We don't want old-dejagnu.exp to have to know about all the global
# variables we use. For now we tell it about CXXFLAGS and LIBS and
# leave LDFLAGS alone.
- old-dejagnu $GXX_UNDER_TEST "$file" "$tfile" "" "$DEFAULT_CXXFLAGS" "-lstdc++"
+ old-dejagnu $GXX_UNDER_TEST "$file" "$tfile" "" "$DEFAULT_CXXFLAGS" "-lestdc++"
}
# The framework doesn't like to see any error remnants,

View File

@ -1,35 +0,0 @@
$OpenBSD: patch-gcc_testsuite_gcc_dg_weak-9_c,v 1.2 2002/09/14 10:14:51 espie Exp $
--- gcc/testsuite/gcc.dg/weak-9.c.orig Mon May 27 07:48:20 2002
+++ gcc/testsuite/gcc.dg/weak-9.c Thu Sep 12 14:51:00 2002
@@ -26,3 +26,31 @@ void f3();
void f4();
#pragma weak f4=notf4
+/* { dg-do compile } */
+/* { dg-options "-fno-common" } */
+
+/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
+/* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */
+
+/* { dg-final { global target_triplet } } */
+/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
+/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } *
+/
+/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
+/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f1" } } */
+/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f2" } } */
+/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f3" } } */
+/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f4" } } */
+/* { dg-final { scan-assembler "notf1" } } */
+/* { dg-final { scan-assembler "notf2" } } */
+/* { dg-final { scan-assembler "notf3" } } */
+/* { dg-final { scan-assembler "notf4" } } */
+
+void f1() __attribute__((weak, alias("notf1")));
+void f2() __attribute__((alias("notf2"), weak));
+
+#pragma weak f3=notf3
+void f3();
+
+void f4();
+#pragma weak f4=notf4

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-gcc_testsuite_lib_mike-g++_exp,v 1.1 2003/06/28 09:57:05 espie Exp $
--- gcc/testsuite/lib/mike-g++.exp.orig Sat Jun 28 11:45:09 2003
+++ gcc/testsuite/lib/mike-g++.exp Sat Jun 28 11:45:22 2003
@@ -136,9 +136,9 @@ proc postbase { src_code run groups arg
}
if ![ishost "*-dos-*"] {
- lappend options "libs=-lstdc++ -lg++"
+ lappend options "libs=-lestdc++ -lg++"
} else {
- lappend options "libs=-lstdcxx -lgxx"
+ lappend options "libs=-lestdcxx -lgxx"
}
set comp_output [g++_target_compile $src_file $output_file $compile_type $options]

View File

@ -1,32 +0,0 @@
$OpenBSD: patch-gcc_toplev_c,v 1.4 2003/06/26 18:39:52 avsm Exp $
--- gcc/toplev.c.orig Sat Nov 2 00:57:23 2002
+++ gcc/toplev.c Thu Jun 26 18:51:53 2003
@@ -883,6 +883,9 @@ int align_functions_log;
minimum function alignment. Zero means no alignment is forced. */
int force_align_functions_log;
+/* Fake StackProtector option, does nothing. */
+int flag_propolice_protection = 0;
+
/* Table of supported debugging formats. */
static const struct
{
@@ -1154,6 +1157,8 @@ static const lang_independent_options f_
N_("Report on permanent memory allocation at end of run") },
{ "trapv", &flag_trapv, 1,
N_("Trap for signed overflow in addition / subtraction / multiplication") },
+ { "no-stack-protector", &flag_propolice_protection, 0,
+ N_("Fake disable stack protection") },
};
/* Table of language-specific options. */
@@ -1331,6 +1336,9 @@ documented_lang_options[] =
{ "-Wwrite-strings",
N_("Mark strings as 'const char *'") },
{ "-Wno-write-strings", "" },
+ { "-Wbounded",
+ N_("Fake bounds checking option") },
+ { "-Wno-bounded", "" },
#define DEFINE_LANG_NAME(NAME) { NULL, NAME },

View File

@ -1,34 +0,0 @@
--- libffi/configure.in.orig Wed May 8 06:25:49 2002
+++ libffi/configure.in Thu May 30 14:25:05 2002
@@ -46,10 +46,12 @@ AC_PROG_LIBTOOL
TARGETDIR="unknown"
case "$host" in
mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
+mips*-*-openbsd*) TARGET=MIPS; TARGETDIR=mips;;
i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
+ i*86-*-openbsd*) TARGET=X86; TARGETDIR=x86;;
i*86-*-netbsdelf*) TARGET=X86; TARGETDIR=x86;;
i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
@@ -58,13 +60,18 @@ sparc-sun-4*) TARGET=SPARC; TARGETDIR=sp
sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
+sparc-*-openbsd*) TARGET=SPARC; TARGETDIR=sparc;;
+sparc64-*-openbsd*) TARGET=SPARC; TARGETDIR=sparc;;
alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
+alpha*-*-openbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
+m68k-*-openbsd*) TARGET=M68K; TARGETDIR=m68k;;
powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
+powerpc-*-openbsd*) TARGET=POWERPC; TARGETDIR=powerpc;;
rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
esac

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-libffi_src_x86_sysv_S,v 1.5 2002/05/30 00:32:03 espie Exp $
--- libffi/src/x86/sysv.S.orig Mon Jul 16 19:10:53 2001
+++ libffi/src/x86/sysv.S Thu May 30 01:26:02 2002
@@ -31,10 +31,10 @@
.globl ffi_prep_args
.align 4
-.globl ffi_call_SYSV
- .type ffi_call_SYSV,@function
+.globl _ffi_call_SYSV
+ .type _ffi_call_SYSV,@function
-ffi_call_SYSV:
+_ffi_call_SYSV:
.LFB1:
pushl %ebp
.LCFI0:
@@ -125,9 +125,10 @@ epilogue:
ret
.LFE1:
.ffi_call_SYSV_end:
- .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
+ .size _ffi_call_SYSV,.ffi_call_SYSV_end-_ffi_call_SYSV
-.section .eh_frame,"aw",@progbits
+/* .section .eh_frame,"aw",@progbits */
+.data
__FRAME_BEGIN__:
.4byte .LLCIE1
.LSCIE1:

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-libjava_aclocal_m4,v 1.1 2002/06/03 18:32:30 espie Exp $
--- libjava/aclocal.m4.orig Mon Jun 3 16:36:32 2002
+++ libjava/aclocal.m4 Mon Jun 3 16:37:31 2002
@@ -447,3 +447,19 @@ for am_file in <<$1>>; do
done<<>>dnl>>)
changequote([,]))])
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
+

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-libjava_configure_in,v 1.2 2003/02/15 14:38:27 espie Exp $
--- libjava/configure.in.orig Wed May 8 06:26:24 2002
+++ libjava/configure.in Sun Nov 24 22:14:45 2002
@@ -294,6 +294,7 @@ changequote(<<,>>)dnl
changequote([,])
GC=$enableval,
GC=boehm)
+GC=system-boehm
GCLIBS=
GCINCS=
GCDEPS=
@@ -317,6 +318,21 @@ case "$GC" in
dnl The POSIX thread support needs to know this.
AC_DEFINE(HAVE_BOEHM_GC)
;;
+ system-boehm)
+ AC_MSG_RESULT(system-boehm)
+ GCLIBS=/usr/local/lib/libgc.la
+ GCINCS='-I/usr/local/include'
+ JC1GCSPEC='-fuse-boehm-gc'
+ GCTESTSPEC="-L/usr/local/lib"
+
+ dnl We also want to pick up some cpp flags required when including
+ dnl boehm-config.h. Yuck.
+ GCINCS="$GCINCS -DSILENT=1 -DNO_SIGNALS=1 -DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1 "
+ GCOBJS=boehm.lo
+ GCHDR=boehm-gc.h
+ dnl The POSIX thread support needs to know this.
+ AC_DEFINE(HAVE_BOEHM_GC)
+ ;;
no)
AC_MSG_RESULT(none)
GCOBJS=nogc.lo
@@ -520,6 +536,7 @@ else
AC_DEFINE(HAVE_PROC_SELF_EXE)])
AM_ICONV
+ AM_LANGINFO_CODESET
AM_LC_MESSAGES
AC_STRUCT_TIMEZONE

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-libjava_include_config_h_in,v 1.1 2002/06/03 18:32:30 espie Exp $
--- libjava/include/config.h.in.orig Mon Jun 3 16:40:12 2002
+++ libjava/include/config.h.in Mon Jun 3 16:40:42 2002
@@ -77,6 +77,9 @@
/* Define if you have the `gmtime_r' function. */
#undef HAVE_GMTIME_R
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
/* Define if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libjava_java_lang_natRuntime_cc,v 1.1 2004/01/31 14:58:03 espie Exp $
--- libjava/java/lang/natRuntime.cc.orig 2003-11-11 18:17:19.000000000 +0100
+++ libjava/java/lang/natRuntime.cc 2003-11-11 18:17:42.000000000 +0100
@@ -341,7 +341,7 @@ java::lang::Runtime::traceMethodCalls (j
}
#if ! defined (DEFAULT_FILE_ENCODING) && defined (HAVE_ICONV) \
- && defined (HAVE_NL_LANGINFO)
+ && defined (HAVE_LANGINFO_CODESET)
static char *
file_encoding ()

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libjava_java_lang_natSystem_cc,v 1.2 2002/06/03 18:32:30 espie Exp $
--- libjava/java/lang/natSystem.cc.orig Sun Apr 7 13:30:08 2002
+++ libjava/java/lang/natSystem.cc Mon Jun 3 16:43:16 2002
@@ -168,7 +168,7 @@ java::lang::System::identityHashCode (jo
}
#if ! defined (DEFAULT_FILE_ENCODING) && defined (HAVE_ICONV) \
- && defined (HAVE_NL_LANGINFO)
+ && defined (HAVE_LANGINFO_CODESET)
static char *
file_encoding ()

View File

@ -1,20 +0,0 @@
--- libstdc++-v3/src/Makefile.in.orig Tue Jan 7 04:44:01 2003
+++ libstdc++-v3/src/Makefile.in Fri Jun 27 19:50:09 2003
@@ -135,7 +135,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd
CXX = @glibcpp_CXX@
toolexecdir = @glibcpp_toolexecdir@
toolexeclibdir = @glibcpp_toolexeclibdir@
-toolexeclib_LTLIBRARIES = libstdc++.la
+toolexeclib_LTLIBRARIES = libestdc++.la
# Compile flags that should be constant throughout the build, both for
# SUBDIRS and for libstdc++-v3 in general.
@@ -396,7 +396,7 @@ distclean-libtool:
maintainer-clean-libtool:
-libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
+libestdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
$(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
.cc.o:
$(CXXCOMPILE) -c $<

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-libtool_m4,v 1.1 2001/09/15 11:51:35 espie Exp $
--- libtool.m4.orig Wed Aug 22 11:19:01 2001
+++ libtool.m4 Wed Aug 22 11:19:46 2001
@@ -620,6 +620,10 @@ newsos6)
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
+openbsd*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-ltcf-c_sh,v 1.1 2001/09/15 11:51:35 espie Exp $
--- ltcf-c.sh.orig Wed Aug 22 11:20:15 2001
+++ ltcf-c.sh Wed Aug 22 11:21:49 2001
@@ -467,10 +467,13 @@ else
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
+ archive_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ archive_expsym_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
+ remove_lgcc=yes
+ output_verbose_link_cmds='$CC $ac_cv_prog_cc_pic -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
;;
os2*)

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-ltcf-cxx_sh,v 1.1 2001/09/15 11:51:35 espie Exp $
--- ltcf-cxx.sh.orig Wed Aug 22 11:21:59 2001
+++ ltcf-cxx.sh Wed Aug 22 11:22:55 2001
@@ -391,6 +391,19 @@ case $host_os in
netbsd*)
# NetBSD uses g++ - do we need to do anything?
;;
+ openbsd*)
+ if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
+ # MM: OpenBSD 2.7 uses G++, but not GNU ld
+ archive_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ archive_expsym_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ old_archive_cmds="$old_archive_cmds~"'$RANLIB $oldlib'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ remove_lgcc=yes
+ output_verbose_link_cmds='$CC $ac_cv_prog_cc_pic -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ fi
+ ;;
osf3*)
case $cc_basename in
KCC)

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-ltcf-gcj_sh,v 1.1 2002/01/01 01:21:18 espie Exp $
--- ltcf-gcj.sh.orig Sun Sep 16 15:52:22 2001
+++ ltcf-gcj.sh Sun Sep 16 15:55:09 2001
@@ -445,10 +445,13 @@ else
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
+ archive_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ archive_expsym_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
+ remove_lgcc=yes
+ output_verbose_link_cmds='$CC $ac_cv_prog_cc_pic -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
;;
os2*)

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-ltconfig,v 1.1 2001/09/15 11:51:35 espie Exp $
--- ltconfig.orig Wed Aug 22 11:13:16 2001
+++ ltconfig Wed Aug 22 11:18:30 2001
@@ -625,7 +625,12 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds";;
+ *)
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds";;
+ esac
fi
# Source the script associated with the $tagname tag configuration.
@@ -1255,6 +1260,9 @@ openbsd*)
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ deplib_check_method=pass_all
+ sys_lib_dlsearch_path_spec='/usr/lib /usr/local/lib /usr/X11R6/lib'
;;
os2*)

View File

@ -1,3 +1,3 @@
@comment $OpenBSD: PFRAG.shared-estdc,v 1.4 2003/06/30 12:19:23 espie Exp $
lib/libestdc++.so.5.3
@comment $OpenBSD: PFRAG.shared-estdc,v 1.5 2004/01/31 14:58:04 espie Exp $
lib/libestdc++.so.5.5
DYNLIBDIR(%D/lib)

View File

@ -1,3 +1,3 @@
@comment $OpenBSD: PFRAG.shared-g77,v 1.2 2003/02/15 14:38:27 espie Exp $
@comment $OpenBSD: PFRAG.shared-g77,v 1.3 2004/01/31 14:58:04 espie Exp $
lib/libg2c.so.0.0
DYNLIBDIR(%D/lib)

View File

@ -1,3 +1,8 @@
@comment $OpenBSD: PFRAG.shared-java,v 1.2 2003/02/15 14:38:27 espie Exp $
lib/libgcj.so.3.0
@comment $OpenBSD: PFRAG.shared-java,v 1.3 2004/01/31 14:58:04 espie Exp $
lib/lib-org-w3c-dom.so.0.0
lib/lib-org-xml-sax.so.0.0
lib/libffi-2.00-beta.so
lib/libffi.so
@comment lib/libgc.so.1.2
lib/libgcj.so.4.0
DYNLIBDIR(%D/lib)

View File

@ -1,3 +1,3 @@
@comment $OpenBSD: PFRAG.shared-objc,v 1.6 2003/02/15 14:38:27 espie Exp $
@comment $OpenBSD: PFRAG.shared-objc,v 1.7 2004/01/31 14:58:04 espie Exp $
lib/libobjc.so.1.0
DYNLIBDIR(%D/lib)

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.18 2003/02/15 14:38:27 espie Exp $
@comment $OpenBSD: PLIST,v 1.19 2004/01/31 14:58:04 espie Exp $
@pkgcfl egcs-*-core
@unexec install-info --delete --info-dir=%D/info %D/info/cpp.info
@unexec install-info --delete --info-dir=%D/info %D/info/cppinternals.info
@ -9,78 +9,30 @@ bin/egcc
bin/egccbug
bin/egcov
bin/${CONFIG}-egcc
bin/${CONFIG}-gcc-${V}
info/cpp.info
info/cpp.info-1
info/cpp.info-2
info/cpp.info-3
info/cpp.info-4
info/cpp.info-5
info/cppinternals.info
info/gcc.info
info/gcc.info-1
info/gcc.info-10
info/gcc.info-11
info/gcc.info-12
info/gcc.info-13
info/gcc.info-14
info/gcc.info-15
info/gcc.info-16
info/gcc.info-17
info/gcc.info-18
info/gcc.info-19
info/gcc.info-2
info/gcc.info-20
info/gcc.info-21
info/gcc.info-22
info/gcc.info-23
info/gcc.info-3
info/gcc.info-4
info/gcc.info-5
info/gcc.info-6
info/gcc.info-7
info/gcc.info-8
info/gcc.info-9
info/gccint.info
info/gccint.info-1
info/gccint.info-10
info/gccint.info-11
info/gccint.info-12
info/gccint.info-13
info/gccint.info-14
info/gccint.info-15
info/gccint.info-16
info/gccint.info-17
info/gccint.info-18
info/gccint.info-19
info/gccint.info-2
info/gccint.info-20
info/gccint.info-21
info/gccint.info-22
info/gccint.info-23
info/gccint.info-3
info/gccint.info-4
info/gccint.info-5
info/gccint.info-6
info/gccint.info-7
info/gccint.info-8
info/gccint.info-9
IFPIC:lib/fpic/libiberty.a
lib/gcc-lib/${CONFIG}/${V}/cc1
lib/gcc-lib/${CONFIG}/${V}/collect2
lib/gcc-lib/${CONFIG}/${V}/cpp0
IFPIC:lib/gcc-lib/${CONFIG}/${V}/fpic/libgcc.a
lib/gcc-lib/${CONFIG}/${V}/include/README
lib/gcc-lib/${CONFIG}/${V}/include/float.h
lib/gcc-lib/${CONFIG}/${V}/include/limits.h
lib/gcc-lib/${CONFIG}/${V}/include/machine/ansi.h
lib/gcc-lib/${CONFIG}/${V}/include/stdarg.h
lib/gcc-lib/${CONFIG}/${V}/include/stdbool.h
lib/gcc-lib/${CONFIG}/${V}/include/syslimits.h
lib/gcc-lib/${CONFIG}/${V}/include/varargs.h
lib/gcc-lib/${CONFIG}/${V}/install-tools/fixinc.sh
lib/gcc-lib/${CONFIG}/${V}/install-tools/gsyslimits.h
lib/gcc-lib/${CONFIG}/${V}/install-tools/include/README
lib/gcc-lib/${CONFIG}/${V}/install-tools/include/limits.h
lib/gcc-lib/${CONFIG}/${V}/install-tools/mkheaders
lib/gcc-lib/${CONFIG}/${V}/install-tools/mkheaders.conf
lib/gcc-lib/${CONFIG}/${V}/libgcc.a
IFPPC:lib/gcc-lib/${CONFIG}/${V}/crtsavres.o
lib/gcc-lib/${CONFIG}/${V}/specs
lib/gcc-lib/${CONFIG}/${V}/tradcpp0
lib/libiberty.a
man/man1/cpp.1
man/man1/egcc.1
@ -88,6 +40,8 @@ man/man1/gcov.1
@comment man/man7/fsf-funding.7
@comment man/man7/gfdl.7
@comment man/man7/gpl.7
@dirrm lib/gcc-lib/${CONFIG}/${V}/install-tools/include
@dirrm lib/gcc-lib/${CONFIG}/${V}/install-tools
@dirrm lib/gcc-lib/${CONFIG}/${V}/include/machine
@dirrm lib/gcc-lib/${CONFIG}/${V}/include
IFPIC:@dirrm lib/gcc-lib/${CONFIG}/${V}/fpic

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-ada,v 1.3 2002/11/24 11:52:32 espie Exp $
@comment $OpenBSD: PLIST-ada,v 1.4 2004/01/31 14:58:04 espie Exp $
bin/gnat
bin/gnatbind
bin/gnatbl

View File

@ -1,7 +1,6 @@
@comment $OpenBSD: PLIST-c++,v 1.12 2003/02/15 14:38:27 espie Exp $
@comment $OpenBSD: PLIST-c++,v 1.13 2004/01/31 14:58:04 espie Exp $
@pkgcfl egcs-*-core
bin/ec++
bin/ec++filt
bin/eg++
bin/${CONFIG}-ec++
bin/${CONFIG}-eg++
@ -39,7 +38,6 @@ include/c++/${V}/backward/stack.h
include/c++/${V}/backward/stream.h
include/c++/${V}/backward/streambuf.h
include/c++/${V}/backward/strstream
include/c++/${V}/backward/strstream.h
include/c++/${V}/backward/tempbuf.h
include/c++/${V}/backward/tree.h
include/c++/${V}/backward/vector.h
@ -53,22 +51,23 @@ include/c++/${V}/bits/cmath.tcc
include/c++/${V}/bits/codecvt.h
include/c++/${V}/bits/concept_check.h
include/c++/${V}/bits/cpp_type_traits.h
include/c++/${V}/bits/deque.tcc
include/c++/${V}/bits/fpos.h
include/c++/${V}/bits/fstream.tcc
include/c++/${V}/bits/functexcept.h
include/c++/${V}/bits/generic_shadow.h
include/c++/${V}/bits/gslice.h
include/c++/${V}/bits/gslice_array.h
include/c++/${V}/bits/indirect_array.h
include/c++/${V}/bits/ios_base.h
include/c++/${V}/bits/istream.tcc
include/c++/${V}/bits/list.tcc
include/c++/${V}/bits/locale_classes.h
include/c++/${V}/bits/locale_facets.h
include/c++/${V}/bits/locale_facets.tcc
include/c++/${V}/bits/localefwd.h
include/c++/${V}/bits/mask_array.h
include/c++/${V}/bits/ostream.tcc
include/c++/${V}/bits/pthread_allocimpl.h
include/c++/${V}/bits/slice.h
include/c++/${V}/bits/slice_array.h
include/c++/${V}/bits/sstream.tcc
include/c++/${V}/bits/stl_algo.h
@ -107,6 +106,7 @@ include/c++/${V}/bits/type_traits.h
include/c++/${V}/bits/valarray_array.h
include/c++/${V}/bits/valarray_array.tcc
include/c++/${V}/bits/valarray_meta.h
include/c++/${V}/bits/vector.tcc
include/c++/${V}/bitset
include/c++/${V}/cassert
include/c++/${V}/cctype
@ -155,7 +155,6 @@ include/c++/${V}/${CONFIG}/bits/c++config.h
include/c++/${V}/${CONFIG}/bits/c++io.h
include/c++/${V}/${CONFIG}/bits/c++locale.h
include/c++/${V}/${CONFIG}/bits/codecvt_specializations.h
include/c++/${V}/${CONFIG}/bits/cpu_limits.h
include/c++/${V}/${CONFIG}/bits/ctype_base.h
include/c++/${V}/${CONFIG}/bits/ctype_inline.h
include/c++/${V}/${CONFIG}/bits/ctype_noninline.h
@ -193,6 +192,7 @@ include/c++/${V}/valarray
include/c++/${V}/vector
IFPIC:lib/fpic/libestdc++.a
IFPIC:lib/fpic/libestdc++.la
IFPIC:lib/fpic/libiberty.a
IFPIC:lib/fpic/libsupc++.a
IFPIC:lib/fpic/libsupc++.la
lib/gcc-lib/${CONFIG}/${V}/cc1plus

View File

@ -1,2 +1,2 @@
@comment $OpenBSD: PLIST-estdc,v 1.1 2002/09/30 20:52:45 naddy Exp $
@comment $OpenBSD: PLIST-estdc,v 1.2 2004/01/31 14:58:04 espie Exp $
%%SHARED%%

View File

@ -1,37 +1,16 @@
@comment $OpenBSD: PLIST-g77,v 1.10 2002/11/24 11:52:32 espie Exp $
@comment $OpenBSD: PLIST-g77,v 1.11 2004/01/31 14:58:04 espie Exp $
@pkgcfl egcs-*-core
@unexec install-info --delete --info-dir=%D/info %D/info/g77.info
bin/eg77
info/g77.info
info/g77.info-1
info/g77.info-10
info/g77.info-11
info/g77.info-12
info/g77.info-13
info/g77.info-14
info/g77.info-15
info/g77.info-16
info/g77.info-17
info/g77.info-18
info/g77.info-19
info/g77.info-2
info/g77.info-20
info/g77.info-21
info/g77.info-3
info/g77.info-4
info/g77.info-5
info/g77.info-6
info/g77.info-7
info/g77.info-8
info/g77.info-9
IFPIC:lib/fpic/libfrtbegin.a
IFPIC:lib/fpic/libg2c.a
IFPIC:lib/fpic/libg2c.la
lib/gcc-lib/${CONFIG}/${V}/f771
lib/gcc-lib/${CONFIG}/${V}/include/g2c.h
lib/libfrtbegin.a
lib/libg2c.a
lib/libg2c.la
man/man1/eg77.1
IFPIC:lib/fpic/libfrtbegin.a
IFPIC:lib/fpic/libg2c.a
IFPIC:lib/fpic/libg2c.la
%%SHARED%%
@exec install-info --info-dir=%D/info %D/info/g77.info

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-objc,v 1.10 2002/11/24 11:52:32 espie Exp $
@comment $OpenBSD: PLIST-objc,v 1.11 2004/01/31 14:58:04 espie Exp $
@pkgcfl egcs-*-core
IFPIC:lib/fpic/libobjc.a
IFPIC:lib/fpic/libobjc.la