This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.0 PATCH RFC: Major Solaris 2 configuration cleanup
- To: gcc-patches at gcc dot gnu dot org
- Subject: 3.0 PATCH RFC: Major Solaris 2 configuration cleanup
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Date: Tue, 29 May 2001 02:31:24 +0200 (MEST)
- Cc: Paul Eggert <eggert at twinsun dot com>, Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
I'd like to get some comments on the patch below. While trying to build
various Solaris 2 configurations (i386-sun-solaris2.8,
sparc-sun-solaris2.5.1, sparc-sun-solaris2.8 with and without bi-arch -m64
support, and bi-arch sparcv9-sun-solaris2.8), I noticed that there is both
a lot of duplication between the various config files as well as various
omissions and inconsistencies.
The following patch tries to clean up here, moving as much as possible to a
common config/sol2.h file.
If this is in scope for 3.0, I'll continue working on this now, as I
haven't even tried bootstrapping with this patch yet. If this is clearly
out of scope for 3.0, I'd appreciate any comments nonetheless, but will
most like defer further work on this patch until 3.0 is out, since I don't
want to touch the trunk right now.
One question about proper config file style up front: there seem to be two
lines of thought here, one having the config files include others and
config.gcc only specifying the last (most specific one) in the chain, the
other specifying the whole chain in config.gcc and no config file including
any other, if at all possible. I've mostly followed the second one here,
but will certainly adapt to whatever is considered right.
Besides, I've completely ignored the Solaris 2/PowerPC configuration. It's
both completely different from the others, long obsolete (there was only a
Solaris 2.5.1/PPC release some years ago) and already removed on the trunk.
A couple of specific comments and questions:
* I've moved the TRANSFER_FROM_TRAMPOLINE from sparc/sol2.h to sol2.h since
this code contains nothing sparc specific. It may be that the i?86
hardware doesn't support non-executable stacks right now (I don't know
and haven't checked), but some future Solaris 2 port (maybe Solaris
9/IA64?) might.
Besides, I've avoided magic constants in the code and replaced them by
the appropriate defines.
* i386/sol2gas.h and GAS_REJECTS_MINUS_S are gone. This file supports a
long-obsolete version of gas (2.9.5.0.12). Since anyone can easily use
the vendor as or upgrade to a newer binutils version (which might well be
required for proper DWARF-2/EH support anyway), I don't think it's useful
keeping this cruft. If this should be considered desirable nonetheless,
I suggest turning this into an autoconf test instead.
* i386/sol2.h: LIB_SPEC lacked %{p|pg:-ldl}. While I had posted the
corresponding patch to sparc/sol2.h, this didn't get applied here, while
it is certainly needed and Forte 6 U2 cc passes it on i386 as well. This
is one of the reasons for this cleanup.
* i386/sol2.h: ENDFILE_SPEC contained an interesting no-op:
%{pg:crtn.o%s}%{!pg:crtn.o%s}
Having expanded this into a plain crtn.o%s, the spec is again identical
between sparc and i386.
* i386/sol2.h, sparc/sol2.h: SWITCH_TAKES_ARG contains 'x' on sparc, but
misses it on i386. It's almost certainly superfluous, since -x<language>
is already taken care of by toplev.c, so I've moved the i386 version to
the generic sol2.h.
* Several sparc files define LINKER_DOES_NOT_WORK_WITH_DWARF2. I have no
idea what specific problem is the root of this define, and couldn't find
anything in the mail archives. I'd like to have an autoconf test for the
underlying problem to see if it affects Solaris 2/Intel as well and
whether it's fixed in some later Solaris version, but certainly need a
testcase for this.
* ASM_SPEC: The i386 version lacked %{fpic:-K PIC} %{fPIC:-K PIC}, while
native i386 as supports this. Almost certainly an oversight!
* sparc/sol2-sld-64.h: STARTFILE_ARCH_SPEC in the non-SPARC_BI_ARCH case
was STARTFILE_SPEC32, contrary to the comment that states
/usr/lib/sparcv9/!? Almost certainly wrong, too.
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Email: ro@TechFak.Uni-Bielefeld.DE
Tue May 29 00:54:23 2001 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/sparc/sol2.h: Don't include sparc/sysv4.h here.
(CPP_SUBTARGET_SPEC): Moved to config/sol2.h.
(ASM_SPEC): Likewise.
(PREFERRED_DEBUGGING_TYPE): Likewise.
(STARTFILE_SPEC): Likewise.
(LIB_SPEC): Likewise.
(ENDFILE_SPEC): Likewise.
(LINK_SPEC): Likewise.
(SWITCH_TAKES_ARG): Likewise.
(STDC_0_IN_SYSTEM_HEADERS): Likewise.
(TRANSFER_FROM_TRAMPOLINE): Likewise.
(TARGET_DEFAULT): Reordered to match config/sparc/sol2-sld-64.h
version.
* config/sparc/sol2-sld.h: Don't include sparc/sol2.h here.
* config/sparc/sol2-sld-64.h: Include sol2.h here.
(LINKER_DOES_NOT_WORK_WITH_DWARF2): Removed, already in
config/sparc/sol2-sld.h.
(LONG_DOUBLE_TYPE_SIZE): Removed, already in config/sparc/sol2.h.
(CPP_CPU_SPEC): Simplified.
(STARTFILE_ARCH32_SPEC): Renamed from STARTFILE_SPEC32 for
consistency.
(STARTFILE_ARCH64_SPEC): Likewise.
(STARTFILE_ARCH32_SPEC): Define from new generic STARTFILE_ARCH_SPEC.
(STARTFILE_ARCH_SPEC) [!SPARC_BI_ARCH]: Use STARTFILE_ARCH64_SPEC.
(STARTFILE_SPEC): Moved to config/sol2.h
(LINK_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS): Add startfile_arch.
(LINK_ARCH64_SPEC): Moved out of SPARC_BI_ARCH section, simplified.
(LINK_ARCH32_SPEC): Define from new generic LINK_ARCH_SPEC.
(LINK_ARCH_SPEC) [!SPARC_BI_ARCH]: Define from LINK_ARCH64_SPEC.
* config/sparc/sol2-64.h: Don't include sparc/sol2-sld-64.h here.
(LINKER_DOES_NOT_WORK_WITH_DWARF2): Removed, already in
config/sparc/sol2-sld.h.
(LINK_ARCH_SPEC): Don't guard undef.
* config/i386/sol2.h: Don't include i386/sysv4.h here.
(PREFERRED_DEBUGGING_TYPE): Moved to config/sol2.h.
(ASM_SPEC): Likewise.
(LIB_SPEC): Likewise.
(ENDFILE_SPEC): Likewise.
(LINK_SPEC): Likewise.
(SWITCH_TAKES_ARG): Likewise.
(STDC_0_IN_SYSTEM_HEADERS): Likewise.
(CPP_PREDEFINES): Sorted to match config/sparc/sol2.h.
Added -Asystem=unix.
(CPP_SPEC): Simplified using new CPP_SUBTARGET_SPEC.
(ASM_CPU_SPEC): Define.
(SUBTARGET_EXTRA_SPECS): Define.
* config.gcc (i?86-*-solaris2*): Removed obsolete gas support.
* config/i386/sol2gas.h: Removed.
* config.gcc (i?86-*-solaris2*): Specify all tm_file's.
(sparcv9-*-solaris2*): Likewise.
(sparc-hal-solaris2*): Likewise.
(sparc-*-solaris2*): Likewise.
* config/sol2.h: New file.
Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.27.2.7
diff -u -p -r1.27.2.7 config.gcc
--- config.gcc 2001/05/26 00:36:11 1.27.2.7
+++ config.gcc 2001/05/29 00:22:32
@@ -1319,11 +1319,7 @@ i[34567]86-*-sco*) # 80386 running SCO
i[34567]86-*-solaris2*)
xm_file="xm-alloca.h ${xm_file}"
xm_defines="USG POSIX SMALL_ARG_MAX"
- tm_file=i386/sol2.h
- if test x$gas = xyes; then
- # Only needed if gas does not support -s
- tm_file="i386/sol2gas.h ${tm_file}"
- fi
+ tm_file="i386/sysv4.h sol2.h i386/sol2.h"
tmake_file="i386/t-i386bare i386/t-sol2"
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
xmake_file=x-svr4
@@ -3069,11 +3065,10 @@ sparc-*-rtems*|sparc-*-rtemself*)
fi
;;
sparcv9-*-solaris2*)
+ tm_file=sparc/sol2-sld-64.h
if test x$gnu_ld = xyes
then
- tm_file=sparc/sol2-64.h
- else
- tm_file=sparc/sol2-sld-64.h
+ tm_file="${tm_file} sparc/sol2-64.h"
fi
xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
xm_defines="USG POSIX"
@@ -3103,7 +3098,7 @@ sparcv9-*-solaris2*)
sparc-hal-solaris2*)
xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
xm_defines="USG POSIX"
- tm_file="sparc/sol2.h sparc/hal.h"
+ tm_file="sol2.h sparc/sol2.h sparc/hal.h"
tmake_file="sparc/t-halos sparc/t-sol2"
if test x$gnu_ld = xyes; then
tmake_file="$tmake_file t-slibgcc-elf-ver"
@@ -3123,11 +3118,9 @@ sparc-hal-solaris2*)
thread_file='solaris'
;;
sparc-*-solaris2*)
- if test x$gnu_ld = xyes
- then
- tm_file=sparc/sol2.h
- else
- tm_file=sparc/sol2-sld.h
+ tm_file="sparc/sysv4.h sol2.h sparc/sol2.h"
+ if test x$gnu_ld != xyes
+ tm_file="${tm_file} sparc/sol2-sld.h"
fi
xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
xm_defines="USG POSIX"
@@ -3139,19 +3132,17 @@ sparc-*-solaris2*)
fi
xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
-# At the moment, 32-to-64 cross compilation doesn't work.
-# case $machine in
-# *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
-# *-*-solaris2*)
-# if test x$gnu_ld = xyes
-# then
-# tm_file=sparc/sol2-64.h
-# else
-# tm_file=sparc/sol2-sld-64.h
-# fi
-# tmake_file="$tmake_file sparc/t-sol2-64"
-# ;;
-# esac
+ case $machine in
+ *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
+ *-*-solaris2*)
+ tm_file=sparc/sol2-sld-64.h
+ if test x$gnu_ld = xyes
+ then
+ tm_file="${tm_file} sparc/sol2-64.h"
+ fi
+ tmake_file="$tmake_file sparc/t-sol2-64"
+ ;;
+ esac
case $machine in
*-*-solaris2.[0-4])
float_format=i128
Index: config/sol2.h
===================================================================
RCS file: sol2.h
diff -N sol2.h
--- /dev/null Tue May 5 13:32:27 1998
+++ sol2.h Mon May 28 17:22:33 2001
@@ -0,0 +1,181 @@
+/* Operating system specific defines to be used when targeting GCC for any
+ Solaris 2 system.
+ Copyright 2001 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
+
+/* ??? 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} \
+"
+
+/* 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) \
+"
+
+/* 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_ARCH_SPEC
+#define STARTFILE_ARCH_SPEC "%{ansi:values-Xc.o%s} \
+ %{!ansi: \
+ %{traditional:values-Xt.o%s} \
+ %{!traditional:values-Xa.o%s}}"
+
+#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 LINK_ARCH_SPEC
+#define LINK_ARCH_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:%{!pp:-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:%{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}"
+
+/* 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.
+ *
+ */
+
+#define TRANSFER_FROM_TRAMPOLINE \
+ \
+#include <unistd.h> \
+#include <sys/mman.h> \
+ \
+#ifndef _SC_STACK_PROT \
+#define _SC_STACK_PROT 515 \
+#endif \
+ \
+#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(*_SC_STACK_PROT); \
+ if (prot != 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, STACK_PROT_RWX) < 0) \
+ perror ("mprotect of trampoline code"); \
+ } \
+}
Index: config/i386/sol2.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/sol2.h,v
retrieving revision 1.10
diff -u -p -r1.10 sol2.h
--- sol2.h 2000/11/02 23:29:10 1.10
+++ sol2.h 2001/05/29 00:22:33
@@ -1,5 +1,5 @@
/* Target definitions for GNU compiler for Intel 80386 running Solaris 2
- Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999
+ Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Fred Fish (fnf@cygnus.com).
@@ -20,35 +20,6 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "i386/sysv4.h"
-
-/* 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"
-
-#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.
It tries to align to a 16 byte boundary by padding with 0x00000090
ints, rather than 0x90 bytes (nop). This generates trash in the
@@ -64,70 +35,19 @@ Boston, MA 02111-1307, USA. */
/* Add "sun" to the list of symbols defined for SVR4. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
- "-Dunix -D__svr4__ -D__SVR4 -Dsun -Asystem=svr4"
+ "-Dsun -Dunix -D__svr4__ -D__SVR4 -Asystem=unix -Asystem=svr4"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) \
- %{pthreads:-D_REENTRANT -D_PTHREADS} \
- %{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
- %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
-
-#undef LIB_SPEC
-#define LIB_SPEC \
- "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
- %{!shared:\
- %{!symbolic:\
- %{pthreads:-lpthread} \
- %{!pthreads:%{threads:-lthread}} \
- -lc}}"
-
-#undef ENDFILE_SPEC
-#define ENDFILE_SPEC "crtend.o%s %{pg:crtn.o%s}%{!pg:crtn.o%s}"
-
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{!shared: \
- %{!symbolic: \
- %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
- %{pg:gmon.o%s} crti.o%s \
- %{ansi:values-Xc.o%s} \
- %{!ansi: \
- %{traditional:values-Xt.o%s} \
- %{!traditional: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 CPP_SPEC "%(cpp_cpu) %(cpp_subtarget)"
+
+#define ASM_CPU_SPEC ""
-#define STDC_0_IN_SYSTEM_HEADERS 1
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+ { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
+ { "asm_cpu", ASM_CPU_SPEC }, \
+ { "startfile_arch", STARTFILE_ARCH_SPEC }, \
+ { "link_arch", LINK_ARCH_SPEC }
#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "."
Index: config/sparc/sol2-64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2-64.h,v
retrieving revision 1.1
diff -u -p -r1.1 sol2-64.h
--- sol2-64.h 1999/12/08 12:30:22 1.1
+++ sol2-64.h 2001/05/29 00:22:34
@@ -1,18 +1,9 @@
/* Definitions of target machine for GNU compiler, for 64-bit SPARC
running Solaris 2 using the GNU linker. */
-#include "sparc/sol2-sld-64.h"
-
-#ifdef LINKER_DOES_NOT_WORK_WITH_DWARF2
-#undef LINKER_DOES_NOT_WORK_WITH_DWARF2
-#endif
-
#ifdef AS_SPARC64_FLAG
-#ifdef LINK_ARCH_SPEC
#undef LINK_ARCH_SPEC
-#endif
-
#define LINK_ARCH_SPEC "\
%{m32:-m elf32_sparc %(link_arch32)} \
%{m64:-m elf64_sparc %(link_arch64)} \
Index: config/sparc/sol2-sld-64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2-sld-64.h,v
retrieving revision 1.13.4.1
diff -u -p -r1.13.4.1 sol2-sld-64.h
--- sol2-sld-64.h 2001/04/11 13:04:21 1.13.4.1
+++ sol2-sld-64.h 2001/05/29 00:22:34
@@ -7,17 +7,11 @@
#endif
+#include "sol2.h"
#include "sparc/sol2.h"
#ifdef AS_SPARC64_FLAG
-/* At least up through Solaris 2.6,
- the system linker does not work with DWARF or DWARF2,
- since it does not have working support for relocations
- to unaligned data. */
-
-#define LINKER_DOES_NOT_WORK_WITH_DWARF2
-
/* A 64 bit v9 compiler with stack-bias */
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
@@ -31,9 +25,6 @@
#undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_MEDANY
-#undef LONG_DOUBLE_TYPE_SIZE
-#define LONG_DOUBLE_TYPE_SIZE 128
-
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC ""
#undef ASM_CPU64_DEFAULT_SPEC
@@ -54,15 +45,6 @@
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a"
#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
#define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}"
#define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}"
@@ -74,17 +56,14 @@
#undef CPP_CPU_SPEC
#define CPP_CPU_SPEC "\
%{mcypress:} \
-%{msparclite:-D__sparclite__} \
-%{mf930:-D__sparclite__} %{mf934:-D__sparclite__} \
+%{msparclite|mf930|mf934:-D__sparclite__} \
%{mv8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
%{msupersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
-%{mcpu=sparclet:-D__sparclet__} %{mcpu=tsc701:-D__sparclet__} \
-%{mcpu=sparclite:-D__sparclite__} \
-%{mcpu=f930:-D__sparclite__} %{mcpu=f934:-D__sparclite__} \
+%{mcpu=sparclet|mcpu=tsc701:-D__sparclet__} \
+%{mcpu=sparclite|mcpu=f930|mcpu=f934:-D__sparclite__} \
%{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
%{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
-%{mcpu=v9:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
-%{mcpu=ultrasparc:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
+%{mcpu=v9|mcpu=ultrasparc:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
"
@@ -96,48 +75,53 @@
%{!mcpu*:%(asm_cpu_default)} \
"
-#define STARTFILE_SPEC32 "\
-%{ansi:values-Xc.o%s} \
-%{!ansi: \
- %{traditional:values-Xt.o%s} \
- %{!traditional:values-Xa.o%s}}"
+#define STARTFILE_ARCH32_SPEC STARTFILE_ARCH_SPEC
-#define STARTFILE_SPEC64 "\
+#define STARTFILE_ARCH64_SPEC "\
%{ansi:/usr/lib/sparcv9/values-Xc.o%s} \
%{!ansi: \
%{traditional:/usr/lib/sparcv9/values-Xt.o%s} \
%{!traditional:/usr/lib/sparcv9/values-Xa.o%s}}"
+#undef STARTFILE_ARCH_SPEC
+
#ifdef SPARC_BI_ARCH
#if DEFAULT_ARCH32_P
#define STARTFILE_ARCH_SPEC "\
-%{m32:" STARTFILE_SPEC32 "} \
-%{m64:" STARTFILE_SPEC64 "} \
-%{!m32:%{!m64:" STARTFILE_SPEC32 "}}"
+%{m32:" STARTFILE_ARCH32_SPEC "} \
+%{m64:" STARTFILE_ARCH64_SPEC "} \
+%{!m32:%{!m64:" STARTFILE_ARCH32_SPEC "}}"
#else
#define STARTFILE_ARCH_SPEC "\
-%{m32:" STARTFILE_SPEC32 "} \
-%{m64:" STARTFILE_SPEC64 "} \
-%{!m32:%{!m64:" STARTFILE_SPEC64 "}}"
+%{m32:" STARTFILE_ARCH32_SPEC "} \
+%{m64:" STARTFILE_ARCH64_SPEC "} \
+%{!m32:%{!m64:" STARTFILE_ARCH64_SPEC "}}"
#endif
#else /* !SPARC_BI_ARCH */
/* In this case we define MD_STARTFILE_PREFIX to /usr/lib/sparcv9/ */
-#define STARTFILE_ARCH_SPEC STARTFILE_SPEC32
+#define STARTFILE_ARCH_SPEC STARTFILE_ARCH64_SPEC
#endif /* !SPARC_BI_ARCH */
-#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"
+/*
+ * This should be the same as in sol2-sld.h, except with "/sparcv9"
+ * appended to the paths and /usr/ccs/lib is no longer necessary
+ */
+#define LINK_ARCH64_SPEC \
+ "%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \
+ %{G:-G} \
+ %{YP,*} \
+ %{R*} \
+ %{compat-bsd: \
+ %{!YP,*:%{p|pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
+ %{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}} \
+ -R /usr/ucblib} \
+ %{!compat-bsd: \
+ %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
+ %{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}}"
#ifdef SPARC_BI_ARCH
@@ -189,41 +185,16 @@
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
+ { "startfile_arch", STARTFILE_ARCH_SPEC }, \
{ "link_arch32", LINK_ARCH32_SPEC }, \
{ "link_arch64", LINK_ARCH64_SPEC }, \
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
/* This should be the same as in svr4.h, except with -R added. */
-#define LINK_ARCH32_SPEC \
- "%{G:-G} \
- %{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 \
- "%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \
- %{G:-G} \
- %{YP,*} \
- %{R*} \
- %{compat-bsd: \
- %{!YP,*:%{p:-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}}} \
- -R /usr/ucblib} \
- %{!compat-bsd: \
- %{!YP,*:%{p:-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}}}}"
+#define LINK_ARCH32_SPEC LINK_ARCH_SPEC
+#undef LINK_ARCH_SPEC
#define LINK_ARCH_SPEC "\
%{m32:%(link_arch32)} \
%{m64:%(link_arch64)} \
@@ -233,16 +204,6 @@
#define LINK_ARCH_DEFAULT_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
#if DEFAULT_ARCH32_P
#define CC1_SPEC "\
@@ -274,32 +235,8 @@
#else /* !SPARC_BI_ARCH */
-/*
- * This should be the same as in sol2-sld.h, except with "/sparcv9"
- * appended to the paths and /usr/ccs/lib is no longer necessary
- */
-#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} \
- %{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \
- %{G:-G} \
- %{YP,*} \
- %{R*} \
- %{compat-bsd: \
- %{!YP,*:%{p:-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}}} \
- -R /usr/ucblib} \
- %{!compat-bsd: \
- %{!YP,*:%{p:-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}}}} \
- %{Qy:} %{!Qn:-Qy}"
-
+#define LINK_ARCH_SPEC LINK_ARCH64_SPEC
+
#undef MD_STARTFILE_PREFIX
#define MD_STARTFILE_PREFIX "/usr/lib/sparcv9/"
@@ -333,4 +270,4 @@
fprintf (FILE, "\n"); \
} while (0)
-#endif
+#endif /* AS_SPARC64_FLAG */
Index: config/sparc/sol2-sld.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2-sld.h,v
retrieving revision 1.3
diff -u -p -r1.3 sol2-sld.h
--- sol2-sld.h 1998/12/16 21:13:26 1.3
+++ sol2-sld.h 2001/05/29 00:22:34
@@ -1,8 +1,6 @@
/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
using the system linker. */
-#include "sparc/sol2.h"
-
/* At least up through Solaris 2.6,
the system linker does not work with DWARF or DWARF2,
since it does not have working support for relocations
Index: config/sparc/sol2.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2.h,v
retrieving revision 1.24.4.1
diff -u -p -r1.24.4.1 sol2.h
--- sol2.h 2001/05/16 01:01:12 1.24.4.1
+++ sol2.h 2001/05/29 00:22:34
@@ -1,5 +1,6 @@
/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
- Copyright 1992, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@netcom.com).
Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
@@ -20,52 +21,13 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
-#include "sparc/sysv4.h"
+/* Supposedly the same as vanilla sparc svr4, except for the stuff below */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 \
-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__ \
-%{mcypress:} \
-%{msparclite:-D__sparclite__} \
-%{mf930:-D__sparclite__} %{mf934:-D__sparclite__} \
-%{mv8:-D__sparc_v8__} \
-%{msupersparc:-D__supersparc__ -D__sparc_v8__} \
-%{mcpu=sparclet:-D__sparclet__} %{mcpu=tsc701:-D__sparclet__} \
-%{mcpu=sparclite:-D__sparclite__} \
-%{mcpu=f930:-D__sparclite__} %{mcpu=f934:-D__sparclite__} \
-%{mcpu=v8:-D__sparc_v8__} \
-%{mcpu=supersparc:-D__supersparc__ -D__sparc_v8__} \
-%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
-%{mcpu=sparclite86x:-D__sparclite86x__} \
-%{mcpu=v9:-D__sparc_v9__} \
-%{mcpu=ultrasparc:-D__sparc_v9__} \
-%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
-"
-
-/* 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
other assemblers will accept. */
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9
@@ -91,11 +53,6 @@ Boston, MA 02111-1307, USA. */
#define DBX_REGISTER_NUMBER(REGNO) \
(TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO)
-/* 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
-
/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
#undef ASM_OUTPUT_SKIP
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
@@ -132,72 +89,6 @@ Boston, MA 02111-1307, USA. */
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: \
- %{traditional:values-Xt.o%s} \
- %{!traditional: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
-#define ENDFILE_SPEC "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')
-
/* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
Instead, it is enabled here, because it does work under Solaris. */
/* Define for support of TFmode long double and REAL_ARITHMETIC.
@@ -207,8 +98,6 @@ Boston, MA 02111-1307, USA. */
/* But indicate that it isn't supported by the hardware. */
#define WIDEST_HARDWARE_FP_SIZE 64
-#define STDC_0_IN_SYSTEM_HEADERS 1
-
#define MULDI3_LIBCALL "__mul64"
#define DIVDI3_LIBCALL "__div64"
#define UDIVDI3_LIBCALL "__udiv64"
@@ -229,7 +118,7 @@ Boston, MA 02111-1307, USA. */
/* Solaris allows 64 bit out and global registers in 32 bit mode.
sparc_override_options will disable V8+ if not generating V9 code. */
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (MASK_EPILOGUE + MASK_FPU + MASK_V8PLUS + MASK_LONG_DOUBLE_128)
+#define TARGET_DEFAULT (MASK_V8PLUS + MASK_EPILOGUE + MASK_FPU + MASK_LONG_DOUBLE_128)
#if TARGET_ARCH32
/* Override MACHINE_STATE_{SAVE,RESTORE} because we have special
@@ -250,48 +139,4 @@ Boston, MA 02111-1307, USA. */
"ta 0x21\n\t" \
: /* no outputs */ \
: "r" (ms_flags), "r" (ms_saveret));
-#endif /* sparc32 */
-
-/*
- * 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.
- *
- */
-
-#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"); \
- } \
-}
+#endif /* TARGET_ARCH32 */