Commit ac24fc99 by Kean Johnston

Part 2 of the SCO port update. This is everything I have approval for.

There are two outstanding patches I await approval to check in.

From-SVN: r65832
parent a8ada986
...@@ -1187,15 +1187,13 @@ i[34567]86-*-rtems*) ...@@ -1187,15 +1187,13 @@ i[34567]86-*-rtems*)
;; ;;
i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
install_headers_dir=install-headers-cpio 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 if test x$gas = xyes
then then
tm_file="usegas.h ${tm_file}" tm_file="usegas.h ${tm_file}"
tmake_file=i386/t-sco5gas
else
tmake_file=i386/t-sco5
fi 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*) i[34567]86-*-solaris2*)
xm_defines="SMALL_ARG_MAX" xm_defines="SMALL_ARG_MAX"
......
# We need to use -fPIC when we are using gcc to compile the routines in # We multilib libgcc for -fPIC, to get real PIC code in it.
# crtstuff.c. This is only really needed when we are going to use gcc/g++ # NOTE: We must use -fPIC on crt{begi,end}.o else we get an RTLD error
# to produce a shared library, but since we don't know ahead of time when # "cant set protections on segment of length blah at 0x8048000".
# 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.
CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer CRTSTUFF_T_CFLAGS = -fPIC -fno-omit-frame-pointer
TARGET_LIBGCC2_CFLAGS = -fPIC
crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES) MULTILIB_OPTIONS = fPIC
sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s MULTILIB_DIRNAMES = pic
$(GCC_FOR_TARGET) -c -o crti.o crti.s MULTILIB_MATCHES = fPIC=fpic
MULTILIB_EXTRA_OPTS =
LIBGCC=stmp-multilib
INSTALL_LIBGCC=install-multilib
# See all the declarations. # See all the declarations.
FIXPROTO_DEFINES = -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2 FIXPROTO_DEFINES = -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2
# 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
...@@ -2371,65 +2371,34 @@ maintain. GCC now emits only DWARF 2 for this target. This means you ...@@ -2371,65 +2371,34 @@ maintain. GCC now emits only DWARF 2 for this target. This means you
may use either the UDK debugger or GDB to debug programs built by this may use either the UDK debugger or GDB to debug programs built by this
version of GCC@. version of GCC@.
Use of the @option{-march=pentiumpro} flag can result in GCC is now only supported on releases 5.0.4 and later, and requires that
unrecognized opcodes when using the native assembler on OS versions before you install Support Level Supplement OSS646B or later, and Support Level
5.0.6. (Support for P6 opcodes was added to the native ELF assembler in Supplement OSS631C or later. If you are using release 5.0.7 of
that version.) While it's rather rare to see these emitted by GCC yet, OpenServer, you must have at least the first maintenance pack installed
errors of the basic form: (this includes the relevant portions of OSS646). OSS646, also known as
the "Execution Environment Update", provides updated link editors and
@example assemblers, as well as updated standard C and math libraries. The C
/usr/tmp/ccaNlqBc.s:22:unknown instruction: fcomip startup modules are also updated to support the System V gABI draft, and
/usr/tmp/ccaNlqBc.s:50:unknown instruction: fucomip GCC relies on that behaviour. OSS631 provides a collection of commonly
@end example 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
are symptoms of this problem. You may work around this by not in by default, but OSS631C and later also apply to that release. Please
building affected files with that flag, by using the GNU assembler, or visit
by using the assembler provided with the current version of the OS@. @uref{ftp://ftp.sco.com/pub/openserver5,,ftp://ftp.sco.com/pub/openserver5}
Users of GNU assembler should see the note below for hazards on doing for the latest versions of these (and other potentially useful)
so. supplements.
The native SCO assembler that is provided with the OS at no Although there is support for using the native assembler, it is
charge is normally required. If, however, you must be able to use recommended that you configure GCC to use the GNU assembler. You do
the GNU assembler (perhaps you're compiling code with asms that this by using the flags
require GAS syntax) you may configure this package using the flags @uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}}. You should
@uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}}. You must use a modern version of GNU binutils. Version 2.13.2.1 was used for all
use a recent version of GNU binutils; versions past 2.9.1 seem to work testing. In general, only the @option{--with-gnu-as} option is tested.
well. A modern bintuils (as well as a plethora of other development related
GNU utilities) can be found in Support Level Supplement OSS658A, the
In general, the @option{--with-gnu-as} option isn't as well tested "GNU Development Tools" package. See the SCO web and ftp sites for details.
as the native assembler. That package also contains the currently "officially supported" version of
GCC, version 2.95.3. It is useful for bootstrapping this version.
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.
@html @html
<hr /> <hr />
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
/* Support for -pg on irix relies on gcrt1.o which doesn't exist yet. /* 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 */ See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html */
/* { dg-error "gcrt1.o" "Profiler support missing" { target mips*-*-irix* } 0 } */ /* { 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) long foo (long x)
{ {
......
...@@ -178,7 +178,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index) ...@@ -178,7 +178,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
_Unwind_Word _Unwind_Word
_Unwind_GetCFA (struct _Unwind_Context *context) _Unwind_GetCFA (struct _Unwind_Context *context)
{ {
return context->cfa; return (_Unwind_Word)context->cfa;
} }
/* Overwrite the saved value for register REG in CONTEXT with VAL. */ /* Overwrite the saved value for register REG in CONTEXT with VAL. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment