This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Fwd: Commit approval pls: PR 9877, 8336, plus other stuff]
- From: Kean Johnston <jkj at sco dot com>
- To: gcc-patches at gnu dot org
- Date: Tue, 05 Aug 2003 13:14:44 -0700
- Subject: [Fwd: Commit approval pls: PR 9877, 8336, plus other stuff]
- Organization: The SCO Group
Resending because for some reason the last post tripped up spam assasin.
-------- Original Message --------
Subject: Commit approval pls: PR 9877, 8336, plus other stuff
Date: Tue, 5 Aug 2003 13:05:00 -0700
From: J. Kean Johnston <jkj@sco.com>
Organization: The SCO Group
To: gcc-patches@gnu.org
CC: gcc@gnu.org
ChangeLog entry for the top level stuff:
2003-08-05 Kean Johnston <jkj@sco.com>
* configure.in (sco3.2v5*): Enable building of libgcj
ChangeLog entry for the libffi stuff:
2003-08-05 Kean Johnston <jkj@sco.com>
* configure.in: Add support for sco3.2v5.0*
ChangeLog entry for the libjava stuff:
2003-08-05 Kean Johnston <jkj@sco.com>
* java/io/natFilePosix.cc: HAVE_READDIR_R is broken on SCO. Undefine.
If MAXPATHLEN is not defined by the system, define it.
* java/io/natFileDescriptorPosix.cc: Ditto.
ChangeLog entry for the GCC stuff:
2003-08-05 Kean Johnston <jkj@sco.com>
PR target/9877
PR target/8336
* config.gcc (sco3.2v5*): Use elfos.h and dbxelf.h in tm_file;
Eliminate need for t-sco5gas target fragment.
No longer build crt{begin,end}S.o, that were used for COFF support.
* tlink.c (recompile_files): Add missing = in putenv() calls.
* unwind-dw2.c (_Unwind_GetCFA): Correct return cast.
* config/i386/sco5.h: Major overhaul to remove all COFF support
* config/i386/t-sco5: Multilib for PIC support
* config/i386/t-sco5gas: Remove
* doc/install.texi: Update for modern SCO instructions
* fixinc/check.tpl: Allow user to specify diff program for make check
* fixinc/inclhack.def: Fix several SCO header files, namely string.h,
math.h, sys/byteorder.h and sys/regset.h.
* fixinc/tests/base/math.h: Update
* fixinc/tests/base/sys/byteorder.h: Update
* fixinc/tests/base/string.h: Added
* fixinc/tests/base/sys/regset.h: Added
* testsuite/gcc.dg/nest.c: Allow failure on SCO (-pg not supported)
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.191.2.2
diff -u -r1.191.2.2 configure.in
--- configure.in 27 Jun 2003 11:44:14 -0000 1.191.2.2
+++ configure.in 5 Aug 2003 19:07:55 -0000
@@ -473,7 +473,7 @@
i[3456]86-*-sco3.2v5*)
# The linker does not yet know about weak symbols in COFF,
# and is not configured to handle mixed ELF and COFF.
- noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs ld target-libgloss"
;;
i[3456]86-*-sco*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.266.2.10
diff -u -r1.266.2.10 config.gcc
--- gcc/config.gcc 27 Jun 2003 11:44:22 -0000 1.266.2.10
+++ gcc/config.gcc 5 Aug 2003 19:07:56 -0000
@@ -1244,15 +1244,13 @@
i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
xm_defines=POSIX
install_headers_dir=install-headers-cpio
- tm_file="${tm_file} i386/unix.h i386/att.h i386/sco5.h"
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/sco5.h"
if test x$gas = xyes
then
tm_file="usegas.h ${tm_file}"
- tmake_file=i386/t-sco5gas
- else
- tmake_file=i386/t-sco5
fi
- extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
+ tmake_file=i386/t-sco5
+ extra_parts="crtbegin.o crtend.o"
;;
i[34567]86-*-solaris2*)
xm_defines="POSIX SMALL_ARG_MAX"
Index: gcc/tlink.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tlink.c,v
retrieving revision 1.46.2.1
diff -u -r1.46.2.1 tlink.c
--- gcc/tlink.c 26 Feb 2003 05:22:34 -0000 1.46.2.1
+++ gcc/tlink.c 5 Aug 2003 19:07:56 -0000
@@ -465,8 +465,8 @@
{
file *f;
- putenv (xstrdup ("COMPILER_PATH"));
- putenv (xstrdup ("LIBRARY_PATH"));
+ putenv (xstrdup ("COMPILER_PATH="));
+ putenv (xstrdup ("LIBRARY_PATH="));
while ((f = file_pop ()) != NULL)
{
Index: gcc/unwind-dw2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/unwind-dw2.c,v
retrieving revision 1.22.2.6
diff -u -r1.22.2.6 unwind-dw2.c
--- gcc/unwind-dw2.c 9 Jun 2003 21:37:50 -0000 1.22.2.6
+++ gcc/unwind-dw2.c 5 Aug 2003 19:07:57 -0000
@@ -171,7 +171,7 @@
_Unwind_Word
_Unwind_GetCFA (struct _Unwind_Context *context)
{
- return (_Unwind_Ptr) context->cfa;
+ return (_Unwind_Word) context->cfa;
}
/* Overwrite the saved value for register REG in CONTEXT with VAL. */
Index: gcc/config/i386/sco5.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/sco5.h,v
retrieving revision 1.74
diff -u -r1.74 sco5.h
--- gcc/config/i386/sco5.h 26 Nov 2002 04:54:48 -0000 1.74
+++ gcc/config/i386/sco5.h 5 Aug 2003 19:07:58 -0000
@@ -1,7 +1,7 @@
/* Definitions for Intel 386 running SCO Unix System V 3.2 Version 5.
- Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2002
+ Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
Free Software Foundation, Inc.
- Contributed by Kean Johnston (hug@netcom.com)
+ Contributed by Kean Johnston (jkj@sco.com)
This file is part of GNU CC.
@@ -20,230 +20,33 @@
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386, SCO OpenServer 5
Syntax)");
-#undef LPREFIX
-#define LPREFIX ".L"
-
-#undef ALIGN_ASM_OP
-#define ALIGN_ASM_OP "\t.align\t"
-
-#undef ASCII_DATA_ASM_OP
-#define ASCII_DATA_ASM_OP "\t.ascii\t"
-
-#undef IDENT_ASM_OP
-#define IDENT_ASM_OP "\t.ident\t"
-
-#undef COMMON_ASM_OP
-#define COMMON_ASM_OP "\t.comm\t"
-
-#undef SET_ASM_OP
-#define SET_ASM_OP "\t.set\t"
-
-#undef LOCAL_ASM_OP
-#define LOCAL_ASM_OP "\t.local\t"
-
-#undef ASM_SHORT
-#define ASM_SHORT "\t.value\t"
-
-#undef ASM_LONG
-#define ASM_LONG "\t.long\t"
-
#undef ASM_QUAD
-#undef TYPE_ASM_OP
-#define TYPE_ASM_OP "\t.type\t"
-
-#undef SIZE_ASM_OP
-#define SIZE_ASM_OP "\t.size\t"
-
-#undef STRING_ASM_OP
-#define STRING_ASM_OP "\t.string\t"
-
-#undef SKIP_ASM_OP
-#define SKIP_ASM_OP "\t.zero\t"
-
#undef GLOBAL_ASM_OP
#define GLOBAL_ASM_OP "\t.globl\t"
-#undef EH_FRAME_SECTION_ASM_OP
-#define EH_FRAME_SECTION_NAME_COFF ".ehfram"
-#define EH_FRAME_SECTION_NAME_ELF ".eh_frame"
-#define EH_FRAME_SECTION_NAME \
- ((TARGET_ELF) ? EH_FRAME_SECTION_NAME_ELF : EH_FRAME_SECTION_NAME_COFF)
-
-/* Avoid problems (long sectino names, forward assembler refs) with DWARF
- exception unwinding when we're generating COFF */
-#define DWARF2_UNWIND_INFO \
- ((TARGET_ELF) ? 1 : 0 )
-
-#undef READONLY_DATA_SECTION_ASM_OP
-#define READONLY_DATA_SECTION_ASM_OP_COFF "\t.section\t.rodata, \"x\""
-#define READONLY_DATA_SECTION_ASM_OP_ELF "\t.section\t.rodata"
-#define READONLY_DATA_SECTION_ASM_OP \
- ((TARGET_ELF) \
- ? READONLY_DATA_SECTION_ASM_OP_ELF \
- : READONLY_DATA_SECTION_ASM_OP_COFF)
-
-#undef INIT_SECTION_ASM_OP
-#define INIT_SECTION_ASM_OP_ELF "\t.section\t.init"
-/* Rename these for COFF because crt1.o will try to run them. */
-#define INIT_SECTION_ASM_OP_COFF "\t.section\t.ctor ,\"x\""
-#define INIT_SECTION_ASM_OP \
- ((TARGET_ELF) ? INIT_SECTION_ASM_OP_ELF : INIT_SECTION_ASM_OP_COFF)
-
-#undef CTORS_SECTION_ASM_OP
-#define CTORS_SECTION_ASM_OP_ELF "\t.section\t.ctors,\"aw\""
-#define CTORS_SECTION_ASM_OP_COFF INIT_SECTION_ASM_OP_COFF
-#define CTORS_SECTION_ASM_OP \
- ((TARGET_ELF) ? CTORS_SECTION_ASM_OP_ELF : CTORS_SECTION_ASM_OP_COFF)
-
-#undef DTORS_SECTION_ASM_OP
-#define DTORS_SECTION_ASM_OP_ELF "\t.section\t.dtors, \"aw\""
-#define DTORS_SECTION_ASM_OP_COFF FINI_SECTION_ASM_OP_COFF
-#define DTORS_SECTION_ASM_OP \
- ((TARGET_ELF) ? DTORS_SECTION_ASM_OP_ELF : DTORS_SECTION_ASM_OP_COFF)
-
-#undef FINI_SECTION_ASM_OP
-#define FINI_SECTION_ASM_OP_ELF "\t.section\t.fini"
-#define FINI_SECTION_ASM_OP_COFF "\t.section\t.dtor, \"x\""
-#define FINI_SECTION_ASM_OP \
- ((TARGET_ELF) ? FINI_SECTION_ASM_OP_ELF : FINI_SECTION_ASM_OP_COFF)
-
#undef BSS_SECTION_ASM_OP
-#define BSS_SECTION_ASM_OP "\t.data"
-
-#undef TEXT_SECTION_ASM_OP
-#define TEXT_SECTION_ASM_OP "\t.text"
-
-#undef DATA_SECTION_ASM_OP
-#define DATA_SECTION_ASM_OP "\t.data"
-
-#undef TYPE_OPERAND_FMT
-#define TYPE_OPERAND_FMT "@%s"
-
-#undef APPLY_RESULT_SIZE
-#define APPLY_RESULT_SIZE \
-(TARGET_ELF) ? size : 116
-
-#ifndef ASM_DECLARE_RESULT
-#define ASM_DECLARE_RESULT(FILE, RESULT)
-#endif
-
-#define SCO_DEFAULT_ASM_COFF(FILE,NAME) \
-do { \
- ASM_OUTPUT_LABEL (FILE, NAME); \
- } while (0)
-
-#undef ASM_DECLARE_FUNCTION_NAME
-#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
- do { \
- if (TARGET_ELF) { \
- ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
- ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
- ASM_OUTPUT_LABEL (FILE, NAME); \
- } else \
- SCO_DEFAULT_ASM_COFF(FILE, NAME); \
-} while (0)
-
-#undef ASM_DECLARE_FUNCTION_SIZE
-#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
- do { \
- if (TARGET_ELF && !flag_inhibit_size_directive) \
- ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \
- } while (0)
-
-#undef ASM_DECLARE_OBJECT_NAME
-#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
- do { \
- if (TARGET_ELF) { \
- HOST_WIDE_INT size; \
- \
- ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
- \
- size_directive_output = 0; \
- if (!flag_inhibit_size_directive \
- && (DECL) && DECL_SIZE (DECL)) \
- { \
- size_directive_output = 1; \
- size = int_size_in_bytes (TREE_TYPE (DECL)); \
- ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \
- } \
- \
- ASM_OUTPUT_LABEL (FILE, NAME); \
- } else \
- SCO_DEFAULT_ASM_COFF(FILE, NAME); \
- } while (0)
-
-#undef ASM_FILE_START_1
-#define ASM_FILE_START_1(FILE)
+#define BSS_SECTION_ASM_OP "\t.section\t.bss, \"aw\", @nobits"
+
+/*
+ * NOTE: We really do want CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP.
+ * Here's the reason why. If we dont define them, and we dont define them
+ * to always emit to the same section, the default is to emit to "named"
+ * ctors and dtors sections. This would be great if we could use GNU ld,
+ * but we can't. The native linker could possibly be trained to coalesce
+ * named ctors sections, but that hasn't been done either. So if we don't
+ * define these, many C++ ctors and dtors dont get run, because they never
+ * wind up in the ctors/dtors arrays.
+ */
+#define CTORS_SECTION_ASM_OP "\t.section\t.ctors, \"aw\""
+#define DTORS_SECTION_ASM_OP "\t.section\t.dtors, \"aw\""
-#undef ASM_FILE_START
-#define ASM_FILE_START(FILE) \
-do { \
- output_file_directive((FILE),main_input_filename); \
- fprintf ((FILE), "\t.version\t\"01.01\"\n"); \
-} while (0)
-
-#undef ASM_FINISH_DECLARE_OBJECT
-#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
-do { \
- if (TARGET_ELF) { \
- const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
- HOST_WIDE_INT size; \
- if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
- && ! AT_END && TOP_LEVEL \
- && DECL_INITIAL (DECL) == error_mark_node \
- && !size_directive_output) \
- { \
- size_directive_output = 1; \
- size = int_size_in_bytes (TREE_TYPE (DECL)); \
- ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \
- } \
- } \
-} while (0)
-
-#undef ASM_GENERATE_INTERNAL_LABEL
-#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
-do { \
- if (TARGET_ELF) \
- sprintf (LABEL, "*.%s%ld", (PREFIX), (long)(NUM)); \
- else \
- sprintf (LABEL, ".%s%ld", (PREFIX), (long)(NUM)); \
-} while (0)
-
-#undef ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
-do { \
- fprintf ((FILE), "%s", COMMON_ASM_OP); \
- assemble_name ((FILE), (NAME)); \
- if (TARGET_ELF) \
- fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
- else \
- fprintf ((FILE), ",%u\n", (SIZE)); \
-} while (0)
-
-#undef ASM_OUTPUT_ALIGNED_LOCAL
-#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
-do { \
- if (TARGET_ELF) { \
- fprintf ((FILE), "%s", LOCAL_ASM_OP); \
- assemble_name ((FILE), (NAME)); \
- fprintf ((FILE), "\n"); \
- ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
- } else { \
- int align = exact_log2 (ALIGN); \
- if (align > 2) align = 2; \
- if (TARGET_SVR3_SHLIB) \
- data_section (); \
- else \
- bss_section (); \
- ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \
- fprintf ((FILE), "%s\t", "\t.lcomm"); \
- assemble_name ((FILE), (NAME)); \
- fprintf ((FILE), ",%u\n", (SIZE)); \
- } \
-} while (0)
+#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
+#undef X86_FILE_START_VERSION_DIRECTIVE
+#define X86_FILE_START_VERSION_DIRECTIVE true
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
@@ -251,248 +54,23 @@
Try to use asm_output_aligned_bss to implement this macro. */
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
-asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
-
-#undef ESCAPES
-#define ESCAPES \
-"\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
-\0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\
-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\
-\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
-\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
-\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
-\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"
-
-#undef STRING_LIMIT
-#define STRING_LIMIT ((unsigned) 256)
-
-#undef ASM_OUTPUT_LIMITED_STRING
-#define ASM_OUTPUT_LIMITED_STRING(FILE, STR) \
- do \
- { \
- register const unsigned char *_limited_str = \
- (const unsigned char *) (STR); \
- register unsigned ch; \
- fprintf ((FILE), "%s\"", STRING_ASM_OP); \
- for (; (ch = *_limited_str); _limited_str++) \
- { \
- register int escape; \
- switch (escape = ESCAPES[ch]) \
- { \
- case 0: \
- putc (ch, (FILE)); \
- break; \
- case 1: \
- fprintf ((FILE), "\\%03o", ch); \
- break; \
- default: \
- putc ('\\', (FILE)); \
- putc (escape, (FILE)); \
- break; \
- } \
- } \
- fprintf ((FILE), "\"\n"); \
- } \
- while (0)
-
-
-#undef ASM_OUTPUT_ASCII
-#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
-do { \
- register const unsigned char *_ascii_bytes = \
- (const unsigned char *) (STR); \
- register const unsigned char *limit = _ascii_bytes + (LENGTH); \
- register unsigned bytes_in_chunk = 0; \
- for (; _ascii_bytes < limit; _ascii_bytes++) \
- { \
- register unsigned const char *p; \
- if (bytes_in_chunk >= 64) \
- { \
- fputc ('\n', (FILE)); \
- bytes_in_chunk = 0; \
- } \
- for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \
- continue; \
- if (p < limit && (p - _ascii_bytes) <= (long) STRING_LIMIT) \
- { \
- if (bytes_in_chunk > 0) \
- { \
- fputc ('\n', (FILE)); \
- bytes_in_chunk = 0; \
- } \
- ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \
- _ascii_bytes = p; \
- } \
- else \
- { \
- if (bytes_in_chunk == 0) \
- fputs ("\t.byte\t", (FILE)); \
- else \
- fputc (',', (FILE)); \
- fprintf ((FILE), "0x%02x", *_ascii_bytes); \
- bytes_in_chunk += 5; \
- } \
- } \
- if (bytes_in_chunk > 0) \
- fprintf ((FILE), "\n"); \
-} while (0)
-
-#undef ASM_OUTPUT_CASE_LABEL
-#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE) \
-do { \
- if (TARGET_ELF) \
- ASM_OUTPUT_ALIGN ((FILE), 2); \
- ASM_OUTPUT_INTERNAL_LABEL((FILE),(PREFIX),(NUM)); \
-} while (0)
-
-#undef ASM_OUTPUT_IDENT
-#define ASM_OUTPUT_IDENT(FILE, NAME) \
- fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME);
-
-#undef ASM_OUTPUT_EXTERNAL_LIBCALL
-#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
- if (TARGET_ELF) (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0))
-
-#undef ASM_OUTPUT_INTERNAL_LABEL
-#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
- fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
-
-/* The prefix to add to user-visible assembler symbols. */
-
-#undef USER_LABEL_PREFIX
-#define USER_LABEL_PREFIX ""
-
-/*
- * We rename 'gcc_except_table' to the shorter name in preparation
- * for the day when we're ready to do DWARF2 eh unwinding under COFF.
- */
-/* #define EXCEPTION_SECTION() named_section (NULL, ".gccexc", 1) */
-
-/* Switch into a generic section. */
-#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
-
-#undef ASM_OUTPUT_SKIP
-#define ASM_OUTPUT_SKIP(FILE,SIZE) \
-do { \
- if (TARGET_ELF) \
- fprintf (FILE, "%s%u\n", SKIP_ASM_OP, (SIZE)); \
- else \
- fprintf ((FILE), "%s.,.+%u\n", SET_ASM_OP, (SIZE)); \
-} while (0)
-
-
-#undef CTOR_LIST_BEGIN
-#define CTOR_LIST_BEGIN \
-do { \
- asm (CTORS_SECTION_ASM_OP); \
- if (TARGET_ELF) \
- STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) }; \
- else \
- asm ("pushl $0"); \
-} while (0)
-
-#undef CTOR_LIST_END
-#define CTOR_LIST_END \
-do { \
- if (TARGET_ELF) { \
- asm (CTORS_SECTION_ASM_OP); \
- STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (0) }; \
- } else { \
- CTOR_LIST_BEGIN; \
- } \
-} while (0)
-
-#undef DBX_BLOCKS_FUNCTION_RELATIVE
-#define DBX_BLOCKS_FUNCTION_RELATIVE 1
-
-#undef DBX_FUNCTION_FIRST
-#define DBX_FUNCTION_FIRST 1
+ asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
#undef DBX_REGISTER_NUMBER
-#define DBX_REGISTER_NUMBER(n) \
- ((TARGET_ELF) ? svr4_dbx_register_map[n] : dbx_register_map[n])
+#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n]
-#define DWARF2_DEBUGGING_INFO 1
-#define DWARF_DEBUGGING_INFO 1
-#define SDB_DEBUGGING_INFO 1
-#define DBX_DEBUGGING_INFO 1
+#define DWARF2_DEBUGGING_INFO 1
+#define DWARF_DEBUGGING_INFO 1
+#define DBX_DEBUGGING_INFO 1
#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE \
- ((TARGET_ELF) ? DWARF2_DEBUG: SDB_DEBUG)
-
-#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_init, in_fini
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-#undef EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS \
- INIT_SECTION_FUNCTION \
- FINI_SECTION_FUNCTION
-
-#undef FINI_SECTION_FUNCTION
-#define FINI_SECTION_FUNCTION \
-void \
-fini_section () \
-{ \
- if ((!TARGET_ELF) && in_section != in_fini) \
- { \
- fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP); \
- in_section = in_fini; \
- } \
-}
-
-#undef INIT_SECTION_FUNCTION
-#define INIT_SECTION_FUNCTION \
-void \
-init_section () \
-{ \
- if ((!TARGET_ELF) && in_section != in_init) \
- { \
- fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP); \
- in_section = in_init; \
- } \
-}
-
-#undef SUBTARGET_FRAME_POINTER_REQUIRED
-#define SUBTARGET_FRAME_POINTER_REQUIRED \
- ((TARGET_ELF) ? 0 : \
- (current_function_calls_setjmp || current_function_calls_longjmp))
-
-#undef LOCAL_LABEL_PREFIX
-#define LOCAL_LABEL_PREFIX \
- ((TARGET_ELF) ? "" : ".")
-
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-#define MD_EXEC_PREFIX "/usr/ccs/bin/"
-#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
-
-#undef NON_SAVING_SETJMP
-#define NON_SAVING_SETJMP \
- ((TARGET_ELF) ? 0 : \
- (current_function_calls_setjmp && current_function_calls_longjmp))
+#undef DWARF2_UNWIND_INFO
+#define DWARF2_UNWIND_INFO 1
#undef NO_IMPLICIT_EXTERN_C
-#define NO_IMPLICIT_EXTERN_C 1
-
-/* JKJ FIXME - examine the ramifications of RETURN_IN_MEMORY and
- RETURN_POPS_ARGS */
-
-#undef RETURN_POPS_ARGS
-#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
- ((TARGET_ELF) ? \
- (ix86_return_pops_args (FUNDECL, FUNTYPE, SIZE)) : \
- (((FUNDECL) && (TREE_CODE (FUNDECL) == IDENTIFIER_NODE)) ? 0 \
- : (TARGET_RTD \
- && (TYPE_ARG_TYPES (FUNTYPE) == 0 \
- || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
- == void_type_node))) ? (SIZE) \
- : 0))
-
-/* ??? Ignore coff. */
-#undef TARGET_ASM_SELECT_SECTION
-#define TARGET_ASM_SELECT_SECTION default_elf_select_section
+#define NO_IMPLICIT_EXTERN_C 1
#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
@@ -511,17 +89,6 @@
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP |
MASK_FLOAT_RETURNS)
-#define HANDLE_SYSV_PRAGMA 1
-
-/* Though OpenServer supports .weak in COFF, we don't use it.
- * G++ will frequently emit a symol as .weak and then (in the same .s
- * file) declare it global. The COFF assembler finds this unamusing.
- */
-#define SUPPORTS_WEAK (TARGET_ELF)
-#define ASM_WEAKEN_LABEL(FILE,NAME) \
- do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
- fputc ('\n', FILE); } while (0)
-
/*
* Define sizes and types
*/
@@ -529,12 +96,14 @@
#undef PTRDIFF_TYPE
#undef WCHAR_TYPE
#undef WCHAR_TYPE_SIZE
+#undef WINT_TYPE
#undef LONG_DOUBLE_TYPE_SIZE
-#define LONG_DOUBLE_TYPE_SIZE 96
#define SIZE_TYPE "unsigned int"
#define PTRDIFF_TYPE "int"
#define WCHAR_TYPE "long int"
#define WCHAR_TYPE_SIZE BITS_PER_WORD
+#define WINT_TYPE "long int"
+#define LONG_DOUBLE_TYPE_SIZE 96
/*
* New for multilib support. Set the default switches for multilib,
@@ -548,7 +117,7 @@
With SCO Open Server 5.0, you now get the linker and assembler free,
so that is what these specs are targeted for. These utilities are
very argument sensitive: a space in the wrong place breaks everything.
- So RMS, please forgive this mess. It works.
+ So please forgive this mess. It works.
Parameters which can be passed to gcc, and their SCO equivalents:
GCC Parameter SCO Equivalent
@@ -564,77 +133,109 @@
does.
SCO also allows you to compile, link and generate either ELF or COFF
- binaries. With gcc, unlike the SCO compiler, the default is ELF.
- Specify -mcoff to gcc to produce COFF binaries. -fpic will get the
- assembler and linker to produce PIC code.
+ binaries. With gcc, we now only support ELF mode.
+
+ GCC also requires that the user has installed OSS646, the Execution
+ Environment Update, or is running release 5.0.7 or later. This has
+ many fixes to the ELF link editor and assembler, and a considerably
+ improved libc and RTLD.
+
+ In terms of tool usage, we want to use the standard link editor always,
+ and either the GNU assembler or the native assembler. With OSS646 the
+ native assembler has grown up quite a bit. Some of the specs below
+ assume that /usr/gnu is the prefix for the GNU tools, because thats
+ where the SCO provided ones go. This is especially important for
+ include and library search path ordering. We want to look in /usr/gnu
+ first, becuase frequently people are linking against -lintl, and they
+ MEAN to link with gettext. What they get is the SCO intl library. Its
+ a REAL pity that GNU gettext chose that name; perhaps in a future
+ version they can be persuaded to change it to -lgnuintl and have a
+ link so that -lintl will work for other systems. The same goes for
+ header files. We want /usr/gnu/include searched for before the system
+ header files. Hence the -isystem /usr/gnu/include in the CPP_SPEC.
+ We get /usr/gnu/lib first by virtue of the MD_STARTFILE_PREFIX below.
*/
+#define MD_STARTFILE_PREFIX "/usr/gnu/lib/"
+#define MD_STARTFILE_PREFIX_1 "/usr/ccs/lib/"
+
+#if USE_GAS
+# define MD_EXEC_PREFIX "/usr/gnu/bin/"
+#else
+# define MD_EXEC_PREFIX "/usr/ccs/bin/elf/"
+#endif
+
+/* Always use the system linker, please. */
+#ifndef DEFAULT_LINKER
+# define DEFAULT_LINKER "/usr/ccs/bin/elf/ld"
+#endif
+
/* Set up assembler flags for PIC and ELF compilations */
#undef ASM_SPEC
#if USE_GAS
- /* Leave ASM_SPEC undefined so we pick up the master copy from gcc.c
- * Undef MD_EXEC_PREFIX because we don't know where GAS is, but it's not
- * likely in /usr/ccs/bin/
- */
-#undef MD_EXEC_PREFIX
+ /* Leave ASM_SPEC undefined so we pick up the master copy from gcc.c */
#else
-
#define ASM_SPEC \
- "-b %{!mcoff:elf}%{mcoff:coff \
- %{static:%e-static not valid with -mcoff} \
- %{shared:%e-shared not valid with -mcoff} \
- %{symbolic:%e-symbolic not valid with -mcoff}} \
- %{Ym,*} %{Yd,*} %{Wa,*:%*} \
-
%{!mcoff:-E%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},ELF
%{Qn:} %{!Qy:-Qn}}"
+ "%{Ym,*} %{Yd,*} %{Wa,*:%*} \
+
-E%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},ELF
%{Qn:} %{!Qy:-Qn}"
#endif
-/* Use crt1.o as a startup file and crtn.o as a closing file. */
+/*
+ * Use crti.o for shared objects, crt1.o for normal executables. Make sure
+ * to recognize both -G and -shared as a valid way of introducing shared
+ * library generation. This is important for backwards compatibility.
+ */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
- "%{shared: %{!mcoff: crti.o%s}} \
- %{!shared:\
+ "%{pg:%e-pg not supported on this platform} \
+ %{p:%{pp:%e-p and -pp specified - pick one}} \
+ %{!shared:\
%{!symbolic: \
- %{pg:gcrt.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}} \
+ %{!G: \
+ %{pp:pcrt1elf.o%s}%{p:mcrt1.o%s}%{!p:%{!pp:crt1.o%s}}}}} \
+ crti.o%s \
%{ansi:values-Xc.o%s} \
%{!ansi: \
- %{Xa:values-Xa.o%s} \
- %{!Xa:%{Xc:values-Xc.o%s} \
- %{!Xc:%{Xk:values-Xk.o%s} \
- %{!Xk:%{Xt:values-Xt.o%s} \
- %{!Xt:values-Xa.o%s}}}}} \
- %{mcoff:crtbeginS.o%s} %{!mcoff:crtbegin.o%s}"
+ %{traditional:values-Xt.o%s} \
+ %{!traditional: \
+ %{Xa:values-Xa.o%s} \
+ %{!Xa:%{Xc:values-Xc.o%s} \
+ %{!Xc:%{Xk:values-Xk.o%s} \
+ %{!Xk:%{Xt:values-Xt.o%s} \
+ %{!Xt:values-Xa.o%s}}}}}} \
+ crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
- "%{!mcoff:crtend.o%s} \
- %{mcoff:crtendS.o%s} \
- %{pg:gcrtn.o%s}%{!pg:crtn.o%s}"
-
-#define TARGET_OS_CPP_BUILTINS() \
- do \
- { \
- builtin_define ("__unix"); \
- builtin_define ("_SCO_DS"); \
- builtin_define ("_M_I386"); \
- builtin_define ("_M_XENIX"); \
- builtin_define ("_M_UNIX"); \
- builtin_assert ("system=svr3"); \
- if (flag_iso) \
- cpp_define (pfile, "_STRICT_ANSI"); \
- if (flag_pic) \
- { \
- builtin_define ("__PIC__"); \
- builtin_define ("__pic__"); \
- } \
- } \
+ "crtend.o%s crtn.o%s"
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__unix"); \
+ builtin_define ("_SCO_DS"); \
+ builtin_define ("_SCO_DS_LL"); \
+ builtin_define ("_SCO_ELF"); \
+ builtin_define ("_M_I386"); \
+ builtin_define ("_M_XENIX"); \
+ builtin_define ("_M_UNIX"); \
+ builtin_assert ("system=svr3"); \
+ if (flag_iso) \
+ cpp_define (pfile, "_STRICT_ANSI"); \
+ if (flag_pic) \
+ { \
+ builtin_define ("__PIC__"); \
+ builtin_define ("__pic__"); \
+ } \
+ } \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "\
- %{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \
- %{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \
+ -isystem /usr/gnu/include \
+ %{pthread:-D_REENTRANT} \
%{!Xods30:-D_STRICT_NAMES} \
%{!ansi:%{!posix:%{!Xods30:-D_SCO_XPG_VERS=4}}} \
%{ansi:-isystem include/ansi%s -isystem /usr/include/ansi} \
@@ -652,8 +253,6 @@
-DM_BITFIELDS -DM_SYS5 -DM_SYSV -DM_INTERNAT
-DM_SYSIII \
-DM_WORDSWAP}}}} \
%{scointl:-DM_INTERNAT -D_M_INTERNAT} \
- %{!mcoff:-D_SCO_ELF} \
- %{mcoff:-D_M_COFF -D_SCO_COFF} \
%{Xa:-D_SCO_C_DIALECT=1} \
%{!Xa:%{Xc:-D_SCO_C_DIALECT=3} \
%{!Xc:%{Xk:-D_SCO_C_DIALECT=4} \
@@ -662,109 +261,38 @@
#undef LINK_SPEC
#define LINK_SPEC \
- "-b %{!mcoff:elf}%{mcoff:coff \
- %{static:%e-static not valid with -mcoff} \
- %{shared:%e-shared not valid with -mcoff} \
- %{symbolic:%e-symbolic not valid with -mcoff} \
- %{fpic:%e-fpic not valid with -mcoff} \
- %{fPIC:%e-fPIC not valid with -mcoff}} \
-
-R%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},%{mcoff:COFF}%{!mcoff:ELF}
\
- %{Wl,*%*} %{YP,*} %{YL,*} %{YU,*} \
+
"%{!shared:%{!symbolic:%{!G:-E%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},ELF}}}
\
+ %{Wl,*:%*} %{YP,*} %{YL,*} %{YU,*} \
%{!YP,*:%{p:-YP,/usr/ccs/libp:/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib}
\
%{!p:-YP,/usr/ccs/lib:/lib:/usr/lib}} \
- %{h*} %{static:-dn -Bstatic} %{shared:-G -dy %{!z*:-z text}} \
- %{symbolic:-Bsymbolic -G -dy %{!z*:-z text}} %{z*} %{R*} %{Y*} \
- %{G:-G} %{!mcoff:%{Qn:} %{!Qy:-Qn}}"
-
-/* The SCO COFF linker gets confused on the difference between "-ofoo"
- and "-o foo". So we just always force a single space. */
-
-#define SWITCHES_NEED_SPACES "o"
+ %{h*} %{static:-dn -Bstatic %{G:%e-G and -static are mutually
exclusive}} \
+ %{shared:%{!G:-G}} %{G:%{!shared:-G}} %{shared:%{G:-G}} \
+ %{shared:-dy %{symbolic:-Bsymbolic -G} %{z*}} %{R*} %{Y*} \
+ %{Qn:} %{!Qy:-Qn} -z alt_resolve"
/* Library spec. If we are not building a shared library, provide the
standard libraries, as per the SCO compiler. */
#undef LIB_SPEC
#define LIB_SPEC \
- "%{shared:pic/libgcc.a%s}%{!shared:%{!symbolic:-lcrypt -lgen -lc}}"
+ "%{shared:%{!G:pic/libgcc.a%s}} \
+ %{G:%{!shared:pic/libgcc.a%s}} \
+ %{shared:%{G:pic/libgcc.a%s}} \
+ %{p:%{!pp:-lelfprof -lelf}} %{pp:%{!p:-lelfprof -lelf}} \
+ %{!shared:%{!symbolic:%{!G:-lcrypt -lgen -lc %{pthread:-lpthread}}}}"
#undef LIBGCC_SPEC
#define LIBGCC_SPEC \
- "%{!shared:-lgcc}"
+ "%{!shared:%{!G:-lgcc}}"
-#define MASK_COFF 010000000000 /* Mask for elf generation */
-#define TARGET_ELF (1) /* (!(target_flags & MASK_COFF)) */
+/* Here for legacy support only so we still accept -melf flag */
+#define MASK_COFF 010000000000 /* Mask for COFF generation */
+#define TARGET_ELF (1)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "elf", -MASK_COFF, N_("Generate ELF output") },
-#define NO_DOLLAR_IN_LABEL
-
-/* Implicit library calls should use memcpy, not bcopy, etc. They are
- faster on OpenServer libraries. */
-
-#define TARGET_MEM_FUNCTIONS
-
-/* Biggest alignment supported by the object file format of this
- machine. Use this macro to limit the alignment which can be
- specified using the `__attribute__ ((aligned (N)))' construct. If
- not defined, the default value is `BIGGEST_ALIGNMENT'. */
-
-#define MAX_OFILE_ALIGNMENT (32768*8)
-
-/* Define the `__builtin_va_list' type for the ABI. On OpenServer, this
- type is `char *'. */
-#undef BUILD_VA_LIST_TYPE
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = build_pointer_type (char_type_node)
-
-
-/*
-Here comes some major hackery to get the crt stuff to compile properly.
-Since we can (and do) compile for both COFF and ELF environments, we
-set things up accordingly, based on the pre-processor defines for ELF
-and COFF. This is insane, but then I guess having one compiler with a
-single back-end supporting two vastly different file format types is
-a little insane too. But it is not impossible and we get a useful
-compiler at the end of the day. Onward we go ...
-*/
-
-#if defined(CRT_BEGIN) || defined(CRT_END) || defined(IN_LIBGCC2)
-# undef OBJECT_FORMAT_ELF
-# undef INIT_SECTION_ASM_OP
-# undef FINI_SECTION_ASM_OP
-# undef CTORS_SECTION_ASM_OP
-# undef DTORS_SECTION_ASM_OP
-# undef EH_FRAME_SECTION_NAME
-# undef CTOR_LIST_BEGIN
-# undef CTOR_LIST_END
-# undef DO_GLOBAL_CTORS_BODY
-
-# if defined (_SCO_ELF)
-# define OBJECT_FORMAT_ELF
-# define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_ELF
-# define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_ELF
-# define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_ELF
-# define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_ELF
-# define EH_FRAME_SECTION_NAME EH_FRAME_SECTION_NAME_ELF
-# else /* ! _SCO_ELF */
-# define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_COFF
-# define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_COFF
-# define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_COFF
-# define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_COFF
-# define EH_FRAME_SECTION_NAME EH_FRAME_SECTION_NAME_COFF
-# define CTOR_LIST_BEGIN asm (INIT_SECTION_ASM_OP); asm ("pushl $0")
-# define CTOR_LIST_END CTOR_LIST_BEGIN
-# define DO_GLOBAL_CTORS_BODY \
-do { \
- func_ptr *p, *beg = alloca(0); \
- for (p = beg; *p;) \
- (*p++) (); \
-} while (0)
-# endif /* ! _SCO_ELF */
-#endif /* CRT_BEGIN !! CRT_END */
-
/* Handle special EH pointer encodings. Absolute, pc-relative, and
indirect are handled automatically. */
#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR,
DONE) \
@@ -798,10 +326,3 @@
: "=d"(BASE))
#endif
-/* 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. */
-#undef ASM_PREFERRED_EH_DATA_FORMAT
-#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
- (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \
- : DW_EH_PE_absptr)
Index: gcc/config/i386/t-sco5
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/t-sco5,v
retrieving revision 1.6
diff -u -r1.6 t-sco5
--- gcc/config/i386/t-sco5 15 Nov 2001 13:05:53 -0000 1.6
+++ gcc/config/i386/t-sco5 5 Aug 2003 19:07:58 -0000
@@ -1,18 +1,16 @@
-# We need to use -fPIC when we are using gcc to compile the routines in
-# crtstuff.c. This is only really needed when we are going to use gcc/g++
-# to produce a shared library, but since we don't know ahead of time when
-# we will be doing that, we just always use -fPIC when compiling the
-# routines in crtstuff.c. Likewise for libgcc2.c. This is less painful
-# than multilibbing everything with PIC and PIC-not variants.
-
-# The pushl in CTOR initialization interferes with frame pointer
elimination.
-
+# We multilib libgcc for -fPIC, to get real PIC code in it.
+# NOTE: We must use -fPIC on crt{begi,end}.o else we get an RTLD error
+# "cant set protections on segment of length blah at 0x8048000".
CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer
-TARGET_LIBGCC2_CFLAGS = -fPIC
-crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
- sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s
- $(GCC_FOR_TARGET) -c -o crti.o crti.s
+MULTILIB_OPTIONS = fPIC
+MULTILIB_DIRNAMES = pic
+MUTLILIB_EXCEPTIONS =
+MULTILIB_MATCHES = fPIC=fpic
+MULTILIB_EXTRA_OPTS =
+
+LIBGCC=stmp-multilib
+INSTALL_LIBGCC=install-multilib
# See all the declarations.
FIXPROTO_DEFINES = -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2
Index: gcc/config/i386/t-sco5gas
===================================================================
RCS file: gcc/config/i386/t-sco5gas
diff -N gcc/config/i386/t-sco5gas
--- gcc/config/i386/t-sco5gas 25 Jan 2003 18:09:15 -0000 1.4.38.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-# The pushl in CTOR initialization interferes with frame pointer
elimination.
-CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer
-CRTSTUFF_T_CFLAGS_S = -fno-omit-frame-pointer
-
-#
-# I am still a little unsure of the multilib architecture. The following
-# 4 lines are based on advice from meissner@cygnus.com.
-#
-MULTILIB_OPTIONS = fPIC
-MULTILIB_DIRNAMES = pic
-MULTILIB_EXCEPTIONS = *fPIC*
-MULTILIB_MATCHES = fPIC=fpic
-MULTILIB_EXTRA_OPTS =
-
-LIBGCC=stmp-multilib
-INSTALL_LIBGCC=install-multilib
-
-crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
- sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s
- $(GCC_FOR_TARGET) -c -o crti.o crti.s
-
-# See all the declarations.
-FIXPROTO_DEFINES = -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2
Index: gcc/doc/install.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.151.2.48
diff -u -r1.151.2.48 install.texi
--- gcc/doc/install.texi 26 Jul 2003 16:06:12 -0000 1.151.2.48
+++ gcc/doc/install.texi 5 Aug 2003 19:08:01 -0000
@@ -2331,12 +2331,6 @@
@html
<hr />
@end html
-@heading @anchor{ix86-*-sco3.2v4}i?86-*-sco3.2v4
-Use this configuration for SCO release 3.2 version 4.
-
-@html
-<hr />
-@end html
@heading @anchor{ix86-*-sco3.2v5*}i?86-*-sco3.2v5*
Use this for the SCO OpenServer Release 5 family of operating systems.
@@ -2349,64 +2343,34 @@
may use either the UDK debugger or GDB to debug programs built by this
version of GCC@.
-Use of the @option{-march=pentiumpro} flag can result in
-unrecognized opcodes when using the native assembler on OS versions before
-5.0.6. (Support for P6 opcodes was added to the native ELF assembler in
-that version.) While it's rather rare to see these emitted by GCC yet,
-errors of the basic form:
-
-@example
- /usr/tmp/ccaNlqBc.s:22:unknown instruction: fcomip
- /usr/tmp/ccaNlqBc.s:50:unknown instruction: fucomip
-@end example
-
-are symptoms of this problem. You may work around this by not
-building affected files with that flag, by using the GNU assembler, or
-by using the assembler provided with the current version of the OS@.
-Users of GNU assembler should see the note below for hazards on doing
-so.
-
-The native SCO assembler that is provided with the OS at no
-charge is normally required. If, however, you must be able to use
-the GNU assembler (perhaps you're compiling code with asms that
-require GAS syntax) you may configure this package using the flags
-@uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}}. You must
-use a recent version of GNU binutils; versions past 2.9.1 seem to work
-well.
-
-In general, the @option{--with-gnu-as} option isn't as well tested
-as the native assembler.
-
-Look in @file{gcc/config/i386/sco5.h} (search for ``messy'') for
-additional OpenServer-specific flags.
-
-Systems based on OpenServer before 5.0.4 (@samp{uname -X}
-will tell you what you're running) require TLS597 from
-@uref{ftp://stage.caldera.com/TLS/,,ftp://stage.caldera.com/TLS/}
-for C++ constructors and destructors to work right.
-
-The system linker in (at least) 5.0.4 and 5.0.5 will sometimes
-do the wrong thing for a construct that GCC will emit for PIC
-code. This can be seen as execution testsuite failures when using
-@option{-fPIC} on @file{921215-1.c}, @file{931002-1.c},
@file{nestfunc-1.c}, and @file{gcov-1.c}.
-For 5.0.5, an updated linker that will cure this problem is
-available. You must install both
-@uref{ftp://ftp.sco.com/pub/openserver5/rs505a,,ftp://ftp.sco.com/pub/openserver5/rs505a}
-and @uref{ftp://ftp.sco.com/pub/openserver5,,OSS499A}.
-
-The dynamic linker in OpenServer 5.0.5 (earlier versions may show
-the same problem) aborts on certain G77-compiled programs. It's
particularly
-likely to be triggered by building Fortran code with the @option{-fPIC}
flag.
-Although it's conceivable that the error could be triggered by other
-code, only G77-compiled code has been observed to cause this abort.
-If you are getting core dumps immediately upon execution of your
-G77 program---and especially if it's compiled with @option{-fPIC}---try
applying
-@uref{sco_osr5_g77.patch,,@file{sco_osr5_g77.patch}} to your
@samp{libf2c} and
-rebuilding GCC@.
-Affected faults, when analyzed in a debugger, will show a stack
-backtrace with a fault occurring in @code{rtld()} and the program
-running as @file{/usr/lib/ld.so.1}. This problem has been reported to SCO
-engineering and will hopefully be addressed in later releases.
+GCC is now only supported on releases 5.0.4 and later, and requires that
+you install Support Level Supplement OSS646B or later, and the latest
+version of the Supplement Graphics, Web and X11 Libraries (GWXLIBS)
+package. If you are using release 5.0.7 of OpenServer, you must have at
+least the first maintenance pack installed (this includes the relevant
+portions of OSS646 and GWXLIBS). OSS646, also known as the "Execution
+Environment Update", provides updated link editors and assemblers, as well
+as updated standard C and math libraries. The C startup modules are also
+updated to support the System V gABI draft, and GCC relies on that
+behavior. GWXLIBS provides a collection of commonly used open source
+libraries, some of which GCC depends on (such as GNU gettext and zlib).
+SCO OpenServer Release 5.0.7 has all of this built in by default, but
+GWXLIBS is significantly updated in Maintenance Pack 1. Please visit
+@uref{ftp://ftp.sco.com/pub/openserver5,,ftp://ftp.sco.com/pub/openserver5}
+and
+@uref{ftp://ftp.sco.com/pub/openserver5/opensrc,,ftp://ftp.sco.com/pub/openserver5/opensrc}
+for the latest versions of these (and other potentially useful)
supplements.
+
+Although there is support for using the native assembler, it is recommended
+that you configure GCC to use the GNU assembler. You do this by using the
+flags @uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}}. You
+should use a modern version of GNU binutils. Version 2.14 was used for all
+testing. In general, only the @option{--with-gnu-as} option is tested. A
+modern bintuils (as well as a plethora of other development related GNU
+utilities) can be found in the GNU Development Tools package. See the
+SCO web and ftp sites for details. That package also contains the
+currently "officially supported" version of GCC, version 2.95.3. It is
+useful for bootstrapping this version.
@html
Index: gcc/fixinc/check.tpl
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/check.tpl,v
retrieving revision 1.16
diff -u -r1.16 check.tpl
--- gcc/fixinc/check.tpl 16 May 2002 17:42:32 -0000 1.16
+++ gcc/fixinc/check.tpl 5 Aug 2003 19:08:01 -0000
@@ -135,7 +135,7 @@
:
else
- diff -u $f ${TESTBASE}/$f >&2 || :
+ ${DIFF:-diff} -u $f ${TESTBASE}/$f >&2 || :
exitok=false
fi
done
Index: gcc/fixinc/inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.139.4.8
diff -u -r1.139.4.8 inclhack.def
--- gcc/fixinc/inclhack.def 2 Jul 2003 06:47:05 -0000 1.139.4.8
+++ gcc/fixinc/inclhack.def 5 Aug 2003 19:08:04 -0000
@@ -297,19 +297,17 @@
/*
* Completely replace <sys/byteorder.h>; with a file that implements
gcc's
- * optimized byteswapping. Restricted to "SVR4" machines until either
- * it is shown to be safe to replace this file always, or we get
bolder ;-)
+ * optimized byteswapping.
*/
fix = {
hackname = AAB_svr4_replace_byteorder;
-#ifndef SVR5
mach = "*-*-sysv4*";
mach = "i[34567]86-*-sysv5*";
+ mach = "i[34567]86-*-sco3.2v5*";
mach = "i[34567]86-*-udk*";
mach = "i[34567]86-*-solaris2.[0-4]";
mach = "powerpcle-*-solaris2.[0-4]";
mach = "sparc-*-solaris2.[0-4]";
-#endif /* SVR5 */
files = sys/byteorder.h;
replace = '#ifndef _SYS_BYTEORDER_H
\#define _SYS_BYTEORDER_H
@@ -360,9 +358,8 @@
{
register unsigned long __result;
- __asm__ ("xchg%B0 %b0,%h0
- ror%L0 $16,%0
- xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
+ __asm__ ("xchg%B0 %b0,%h0 ; ror%L0 $16,%0 ; xchg%B0 %b0,%h0" \
+ : "=q" (__result) : "0" (__arg));
return __result;
}
@@ -2213,6 +2210,110 @@
/*
+ * On OpenServer and on UnixWare 7, <math.h> uses the native compiler
+ * __builtin_generic. We fix that usage to use the GCC equivalent.
+ * It also has a plethora of inline functions that conflict with libstdc++.
+ */
+fix = {
+ hackname = sco_math;
+ files = math.h;
+ files = ansi/math.h;
+ files = posix/math.h;
+ files = xpg4/math.h;
+ files = xpg4v2/math.h;
+ files = xpg4plus/math.h;
+ files = ods_30_compat/math.h;
+ files = oldstyle/math.h;
+ select = "inline double abs";
+ sed = "/#define.*__fp_class(a) \\\\/i\\\n"
+ "#ifndef __GNUC__\n";
+ sed =
+"/.*__builtin_generic/a\\\n"
+"#else\\\n"
+"#define __fp_class(a) \\\\\\\n"
+" __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long
double),\\\\\\\n"
+" __fpclassifyl(a), \\\\\\\n"
+" __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),
float), \\\\\\\n"
+" __fpclassifyf(a),__fpclassify(a)))\\\n"
+"#endif";
+
+ sed = "/extern \"C\\+\\+\"/N;"
+ "/inline double abs/i\\\n"
+ "#ifndef __GNUC__\n";
+ sed = "/inline long double trunc/N;"
+ "/inline long double trunc.*}.*extern \"C\\+\\+\"/a\\\n"
+ "#endif /* ! __GNUC__ */";
+
+ test_text =
+ "#define __fp_class(a) \\\\\n"
+ "
__builtin_generic(a,\"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify\")\n";
+
+};
+
+
+/*
+ * On SCO OpenServer prior to 5.0.7MP1, <sys/regset.h> and <ieeefp.h>
+ * have a clash on struct _fpstate and struct fpstate.
+ */
+fix = {
+ hackname = sco_regset;
+ files = sys/regset.h;
+ mach = "*-*-sco3.2v5*";
+ select = "(struct[ \t]+_*)fpstate";
+ c_fix = format;
+ c_fix_arg = "%1rsfpstate";
+
+ test_text =
+ "union u_fps {\n"
+ " struct\tfpstate\n"
+ " {\n"
+ " int whatever;\n"
+ " }\n"
+ "};\n"
+ "union _u_fps {\n"
+ " struct _fpstate\n"
+ " {\n"
+ " int whatever;\n"
+ " }\n"
+ "};\n";
+};
+
+
+/*
+ * The string.h header file on SCO Open Server has some inline C++
functions
+ * that confuse and upset libstdc++ horribly. Protect them from being
defined
+ * when using GCC.
+ */
+fix = {
+ hackname = sco_string;
+ files = string.h;
+ files = ansi/string.h;
+ files = posix/string.h;
+ files = xpg4/string.h;
+ files = xpg4v2/string.h;
+ files = xpg4plus/string.h;
+ files = ods_30_compat/string.h;
+ files = oldstyle/string.h;
+ mach = "*-*-sco3.2v5*";
+ select = "inline char";
+ sed = "/extern \"C\\+\\+\"/N;"
+ "/inline void.*memchr/i\\\n"
+ "#ifndef __GNUC__\n";
+ sed = "/return.*strstr/N;"
+ "/return.*strstr.*}/a\\\n"
+ "#endif /* ! __GNUC__ */";
+
+ test_text =
+ "extern \"C++\" {\n"
+ "inline void *memchr(void *__1, int __2, size_t __3)\n"
+ " { return (void *)memchr((const void *)__1, __2, __3); }\n"
+ "inline char *strstr(char *__1, const char *__2)\n"
+ " { return (char *)strstr((const char *)__1, __2); }\n"
+ "}\n";
+};
+
+
+/*
* The static functions lstat() and fchmod() in <sys/stat.h>
* cause G++ grief since they're not wrapped in "if __cplusplus".
*
@@ -2725,14 +2826,13 @@
* that is visible to any ANSI compiler using this include. Simply
* delete the lines that #define some string functions to internal forms.
*/
-#ifdef SVR4
fix = {
hackname = svr4_disable_opt;
files = string.h;
select = '#define.*__std_hdr_';
sed = '/#define.*__std_hdr_/d';
+ test_text = "#define strlen __std_hdr_strlen\n";
};
-#endif
/*
Index: gcc/fixinc/tests/base/math.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/tests/base/math.h,v
retrieving revision 1.9.20.1
diff -u -r1.9.20.1 math.h
--- gcc/fixinc/tests/base/math.h 1 Mar 2003 20:41:38 -0000 1.9.20.1
+++ gcc/fixinc/tests/base/math.h 5 Aug 2003 19:08:04 -0000
@@ -104,6 +104,13 @@
#endif /* RS6000_DOUBLE_CHECK */
+#if defined( SCO_MATH_CHECK )
+#define __fp_class(a) \
+ __builtin_generic(a,"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify")
+
+#endif /* SCO_MATH_CHECK */
+
+
#if defined( STRICT_ANSI_NOT_CTD_CHECK )
#if 1 && \
&& defined(mumbling) |& ( !defined(__STRICT_ANSI__)) \
Index: gcc/fixinc/tests/base/string.h
===================================================================
RCS file: gcc/fixinc/tests/base/string.h
diff -N gcc/fixinc/tests/base/string.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc/fixinc/tests/base/string.h 5 Aug 2003 19:08:04 -0000
@@ -0,0 +1,13 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/string.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+#ifndef _STRING_INCLUDED
+#define _STRING_INCLUDED
+#include <strings.h>
+#endif /* _STRING_INCLUDED */
Index: gcc/fixinc/tests/base/sys/byteorder.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/tests/base/sys/Attic/byteorder.h,v
retrieving revision 1.1
diff -u -r1.1 byteorder.h
--- gcc/fixinc/tests/base/sys/byteorder.h 19 Jul 2000 14:18:31 -0000 1.1
+++ gcc/fixinc/tests/base/sys/byteorder.h 5 Aug 2003 19:08:04 -0000
@@ -56,9 +56,7 @@
{
register unsigned long __result;
- __asm__ ("xchg%B0 %b0,%h0
- ror%L0 $16,%0
- xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
+ __asm__ ("xchg%B0 %b0,%h0 ; ror%L0 $16,%0 ; xchg%B0 %b0,%h0" :
"=q" (__result) : "0" (__arg));
return __result;
}
Index: gcc/fixinc/tests/base/sys/regset.h
===================================================================
RCS file: gcc/fixinc/tests/base/sys/regset.h
diff -N gcc/fixinc/tests/base/sys/regset.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc/fixinc/tests/base/sys/regset.h 5 Aug 2003 19:08:04 -0000
@@ -0,0 +1,26 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/sys/regset.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( SCO_REGSET_CHECK )
+union u_fps {
+ struct rsfpstate
+ {
+ int whatever;
+ }
+};
+union _u_fps {
+ struct _rsfpstate
+ {
+ int whatever;
+ }
+};
+
+#endif /* SCO_REGSET_CHECK */
Index: gcc/testsuite/gcc.dg/nest.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/nest.c,v
retrieving revision 1.5
diff -u -r1.5 nest.c
--- gcc/testsuite/gcc.dg/nest.c 28 Oct 2002 18:10:56 -0000 1.5
+++ gcc/testsuite/gcc.dg/nest.c 5 Aug 2003 19:08:07 -0000
@@ -5,6 +5,7 @@
/* Support for -pg on irix relies on gcrt1.o which doesn't exist yet.
See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html */
/* { dg-error "gcrt1.o" "Profiler support missing" { target
mips*-*-irix* } 0 } */
+/* { dg-error "-pg not supported" "Profiler support missing" { target
*-*-sco3.2v5* } 0 } */
long foo (long x)
{
Index: libffi/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libffi/configure.in,v
retrieving revision 1.33.2.5
diff -u -r1.33.2.5 configure.in
--- libffi/configure.in 8 May 2003 20:37:56 -0000 1.33.2.5
+++ libffi/configure.in 5 Aug 2003 19:08:11 -0000
@@ -48,6 +48,7 @@
case "$host" in
mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
+i*86-*-sco3.2v5*) 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;;
Index: libjava/java/io/natFileDescriptorPosix.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/natFileDescriptorPosix.cc,v
retrieving revision 1.23.4.2
diff -u -r1.23.4.2 natFileDescriptorPosix.cc
--- libjava/java/io/natFileDescriptorPosix.cc 9 Mar 2003 22:49:43 -0000
1.23.4.2
+++ libjava/java/io/natFileDescriptorPosix.cc 5 Aug 2003 19:08:11 -0000
@@ -18,6 +18,10 @@
#include <sys/stat.h>
#include <sys/param.h>
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+#endif
+
#ifdef HAVE_SYS_IOCTL_H
#define BSD_COMP /* Get FIONREAD on Solaris2. */
#include <sys/ioctl.h>
Index: libjava/java/io/natFilePosix.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/natFilePosix.cc,v
retrieving revision 1.2.20.1
diff -u -r1.2.20.1 natFilePosix.cc
--- libjava/java/io/natFilePosix.cc 21 Jan 2003 20:46:24 -0000 1.2.20.1
+++ libjava/java/io/natFilePosix.cc 5 Aug 2003 19:08:12 -0000
@@ -26,6 +26,10 @@
#include <string.h>
#include <utime.h>
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+#endif
+
#include <gcj/cni.h>
#include <jvm.h>
#include <java/io/File.h>
@@ -35,6 +39,10 @@
#include <java/io/FilenameFilter.h>
#include <java/io/FileFilter.h>
#include <java/lang/System.h>
+
+#ifdef _SCO_DS
+# undef HAVE_READDIR_R
+#endif
jboolean
java::io::File::_access (jint query)
--
J. Kean Johnston | Occam's Razor: "All other things being equal, the
simplest
| answer is usually the correct one" - William of Occam
Engineer, SPG |
Santa Cruz, CA | Darwin's Blade: "All other things being equal, the
simplest
Tel: 831-427-7569 | answer is usually the stupidest" - `Darwin Minor'
Fax: 831-429-1887
+-----------------------------------------------------------