sol2.h: New file.
* config/sol2.h: New file. * config.gcc (i?86-*-solaris2*): Include it before i386/sol2.h. (sparc64-wrs-vxworks*): Include it before sparc/sol2.h. (sparc-*-chorusos*): Likewise. (sparc-*-elf*): Likewise. (sparc-*-rtems*, sparc-*-rtemself*): Likewise. (sparc64-*-solaris2*, sparcv9-*-solaris2*): Likewise. (sparc-hal-solaris2*): Likewise. (sparc-*-solaris2*): Likewise. (sparclite-*-elf*): Likewise. (sparc86x-*-elf*): Likewise. (sparc64-*-elf*): Likewise. * config/i386/sol2.h (PREFERRED_DEBUGGING_TYPE): Moved to config/sol2.h. (ASM_SPEC): Override config/sol2.h version for now. Removed obsolete GAS_REJECTS_MINUS_S variant. (WINT_TYPE, WINT_TYPE_SIZE): Moved to config/sol2.h. (HANDLE_PRAGMA_REDEFINE_EXTNAME): Likewise. (TARGET_OS_CPP_BUILTINS): Likewise. Assert system=unix. (CPP_SPEC): Simplified using new CPP_SUBTARGET_SPEC. (LIB_SPEC, ENDFILE_SPEC, STARTFILE_SPEC, LINK_SPEC): Moved to config/sol2.h. (SWITCH_TAKES_ARG, STDC_0_IN_SYSTEM_HEADERS): Likewise. (ASM_CPU_SPEC): Define. (SUBTARGET_EXTRA_SPECS): Define. * config/sparc/sol2-bi.h (LONG_DOUBLE_TYPE_SIZE): Removed, already in config/sparc/sol2.h. (ASM_SPEC): Moved to config/sol2.h. (CPP_CPU_SPEC): Simplified. (STARTFILE_SPEC32): Likewise, renamed to STARTFILE_ARCH32_SPEC for consistency. (STARTFILE_SPEC64): Renamed to STARTFILE_ARCH64_SPEC. (STARTFILE_ARCH_SPEC): Use new names STARTFILE_ARCH32_SPEC, STARTFILE_ARCH64_SPEC. (STARTFILE_SPEC): Moved to config/sol2.h (SUBTARGET_EXTRA_SPECS): Add startfile_arch. (LINK_ARCH32_SPEC): Moved to config/sol2.h. (LINK_ARCH64_SPEC): Simplified. (LINK_ARCH_SPEC): Redefined config/sol2.h version for 64-bit support. (LINK_SPEC): Moved to config/sol2.h * config/sparc/sol2.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Moved to config/sol2.h. Use BITS_PER_WORD for size. (WINT_TYPE, WINT_TYPE_SIZE): Likewise. (HANDLE_PRAGMA_REDEFINE_EXTNAME): Likewise. (CPP_PREDEFINES): Removed OS-specific part handled by TARGET_OS_CPP_BUILTINS. (CPP_SUBTARGET_SPEC): Moved to config/sol2.h. (CPLUSPLUS_CPP_SPEC): Removed, handled by TARGET_OS_CPP_BUILTINS. (ASM_SPEC): Moved to config/sol2.h. (PREFERRED_DEBUGGING_TYPE): Likewise. (STARTFILE_SPEC, LIB_SPEC, LINK_SPEC): Likewise. (SWITCH_TAKES_ARG, STDC_0_IN_SYSTEM_HEADERS): Likewise. (TARGET_DEFAULT): Reordered to match config/sparc/sol2-bi.h version. (TRANSFER_FROM_TRAMPOLINE): Moved to config/sol2.h * config.gcc (i?86-*-solaris2*): Removed obsolete gas support. * config/i386/sol2gas.h: Removed. From-SVN: r54827
This commit is contained in:
parent
b6bb1d5618
commit
8433a25e2a
|
@ -1,3 +1,68 @@
|
||||||
|
2002-06-20 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||||
|
|
||||||
|
* config/sol2.h: New file.
|
||||||
|
* config.gcc (i?86-*-solaris2*): Include it before i386/sol2.h.
|
||||||
|
(sparc64-wrs-vxworks*): Include it before sparc/sol2.h.
|
||||||
|
(sparc-*-chorusos*): Likewise.
|
||||||
|
(sparc-*-elf*): Likewise.
|
||||||
|
(sparc-*-rtems*, sparc-*-rtemself*): Likewise.
|
||||||
|
(sparc64-*-solaris2*, sparcv9-*-solaris2*): Likewise.
|
||||||
|
(sparc-hal-solaris2*): Likewise.
|
||||||
|
(sparc-*-solaris2*): Likewise.
|
||||||
|
(sparclite-*-elf*): Likewise.
|
||||||
|
(sparc86x-*-elf*): Likewise.
|
||||||
|
(sparc64-*-elf*): Likewise.
|
||||||
|
|
||||||
|
* config/i386/sol2.h (PREFERRED_DEBUGGING_TYPE): Moved to
|
||||||
|
config/sol2.h.
|
||||||
|
(ASM_SPEC): Override config/sol2.h version for now.
|
||||||
|
Removed obsolete GAS_REJECTS_MINUS_S variant.
|
||||||
|
(WINT_TYPE, WINT_TYPE_SIZE): Moved to config/sol2.h.
|
||||||
|
(HANDLE_PRAGMA_REDEFINE_EXTNAME): Likewise.
|
||||||
|
(TARGET_OS_CPP_BUILTINS): Likewise.
|
||||||
|
Assert system=unix.
|
||||||
|
(CPP_SPEC): Simplified using new CPP_SUBTARGET_SPEC.
|
||||||
|
(LIB_SPEC, ENDFILE_SPEC, STARTFILE_SPEC, LINK_SPEC): Moved to
|
||||||
|
config/sol2.h.
|
||||||
|
(SWITCH_TAKES_ARG, STDC_0_IN_SYSTEM_HEADERS): Likewise.
|
||||||
|
(ASM_CPU_SPEC): Define.
|
||||||
|
(SUBTARGET_EXTRA_SPECS): Define.
|
||||||
|
|
||||||
|
* config/sparc/sol2-bi.h (LONG_DOUBLE_TYPE_SIZE): Removed, already
|
||||||
|
in config/sparc/sol2.h.
|
||||||
|
(ASM_SPEC): Moved to config/sol2.h.
|
||||||
|
(CPP_CPU_SPEC): Simplified.
|
||||||
|
(STARTFILE_SPEC32): Likewise, renamed to STARTFILE_ARCH32_SPEC for
|
||||||
|
consistency.
|
||||||
|
(STARTFILE_SPEC64): Renamed to STARTFILE_ARCH64_SPEC.
|
||||||
|
(STARTFILE_ARCH_SPEC): Use new names STARTFILE_ARCH32_SPEC,
|
||||||
|
STARTFILE_ARCH64_SPEC.
|
||||||
|
(STARTFILE_SPEC): Moved to config/sol2.h
|
||||||
|
(SUBTARGET_EXTRA_SPECS): Add startfile_arch.
|
||||||
|
(LINK_ARCH32_SPEC): Moved to config/sol2.h.
|
||||||
|
(LINK_ARCH64_SPEC): Simplified.
|
||||||
|
(LINK_ARCH_SPEC): Redefined config/sol2.h version for 64-bit support.
|
||||||
|
(LINK_SPEC): Moved to config/sol2.h
|
||||||
|
|
||||||
|
* config/sparc/sol2.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Moved to
|
||||||
|
config/sol2.h.
|
||||||
|
Use BITS_PER_WORD for size.
|
||||||
|
(WINT_TYPE, WINT_TYPE_SIZE): Likewise.
|
||||||
|
(HANDLE_PRAGMA_REDEFINE_EXTNAME): Likewise.
|
||||||
|
(CPP_PREDEFINES): Removed OS-specific part handled by
|
||||||
|
TARGET_OS_CPP_BUILTINS.
|
||||||
|
(CPP_SUBTARGET_SPEC): Moved to config/sol2.h.
|
||||||
|
(CPLUSPLUS_CPP_SPEC): Removed, handled by TARGET_OS_CPP_BUILTINS.
|
||||||
|
(ASM_SPEC): Moved to config/sol2.h.
|
||||||
|
(PREFERRED_DEBUGGING_TYPE): Likewise.
|
||||||
|
(STARTFILE_SPEC, LIB_SPEC, LINK_SPEC): Likewise.
|
||||||
|
(SWITCH_TAKES_ARG, STDC_0_IN_SYSTEM_HEADERS): Likewise.
|
||||||
|
(TARGET_DEFAULT): Reordered to match config/sparc/sol2-bi.h version.
|
||||||
|
(TRANSFER_FROM_TRAMPOLINE): Moved to config/sol2.h
|
||||||
|
|
||||||
|
* config.gcc (i?86-*-solaris2*): Removed obsolete gas support.
|
||||||
|
* config/i386/sol2gas.h: Removed.
|
||||||
|
|
||||||
Thu Jun 20 12:14:01 CEST 2002 Jan Hubicka <jh@suse.cz>
|
Thu Jun 20 12:14:01 CEST 2002 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
* i386.md (xorqi_1_slp, xorqi_2_slp): New patterns.
|
* i386.md (xorqi_1_slp, xorqi_2_slp): New patterns.
|
||||||
|
|
|
@ -1190,10 +1190,7 @@ i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
|
||||||
;;
|
;;
|
||||||
i[34567]86-*-solaris2*)
|
i[34567]86-*-solaris2*)
|
||||||
xm_defines="POSIX SMALL_ARG_MAX"
|
xm_defines="POSIX SMALL_ARG_MAX"
|
||||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sol2.h"
|
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h i386/sol2.h"
|
||||||
if test x$gas = xyes; then
|
|
||||||
tm_file="i386/sol2gas.h ${tm_file}"
|
|
||||||
fi
|
|
||||||
tmake_file="i386/t-sol2 t-svr4"
|
tmake_file="i386/t-sol2 t-svr4"
|
||||||
if test x$gnu_ld = xyes; then
|
if test x$gnu_ld = xyes; then
|
||||||
tmake_file="$tmake_file t-slibgcc-elf-ver"
|
tmake_file="$tmake_file t-slibgcc-elf-ver"
|
||||||
|
@ -2313,7 +2310,7 @@ sparc-tti-*)
|
||||||
xm_defines=POSIX
|
xm_defines=POSIX
|
||||||
;;
|
;;
|
||||||
sparc64-wrs-vxworks*)
|
sparc64-wrs-vxworks*)
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h sparc/biarch64.h gofast.h sparc/vxsparc64.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/biarch64.h gofast.h sparc/vxsparc64.h"
|
||||||
tmake_file="sparc/t-vxsparc64 sparc/t-crtfm"
|
tmake_file="sparc/t-vxsparc64 sparc/t-crtfm"
|
||||||
use_collect2=yes
|
use_collect2=yes
|
||||||
;;
|
;;
|
||||||
|
@ -2353,7 +2350,7 @@ sparc-*-bsd*)
|
||||||
tm_file="${tm_file} sparc/bsd.h"
|
tm_file="${tm_file} sparc/bsd.h"
|
||||||
;;
|
;;
|
||||||
sparc-*-chorusos*)
|
sparc-*-chorusos*)
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h chorus.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h chorus.h"
|
||||||
tmake_file="sparc/t-chorus-elf sparc/t-crtfm"
|
tmake_file="sparc/t-chorus-elf sparc/t-crtfm"
|
||||||
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
|
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
|
||||||
float_format=i64
|
float_format=i64
|
||||||
|
@ -2364,7 +2361,7 @@ sparc-*-chorusos*)
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
sparc-*-elf*)
|
sparc-*-elf*)
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h"
|
||||||
tmake_file="sparc/t-elf sparc/t-crtfm"
|
tmake_file="sparc/t-elf sparc/t-crtfm"
|
||||||
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
|
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
|
||||||
#float_format=i128
|
#float_format=i128
|
||||||
|
@ -2406,7 +2403,7 @@ sparc-*-rtemsaout*) # would otherwise be caught by sparc-*-rtems*
|
||||||
;;
|
;;
|
||||||
sparc-*-rtems*)
|
sparc-*-rtems*)
|
||||||
xm_defines=POSIX
|
xm_defines=POSIX
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
|
||||||
tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
|
tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
|
||||||
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
|
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
|
||||||
#float_format=i128
|
#float_format=i128
|
||||||
|
@ -2416,7 +2413,7 @@ sparc-*-rtems*)
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
sparc64-*-solaris2* | sparcv9-*-solaris2*)
|
sparc64-*-solaris2* | sparcv9-*-solaris2*)
|
||||||
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h"
|
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h"
|
||||||
if test x$gnu_ld = xyes; then
|
if test x$gnu_ld = xyes; then
|
||||||
tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
|
tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
|
||||||
fi
|
fi
|
||||||
|
@ -2448,7 +2445,7 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*)
|
||||||
;;
|
;;
|
||||||
sparc-hal-solaris2*)
|
sparc-hal-solaris2*)
|
||||||
xm_defines=POSIX
|
xm_defines=POSIX
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/hal.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/hal.h"
|
||||||
tmake_file="sparc/t-halos sparc/t-sol2 sparc/t-crtfm"
|
tmake_file="sparc/t-halos sparc/t-sol2 sparc/t-crtfm"
|
||||||
if test x$gnu_ld = xyes; then
|
if test x$gnu_ld = xyes; then
|
||||||
tm_file="${tm_file} sparc/sol2-gld.h"
|
tm_file="${tm_file} sparc/sol2-gld.h"
|
||||||
|
@ -2461,7 +2458,7 @@ sparc-hal-solaris2*)
|
||||||
thread_file='solaris'
|
thread_file='solaris'
|
||||||
;;
|
;;
|
||||||
sparc-*-solaris2*)
|
sparc-*-solaris2*)
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h"
|
||||||
if test x$gnu_ld = xyes; then
|
if test x$gnu_ld = xyes; then
|
||||||
tm_file="${tm_file} sparc/sol2-gld.h"
|
tm_file="${tm_file} sparc/sol2-gld.h"
|
||||||
fi
|
fi
|
||||||
|
@ -2545,7 +2542,7 @@ sparclite-*-aout*)
|
||||||
tmake_file=sparc/t-sparclite
|
tmake_file=sparc/t-sparclite
|
||||||
;;
|
;;
|
||||||
sparclite-*-elf*)
|
sparclite-*-elf*)
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h gofast.h sparc/liteelf.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h gofast.h sparc/liteelf.h"
|
||||||
tmake_file="sparc/t-sparclite sparc/t-crtfm"
|
tmake_file="sparc/t-sparclite sparc/t-crtfm"
|
||||||
extra_parts="crtbegin.o crtend.o"
|
extra_parts="crtbegin.o crtend.o"
|
||||||
;;
|
;;
|
||||||
|
@ -2554,7 +2551,7 @@ sparc86x-*-aout*)
|
||||||
tmake_file=sparc/t-sp86x
|
tmake_file=sparc/t-sp86x
|
||||||
;;
|
;;
|
||||||
sparc86x-*-elf*)
|
sparc86x-*-elf*)
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h gofast.h sparc/sp86x-elf.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h gofast.h sparc/sp86x-elf.h"
|
||||||
tmake_file="sparc/t-sp86x sparc/t-crtfm"
|
tmake_file="sparc/t-sp86x sparc/t-crtfm"
|
||||||
extra_parts="crtbegin.o crtend.o"
|
extra_parts="crtbegin.o crtend.o"
|
||||||
;;
|
;;
|
||||||
|
@ -2562,7 +2559,7 @@ sparc64-*-aout*)
|
||||||
tm_file="sparc/sparc.h aoutos.h sparc/aout.h sparc/sp64-aout.h"
|
tm_file="sparc/sparc.h aoutos.h sparc/aout.h sparc/sp64-aout.h"
|
||||||
;;
|
;;
|
||||||
sparc64-*-elf*)
|
sparc64-*-elf*)
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sp64-elf.h"
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h"
|
||||||
tmake_file="${tmake_file} sparc/t-crtfm"
|
tmake_file="${tmake_file} sparc/t-crtfm"
|
||||||
extra_parts="crtbegin.o crtend.o"
|
extra_parts="crtbegin.o crtend.o"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -20,36 +20,8 @@ along with GNU CC; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
|
||||||
/* We use stabs-in-elf for debugging, because that is what the native
|
|
||||||
toolchain uses. */
|
|
||||||
#undef PREFERRED_DEBUGGING_TYPE
|
|
||||||
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
|
||||||
|
|
||||||
#if ! GAS_REJECTS_MINUS_S
|
|
||||||
|
|
||||||
/*
|
|
||||||
Changed from config/svr4.h in the following ways:
|
|
||||||
|
|
||||||
- Removed -Yd (neither the sun bundled assembler nor gas accept it).
|
|
||||||
- Added "-s" so that stabs are not discarded.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#undef ASM_SPEC
|
|
||||||
#define ASM_SPEC \
|
|
||||||
"%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s"
|
|
||||||
|
|
||||||
#define CMOV_SUN_AS_SYNTAX 1
|
#define CMOV_SUN_AS_SYNTAX 1
|
||||||
|
|
||||||
#else /* GAS_REJECTS_MINUS_S */
|
|
||||||
|
|
||||||
/* Same as above, except for -s, unsupported by GNU as. */
|
|
||||||
#undef ASM_SPEC
|
|
||||||
#define ASM_SPEC \
|
|
||||||
"%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*}"
|
|
||||||
|
|
||||||
#endif /* GAS_REJECTS_MINUS_S */
|
|
||||||
|
|
||||||
/* The Solaris 2.0 x86 linker botches alignment of code sections.
|
/* The Solaris 2.0 x86 linker botches alignment of code sections.
|
||||||
It tries to align to a 16 byte boundary by padding with 0x00000090
|
It tries to align to a 16 byte boundary by padding with 0x00000090
|
||||||
ints, rather than 0x90 bytes (nop). This generates trash in the
|
ints, rather than 0x90 bytes (nop). This generates trash in the
|
||||||
|
@ -68,98 +40,26 @@ Boston, MA 02111-1307, USA. */
|
||||||
(flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \
|
(flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \
|
||||||
: DW_EH_PE_absptr)
|
: DW_EH_PE_absptr)
|
||||||
|
|
||||||
/* Solaris 2/Intel uses a wint_t different from the default, as on SPARC. */
|
|
||||||
#undef WINT_TYPE
|
|
||||||
#define WINT_TYPE "long int"
|
|
||||||
|
|
||||||
#undef WINT_TYPE_SIZE
|
|
||||||
#define WINT_TYPE_SIZE BITS_PER_WORD
|
|
||||||
|
|
||||||
#define HANDLE_PRAGMA_REDEFINE_EXTNAME 1
|
|
||||||
|
|
||||||
#define TARGET_OS_CPP_BUILTINS() \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
builtin_define_std ("unix"); \
|
|
||||||
builtin_define_std ("sun"); \
|
|
||||||
builtin_define ("__svr4__"); \
|
|
||||||
builtin_define ("__SVR4"); \
|
|
||||||
builtin_define ("__PRAGMA_REDEFINE_EXTNAME"); \
|
|
||||||
builtin_assert ("system=svr4"); \
|
|
||||||
/* For C++ we must add some additional macros \
|
|
||||||
required by the C++ standard library. */ \
|
|
||||||
if (c_language == clk_cplusplus) \
|
|
||||||
{ \
|
|
||||||
builtin_define ("_XOPEN_SOURCE=500"); \
|
|
||||||
builtin_define ("_LARGEFILE_SOURCE=1"); \
|
|
||||||
builtin_define ("_LARGEFILE64_SOURCE=1"); \
|
|
||||||
builtin_define ("-D__EXTENSIONS__"); \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
/* Solaris 2/Intel as chokes on #line directives. */
|
/* Solaris 2/Intel as chokes on #line directives. */
|
||||||
#undef CPP_SPEC
|
#undef CPP_SPEC
|
||||||
#define CPP_SPEC \
|
#define CPP_SPEC "%{.S:-P} %(cpp_subtarget)"
|
||||||
"%{.S:-P} \
|
|
||||||
%{pthreads:-D_REENTRANT -D_PTHREADS} \
|
|
||||||
%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
|
|
||||||
%{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
|
|
||||||
|
|
||||||
#undef LIB_SPEC
|
/* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler
|
||||||
#define LIB_SPEC \
|
gives many warnings: R_386_32 relocation is used for symbol ".text". */
|
||||||
"%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
|
#undef ASM_SPEC
|
||||||
%{!shared:\
|
#define ASM_SPEC "\
|
||||||
%{!symbolic:\
|
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
|
||||||
%{pthreads:-lpthread} \
|
%(asm_cpu) \
|
||||||
%{!pthreads:%{threads:-lthread}} \
|
"
|
||||||
-lc}}"
|
|
||||||
|
|
||||||
#undef ENDFILE_SPEC
|
#define ASM_CPU_SPEC ""
|
||||||
#define ENDFILE_SPEC "crtend.o%s %{pg:crtn.o%s}%{!pg:crtn.o%s}"
|
|
||||||
|
|
||||||
#undef STARTFILE_SPEC
|
#undef SUBTARGET_EXTRA_SPECS
|
||||||
#define STARTFILE_SPEC "%{!shared: \
|
#define SUBTARGET_EXTRA_SPECS \
|
||||||
%{!symbolic: \
|
{ "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
|
||||||
%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
|
{ "asm_cpu", ASM_CPU_SPEC }, \
|
||||||
%{pg:gmon.o%s} crti.o%s \
|
{ "startfile_arch", STARTFILE_ARCH_SPEC }, \
|
||||||
%{ansi:values-Xc.o%s} \
|
{ "link_arch", LINK_ARCH_SPEC }
|
||||||
%{!ansi:values-Xa.o%s} \
|
|
||||||
crtbegin.o%s"
|
|
||||||
|
|
||||||
/* This should be the same as in svr4.h, except with -R added. */
|
|
||||||
#undef LINK_SPEC
|
|
||||||
#define LINK_SPEC \
|
|
||||||
"%{h*} %{v:-V} \
|
|
||||||
%{b} %{Wl,*:%*} \
|
|
||||||
%{static:-dn -Bstatic} \
|
|
||||||
%{shared:-G -dy %{!mimpure-text:-z text}} \
|
|
||||||
%{symbolic:-Bsymbolic -G -dy -z text} \
|
|
||||||
%{G:-G} \
|
|
||||||
%{YP,*} \
|
|
||||||
%{R*} \
|
|
||||||
%{compat-bsd: \
|
|
||||||
%{!YP,*:%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!pg:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
|
|
||||||
-R /usr/ucblib} \
|
|
||||||
%{!compat-bsd: \
|
|
||||||
%{!YP,*:%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!pg:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!p:-Y P,/usr/ccs/lib:/usr/lib}}}} \
|
|
||||||
%{Qy:} %{!Qn:-Qy}"
|
|
||||||
|
|
||||||
/* This defines which switch letters take arguments.
|
|
||||||
It is as in svr4.h but with -R added. */
|
|
||||||
|
|
||||||
#undef SWITCH_TAKES_ARG
|
|
||||||
#define SWITCH_TAKES_ARG(CHAR) \
|
|
||||||
(DEFAULT_SWITCH_TAKES_ARG(CHAR) \
|
|
||||||
|| (CHAR) == 'R' \
|
|
||||||
|| (CHAR) == 'h' \
|
|
||||||
|| (CHAR) == 'z')
|
|
||||||
|
|
||||||
#define STDC_0_IN_SYSTEM_HEADERS 1
|
|
||||||
|
|
||||||
#undef LOCAL_LABEL_PREFIX
|
#undef LOCAL_LABEL_PREFIX
|
||||||
#define LOCAL_LABEL_PREFIX "."
|
#define LOCAL_LABEL_PREFIX "."
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* Definitions of target machine for GNU compiler, for SPARC running
|
|
||||||
Solaris 2 with GNU as up to 2.9.5.0.12.
|
|
||||||
|
|
||||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef GAS_REJECTS_MINUS_S
|
|
||||||
#define GAS_REJECTS_MINUS_S 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Assume sol2.h will be included afterwards. */
|
|
|
@ -0,0 +1,207 @@
|
||||||
|
/* Operating system specific defines to be used when targeting GCC for any
|
||||||
|
Solaris 2 system.
|
||||||
|
Copyright 2002 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. */
|
||||||
|
|
||||||
|
/* We use stabs-in-elf for debugging, because that is what the native
|
||||||
|
toolchain uses. */
|
||||||
|
#undef PREFERRED_DEBUGGING_TYPE
|
||||||
|
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||||
|
|
||||||
|
/* Solaris 2 (at least as of 2.5.1) uses a 32-bit wchar_t. */
|
||||||
|
#undef WCHAR_TYPE
|
||||||
|
#define WCHAR_TYPE "long int"
|
||||||
|
|
||||||
|
#undef WCHAR_TYPE_SIZE
|
||||||
|
#define WCHAR_TYPE_SIZE BITS_PER_WORD
|
||||||
|
|
||||||
|
/* Solaris 2 uses a wint_t different from the default. This is required
|
||||||
|
by the SCD 2.4.1, p. 6-83, Figure 6-66. */
|
||||||
|
#undef WINT_TYPE
|
||||||
|
#define WINT_TYPE "long int"
|
||||||
|
|
||||||
|
#undef WINT_TYPE_SIZE
|
||||||
|
#define WINT_TYPE_SIZE BITS_PER_WORD
|
||||||
|
|
||||||
|
#define HANDLE_PRAGMA_REDEFINE_EXTNAME 1
|
||||||
|
|
||||||
|
/* ??? Note: in order for -compat-bsd to work fully,
|
||||||
|
we must somehow arrange to fixincludes /usr/ucbinclude
|
||||||
|
and put the result in $(libsubdir)/ucbinclude. */
|
||||||
|
|
||||||
|
#undef CPP_SUBTARGET_SPEC
|
||||||
|
#define CPP_SUBTARGET_SPEC "\
|
||||||
|
%{pthreads:-D_REENTRANT -D_PTHREADS} \
|
||||||
|
%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
|
||||||
|
%{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \
|
||||||
|
"
|
||||||
|
|
||||||
|
/* Names to predefine in the preprocessor for this target machine. */
|
||||||
|
#define TARGET_OS_CPP_BUILTINS() \
|
||||||
|
do { \
|
||||||
|
builtin_define_std ("unix"); \
|
||||||
|
builtin_define_std ("sun"); \
|
||||||
|
builtin_define ("__svr4__"); \
|
||||||
|
builtin_define ("__SVR4"); \
|
||||||
|
builtin_define ("__PRAGMA_REDEFINE_EXTNAME"); \
|
||||||
|
builtin_assert ("system=unix"); \
|
||||||
|
builtin_assert ("system=svr4"); \
|
||||||
|
/* For C++ we need to add some additional macro \
|
||||||
|
definitions required by the C++ standard \
|
||||||
|
library. */ \
|
||||||
|
if (c_language == clk_cplusplus) \
|
||||||
|
{ \
|
||||||
|
builtin_define ("_XOPEN_SOURCE=500"); \
|
||||||
|
builtin_define ("_LARGEFILE_SOURCE=1"); \
|
||||||
|
builtin_define ("_LARGEFILE64_SOURCE=1"); \
|
||||||
|
builtin_define ("__EXTENSIONS__"); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
|
||||||
|
It's safe to pass -s always, even if -g is not used. */
|
||||||
|
#undef ASM_SPEC
|
||||||
|
#define ASM_SPEC "\
|
||||||
|
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
|
||||||
|
%{fpic:-K PIC} %{fPIC:-K PIC} \
|
||||||
|
%(asm_cpu) \
|
||||||
|
"
|
||||||
|
|
||||||
|
/* We don't use the standard LIB_SPEC only because we don't yet support c++. */
|
||||||
|
#undef LIB_SPEC
|
||||||
|
#define LIB_SPEC \
|
||||||
|
"%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
|
||||||
|
%{!shared:\
|
||||||
|
%{!symbolic:\
|
||||||
|
%{pthreads:-lpthread} \
|
||||||
|
%{!pthreads:%{threads:-lthread}} \
|
||||||
|
%{p|pg:-ldl} -lc}}"
|
||||||
|
|
||||||
|
#undef ENDFILE_SPEC
|
||||||
|
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
||||||
|
|
||||||
|
/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */
|
||||||
|
#undef STARTFILE_SPEC
|
||||||
|
#define STARTFILE_SPEC "%{!shared: \
|
||||||
|
%{!symbolic: \
|
||||||
|
%{p:mcrt1.o%s} \
|
||||||
|
%{!p: \
|
||||||
|
%{pg:gcrt1.o%s gmon.o%s} \
|
||||||
|
%{!pg:crt1.o%s}}}} \
|
||||||
|
crti.o%s %(startfile_arch) \
|
||||||
|
crtbegin.o%s"
|
||||||
|
|
||||||
|
#undef STARTFILE_ARCH32_SPEC
|
||||||
|
#define STARTFILE_ARCH32_SPEC "%{ansi:values-Xc.o%s} \
|
||||||
|
%{!ansi:values-Xa.o%s}"
|
||||||
|
|
||||||
|
#undef STARTFILE_ARCH_SPEC
|
||||||
|
#define STARTFILE_ARCH_SPEC STARTFILE_ARCH32_SPEC
|
||||||
|
|
||||||
|
#undef LINK_ARCH32_SPEC
|
||||||
|
#define LINK_ARCH32_SPEC \
|
||||||
|
"%{G:-G} \
|
||||||
|
%{YP,*} \
|
||||||
|
%{R*} \
|
||||||
|
%{compat-bsd: \
|
||||||
|
%{!YP,*:%{p|pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
||||||
|
%{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
|
||||||
|
-R /usr/ucblib} \
|
||||||
|
%{!compat-bsd: \
|
||||||
|
%{!YP,*:%{p|pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
||||||
|
%{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}}"
|
||||||
|
|
||||||
|
#undef LINK_ARCH_SPEC
|
||||||
|
#define LINK_ARCH_SPEC LINK_ARCH32_SPEC
|
||||||
|
|
||||||
|
/* This should be the same as in svr4.h, except with -R added. */
|
||||||
|
#undef LINK_SPEC
|
||||||
|
#define LINK_SPEC \
|
||||||
|
"%{h*} %{v:-V} \
|
||||||
|
%{b} %{Wl,*:%*} \
|
||||||
|
%{static:-dn -Bstatic} \
|
||||||
|
%{shared:-G -dy %{!mimpure-text:-z text}} \
|
||||||
|
%{symbolic:-Bsymbolic -G -dy -z text} \
|
||||||
|
%(link_arch) \
|
||||||
|
%{Qy:} %{!Qn:-Qy}"
|
||||||
|
|
||||||
|
/* This defines which switch letters take arguments.
|
||||||
|
It is as in svr4.h but with -R added. */
|
||||||
|
#undef SWITCH_TAKES_ARG
|
||||||
|
#define SWITCH_TAKES_ARG(CHAR) \
|
||||||
|
(DEFAULT_SWITCH_TAKES_ARG(CHAR) \
|
||||||
|
|| (CHAR) == 'R' \
|
||||||
|
|| (CHAR) == 'h' \
|
||||||
|
|| (CHAR) == 'z')
|
||||||
|
|
||||||
|
#define STDC_0_IN_SYSTEM_HEADERS 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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-bit 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 \
|
||||||
|
\
|
||||||
|
/* #define STACK_PROT_RWX (PROT_READ | PROT_WRITE | PROT_EXEC) */ \
|
||||||
|
\
|
||||||
|
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 /* STACK_PROT_RWX */) \
|
||||||
|
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); \
|
||||||
|
\
|
||||||
|
if (mprotect (page, end - page, 7 /* STACK_PROT_RWX */) < 0) \
|
||||||
|
perror ("mprotect of trampoline code"); \
|
||||||
|
} \
|
||||||
|
}
|
|
@ -5,9 +5,6 @@
|
||||||
#undef SPARC_DEFAULT_CMODEL
|
#undef SPARC_DEFAULT_CMODEL
|
||||||
#define SPARC_DEFAULT_CMODEL CM_MEDANY
|
#define SPARC_DEFAULT_CMODEL CM_MEDANY
|
||||||
|
|
||||||
#undef LONG_DOUBLE_TYPE_SIZE
|
|
||||||
#define LONG_DOUBLE_TYPE_SIZE 128
|
|
||||||
|
|
||||||
#define AS_SPARC64_FLAG "-xarch=v9"
|
#define AS_SPARC64_FLAG "-xarch=v9"
|
||||||
|
|
||||||
#undef ASM_CPU32_DEFAULT_SPEC
|
#undef ASM_CPU32_DEFAULT_SPEC
|
||||||
|
@ -30,15 +27,6 @@
|
||||||
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a"
|
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
|
|
||||||
It's safe to pass -s always, even if -g is not used. */
|
|
||||||
#undef ASM_SPEC
|
|
||||||
#define ASM_SPEC "\
|
|
||||||
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
|
|
||||||
%{fpic:-K PIC} %{fPIC:-K PIC} \
|
|
||||||
%(asm_cpu)\
|
|
||||||
"
|
|
||||||
|
|
||||||
#if DEFAULT_ARCH32_P
|
#if DEFAULT_ARCH32_P
|
||||||
#define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}"
|
#define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}"
|
||||||
#define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}"
|
#define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}"
|
||||||
|
@ -50,17 +38,14 @@
|
||||||
#undef CPP_CPU_SPEC
|
#undef CPP_CPU_SPEC
|
||||||
#define CPP_CPU_SPEC "\
|
#define CPP_CPU_SPEC "\
|
||||||
%{mcypress:} \
|
%{mcypress:} \
|
||||||
%{msparclite:-D__sparclite__} \
|
%{msparclite|mf930|mf934:-D__sparclite__} \
|
||||||
%{mf930:-D__sparclite__} %{mf934:-D__sparclite__} \
|
|
||||||
%{mv8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
%{mv8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
||||||
%{msupersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
%{msupersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
||||||
%{mcpu=sparclet:-D__sparclet__} %{mcpu=tsc701:-D__sparclet__} \
|
%{mcpu=sparclet|mcpu=tsc701:-D__sparclet__} \
|
||||||
%{mcpu=sparclite:-D__sparclite__} \
|
%{mcpu=sparclite|mcpu-f930|mcpu=f934:-D__sparclite__} \
|
||||||
%{mcpu=f930:-D__sparclite__} %{mcpu=f934:-D__sparclite__} \
|
|
||||||
%{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
%{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
||||||
%{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
%{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
||||||
%{mcpu=v9:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
%{mcpu=v9|mcpu=ultrasparc:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
||||||
%{mcpu=ultrasparc:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
|
|
||||||
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
|
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
@ -72,36 +57,24 @@
|
||||||
%{!mcpu*:%(asm_cpu_default)} \
|
%{!mcpu*:%(asm_cpu_default)} \
|
||||||
"
|
"
|
||||||
|
|
||||||
#define STARTFILE_SPEC32 "\
|
#define STARTFILE_ARCH64_SPEC "\
|
||||||
%{ansi:values-Xc.o%s} \
|
|
||||||
%{!ansi:values-Xa.o%s}"
|
|
||||||
|
|
||||||
#define STARTFILE_SPEC64 "\
|
|
||||||
%{ansi:/usr/lib/sparcv9/values-Xc.o%s} \
|
%{ansi:/usr/lib/sparcv9/values-Xc.o%s} \
|
||||||
%{!ansi:/usr/lib/sparcv9/values-Xa.o%s}"
|
%{!ansi:/usr/lib/sparcv9/values-Xa.o%s}"
|
||||||
|
|
||||||
|
#undef STARTFILE_ARCH_SPEC
|
||||||
|
|
||||||
#if DEFAULT_ARCH32_P
|
#if DEFAULT_ARCH32_P
|
||||||
#define STARTFILE_ARCH_SPEC "\
|
#define STARTFILE_ARCH_SPEC "\
|
||||||
%{m32:" STARTFILE_SPEC32 "} \
|
%{m32:" STARTFILE_ARCH32_SPEC "} \
|
||||||
%{m64:" STARTFILE_SPEC64 "} \
|
%{m64:" STARTFILE_ARCH64_SPEC "} \
|
||||||
%{!m32:%{!m64:" STARTFILE_SPEC32 "}}"
|
%{!m32:%{!m64:" STARTFILE_ARCH32_SPEC "}}"
|
||||||
#else
|
#else
|
||||||
#define STARTFILE_ARCH_SPEC "\
|
#define STARTFILE_ARCH_SPEC "\
|
||||||
%{m32:" STARTFILE_SPEC32 "} \
|
%{m32:" STARTFILE_ARCH32_SPEC "} \
|
||||||
%{m64:" STARTFILE_SPEC64 "} \
|
%{m64:" STARTFILE_ARCH64_SPEC "} \
|
||||||
%{!m32:%{!m64:" STARTFILE_SPEC64 "}}"
|
%{!m32:%{!m64:" STARTFILE_ARCH64_SPEC "}}"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef STARTFILE_SPEC
|
|
||||||
#define STARTFILE_SPEC "%{!shared: \
|
|
||||||
%{!symbolic: \
|
|
||||||
%{p:mcrt1.o%s} \
|
|
||||||
%{!p: \
|
|
||||||
%{pg:gcrt1.o%s gmon.o%s} \
|
|
||||||
%{!pg:crt1.o%s}}}} \
|
|
||||||
crti.o%s " STARTFILE_ARCH_SPEC " \
|
|
||||||
crtbegin.o%s"
|
|
||||||
|
|
||||||
#undef CPP_CPU_DEFAULT_SPEC
|
#undef CPP_CPU_DEFAULT_SPEC
|
||||||
#define CPP_CPU_DEFAULT_SPEC \
|
#define CPP_CPU_DEFAULT_SPEC \
|
||||||
(DEFAULT_ARCH32_P ? "\
|
(DEFAULT_ARCH32_P ? "\
|
||||||
|
@ -170,41 +143,30 @@
|
||||||
|
|
||||||
#undef SUBTARGET_EXTRA_SPECS
|
#undef SUBTARGET_EXTRA_SPECS
|
||||||
#define SUBTARGET_EXTRA_SPECS \
|
#define SUBTARGET_EXTRA_SPECS \
|
||||||
|
{ "startfile_arch", STARTFILE_ARCH_SPEC }, \
|
||||||
{ "link_arch32", LINK_ARCH32_SPEC }, \
|
{ "link_arch32", LINK_ARCH32_SPEC }, \
|
||||||
{ "link_arch64", LINK_ARCH64_SPEC }, \
|
{ "link_arch64", LINK_ARCH64_SPEC }, \
|
||||||
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
||||||
{ "link_arch", LINK_ARCH_SPEC },
|
{ "link_arch", LINK_ARCH_SPEC },
|
||||||
|
|
||||||
/* This should be the same as in svr4.h, except with -R added. */
|
/*
|
||||||
#define LINK_ARCH32_SPEC \
|
* This should be the same as in sol2.h, except with "/sparcv9"
|
||||||
"%{G:-G} \
|
* appended to the paths and /usr/ccs/lib is no longer necessary
|
||||||
%{YP,*} \
|
*/
|
||||||
%{R*} \
|
|
||||||
%{compat-bsd: \
|
|
||||||
%{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
|
|
||||||
-R /usr/ucblib} \
|
|
||||||
%{!compat-bsd: \
|
|
||||||
%{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}}"
|
|
||||||
|
|
||||||
#define LINK_ARCH64_SPEC \
|
#define LINK_ARCH64_SPEC \
|
||||||
"%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \
|
"%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \
|
||||||
%{G:-G} \
|
%{G:-G} \
|
||||||
%{YP,*} \
|
%{YP,*} \
|
||||||
%{R*} \
|
%{R*} \
|
||||||
%{compat-bsd: \
|
%{compat-bsd: \
|
||||||
%{!YP,*:%{p:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
|
%{!YP,*:%{p|pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
|
||||||
%{pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
|
|
||||||
%{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}} \
|
%{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}} \
|
||||||
-R /usr/ucblib} \
|
-R /usr/ucblib} \
|
||||||
%{!compat-bsd: \
|
%{!compat-bsd: \
|
||||||
%{!YP,*:%{p:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
|
%{!YP,*:%{p|pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
|
||||||
%{pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
|
|
||||||
%{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}}"
|
%{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}}"
|
||||||
|
|
||||||
|
#undef LINK_ARCH_SPEC
|
||||||
#define LINK_ARCH_SPEC "\
|
#define LINK_ARCH_SPEC "\
|
||||||
%{m32:%(link_arch32)} \
|
%{m32:%(link_arch32)} \
|
||||||
%{m64:%(link_arch64)} \
|
%{m64:%(link_arch64)} \
|
||||||
|
@ -214,16 +176,6 @@
|
||||||
#define LINK_ARCH_DEFAULT_SPEC \
|
#define LINK_ARCH_DEFAULT_SPEC \
|
||||||
(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
|
(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
|
||||||
|
|
||||||
#undef LINK_SPEC
|
|
||||||
#define LINK_SPEC \
|
|
||||||
"%{h*} %{v:-V} \
|
|
||||||
%{b} %{Wl,*:%*} \
|
|
||||||
%{static:-dn -Bstatic} \
|
|
||||||
%{shared:-G -dy %{!mimpure-text:-z text}} \
|
|
||||||
%{symbolic:-Bsymbolic -G -dy -z text} \
|
|
||||||
%(link_arch) \
|
|
||||||
%{Qy:} %{!Qn:-Qy}"
|
|
||||||
|
|
||||||
#undef CC1_SPEC
|
#undef CC1_SPEC
|
||||||
#if DEFAULT_ARCH32_P
|
#if DEFAULT_ARCH32_P
|
||||||
#define CC1_SPEC "\
|
#define CC1_SPEC "\
|
||||||
|
|
|
@ -23,51 +23,8 @@ Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
|
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
|
||||||
|
|
||||||
/* Solaris 2 (at least as of 2.5.1) uses a 32-bit wchar_t. */
|
|
||||||
#undef WCHAR_TYPE
|
|
||||||
#define WCHAR_TYPE "long int"
|
|
||||||
|
|
||||||
#undef WCHAR_TYPE_SIZE
|
|
||||||
#define WCHAR_TYPE_SIZE 32
|
|
||||||
|
|
||||||
/* Solaris 2 uses a wint_t different from the default. This is required
|
|
||||||
by the SCD 2.4.1, p. 6-83, Figure 6-66. */
|
|
||||||
#undef WINT_TYPE
|
|
||||||
#define WINT_TYPE "long int"
|
|
||||||
|
|
||||||
#undef WINT_TYPE_SIZE
|
|
||||||
#define WINT_TYPE_SIZE 32
|
|
||||||
|
|
||||||
#define HANDLE_PRAGMA_REDEFINE_EXTNAME 1
|
|
||||||
|
|
||||||
#undef CPP_PREDEFINES
|
#undef CPP_PREDEFINES
|
||||||
#define CPP_PREDEFINES \
|
#define CPP_PREDEFINES "-Dsparc"
|
||||||
"-Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME \
|
|
||||||
-Asystem=unix -Asystem=svr4"
|
|
||||||
|
|
||||||
#undef CPP_SUBTARGET_SPEC
|
|
||||||
#define CPP_SUBTARGET_SPEC "\
|
|
||||||
%{pthreads:-D_REENTRANT -D_PTHREADS} \
|
|
||||||
%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
|
|
||||||
%{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \
|
|
||||||
"
|
|
||||||
|
|
||||||
/* For C++ we need to add some additional macro definitions required
|
|
||||||
by the C++ standard library. */
|
|
||||||
#define CPLUSPLUS_CPP_SPEC "\
|
|
||||||
-D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
|
|
||||||
-D__EXTENSIONS__ \
|
|
||||||
%(cpp) \
|
|
||||||
"
|
|
||||||
|
|
||||||
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
|
|
||||||
It's safe to pass -s always, even if -g is not used. */
|
|
||||||
#undef ASM_SPEC
|
|
||||||
#define ASM_SPEC "\
|
|
||||||
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
|
|
||||||
%{fpic:-K PIC} %{fPIC:-K PIC} \
|
|
||||||
%(asm_cpu) \
|
|
||||||
"
|
|
||||||
|
|
||||||
/* This is here rather than in sparc.h because it's not known what
|
/* This is here rather than in sparc.h because it's not known what
|
||||||
other assemblers will accept. */
|
other assemblers will accept. */
|
||||||
|
@ -98,11 +55,6 @@ Boston, MA 02111-1307, USA. */
|
||||||
#define DBX_REGISTER_NUMBER(REGNO) \
|
#define DBX_REGISTER_NUMBER(REGNO) \
|
||||||
(TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : 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. */
|
/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
|
||||||
#undef ASM_OUTPUT_SKIP
|
#undef ASM_OUTPUT_SKIP
|
||||||
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
||||||
|
@ -135,72 +87,12 @@ Boston, MA 02111-1307, USA. */
|
||||||
sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
|
sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
|
||||||
|
|
||||||
|
|
||||||
/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
|
|
||||||
We don't use the standard LIB_SPEC only because we don't yet support c++ */
|
|
||||||
|
|
||||||
#undef STARTFILE_SPEC
|
|
||||||
#define STARTFILE_SPEC "%{!shared: \
|
|
||||||
%{!symbolic: \
|
|
||||||
%{p:mcrt1.o%s} \
|
|
||||||
%{!p: \
|
|
||||||
%{pg:gcrt1.o%s gmon.o%s} \
|
|
||||||
%{!pg:crt1.o%s}}}} \
|
|
||||||
crti.o%s \
|
|
||||||
%{ansi:values-Xc.o%s} \
|
|
||||||
%{!ansi:values-Xa.o%s} \
|
|
||||||
crtbegin.o%s"
|
|
||||||
|
|
||||||
/* ??? Note: in order for -compat-bsd to work fully,
|
|
||||||
we must somehow arrange to fixincludes /usr/ucbinclude
|
|
||||||
and put the result in $(libsubdir)/ucbinclude. */
|
|
||||||
|
|
||||||
#undef LIB_SPEC
|
|
||||||
#define LIB_SPEC \
|
|
||||||
"%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
|
|
||||||
%{!shared:\
|
|
||||||
%{!symbolic:\
|
|
||||||
%{pthreads:-lpthread} \
|
|
||||||
%{!pthreads:%{threads:-lthread}} \
|
|
||||||
%{p|pg:-ldl} -lc}}"
|
|
||||||
|
|
||||||
#undef ENDFILE_SPEC
|
#undef ENDFILE_SPEC
|
||||||
#define ENDFILE_SPEC \
|
#define ENDFILE_SPEC \
|
||||||
"%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
|
"%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
|
||||||
crtend.o%s crtn.o%s"
|
crtend.o%s crtn.o%s"
|
||||||
|
|
||||||
/* This should be the same as in svr4.h, except with -R added. */
|
|
||||||
#undef LINK_SPEC
|
|
||||||
#define LINK_SPEC \
|
|
||||||
"%{h*} %{v:-V} \
|
|
||||||
%{b} %{Wl,*:%*} \
|
|
||||||
%{static:-dn -Bstatic} \
|
|
||||||
%{shared:-G -dy %{!mimpure-text:-z text}} \
|
|
||||||
%{symbolic:-Bsymbolic -G -dy -z text} \
|
|
||||||
%{G:-G} \
|
|
||||||
%{YP,*} \
|
|
||||||
%{R*} \
|
|
||||||
%{compat-bsd: \
|
|
||||||
%{!YP,*:%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!pg:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
|
|
||||||
-R /usr/ucblib} \
|
|
||||||
%{!compat-bsd: \
|
|
||||||
%{!YP,*:%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!pg:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
|
|
||||||
%{!p:-Y P,/usr/ccs/lib:/usr/lib}}}} \
|
|
||||||
%{Qy:} %{!Qn:-Qy}"
|
|
||||||
|
|
||||||
/* This defines which switch letters take arguments.
|
|
||||||
It is as in svr4.h but with -R added. */
|
|
||||||
|
|
||||||
#undef SWITCH_TAKES_ARG
|
|
||||||
#define SWITCH_TAKES_ARG(CHAR) \
|
|
||||||
(DEFAULT_SWITCH_TAKES_ARG(CHAR) \
|
|
||||||
|| (CHAR) == 'R' \
|
|
||||||
|| (CHAR) == 'h' \
|
|
||||||
|| (CHAR) == 'x' \
|
|
||||||
|| (CHAR) == 'z')
|
|
||||||
|
|
||||||
/* Select a format to encode pointers in exception handling data. CODE
|
/* 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
|
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
|
||||||
true if the symbol may be affected by dynamic relocations.
|
true if the symbol may be affected by dynamic relocations.
|
||||||
|
@ -221,8 +113,6 @@ Boston, MA 02111-1307, USA. */
|
||||||
/* But indicate that it isn't supported by the hardware. */
|
/* But indicate that it isn't supported by the hardware. */
|
||||||
#define WIDEST_HARDWARE_FP_SIZE 64
|
#define WIDEST_HARDWARE_FP_SIZE 64
|
||||||
|
|
||||||
#define STDC_0_IN_SYSTEM_HEADERS 1
|
|
||||||
|
|
||||||
#define MULDI3_LIBCALL "__mul64"
|
#define MULDI3_LIBCALL "__mul64"
|
||||||
#define DIVDI3_LIBCALL "__div64"
|
#define DIVDI3_LIBCALL "__div64"
|
||||||
#define UDIVDI3_LIBCALL "__udiv64"
|
#define UDIVDI3_LIBCALL "__udiv64"
|
||||||
|
@ -249,56 +139,4 @@ Boston, MA 02111-1307, USA. */
|
||||||
/* Solaris allows 64 bit out and global registers in 32 bit mode.
|
/* Solaris allows 64 bit out and global registers in 32 bit mode.
|
||||||
sparc_override_options will disable V8+ if not generating V9 code. */
|
sparc_override_options will disable V8+ if not generating V9 code. */
|
||||||
#undef TARGET_DEFAULT
|
#undef TARGET_DEFAULT
|
||||||
#define TARGET_DEFAULT (MASK_FPU + MASK_V8PLUS + MASK_LONG_DOUBLE_128)
|
#define TARGET_DEFAULT (MASK_V8PLUS + MASK_FPU + MASK_LONG_DOUBLE_128)
|
||||||
|
|
||||||
/*
|
|
||||||
* 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"); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue