aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1996-06-04 14:02:51 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1996-06-04 14:02:51 +0000
commitf7856bbc82a9a321fba2ec0f475776ef03fcbbff (patch)
treee75050de6e944951e715943831c6c526f686136e /gcc
parent27779754381e69885acc39427dad9e354064fc55 (diff)
downloadgcc-f7856bbc82a9a321fba2ec0f475776ef03fcbbff.zip
gcc-f7856bbc82a9a321fba2ec0f475776ef03fcbbff.tar.gz
gcc-f7856bbc82a9a321fba2ec0f475776ef03fcbbff.tar.bz2
Touch up solaris port
From-SVN: r12152
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/sol2.h13
-rw-r--r--gcc/config/rs6000/sysv4.h63
-rw-r--r--gcc/config/rs6000/t-ppc20
3 files changed, 77 insertions, 19 deletions
diff --git a/gcc/config/rs6000/sol2.h b/gcc/config/rs6000/sol2.h
index 5b0e29f..8f88c0b 100644
--- a/gcc/config/rs6000/sol2.h
+++ b/gcc/config/rs6000/sol2.h
@@ -169,3 +169,16 @@ while (0)
#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
sprintf ((OUTPUT), "%s_.%d", (NAME), (LABELNO)))
+
+
+/* Define this macro as a C expression for the initializer of an
+ array of string to tell the driver program which options are
+ defaults for this target and thus do not need to be handled
+ specially when using `MULTILIB_OPTIONS'.
+
+ Do not define this macro if `MULTILIB_OPTIONS' is not defined in
+ the target makefile fragment or if none of the options listed in
+ `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
+
+#undef MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS { "mlittle", "mlittle-endian", "mcall-solaris", "mno-sdata" }
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index cf6740c..e77e522 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -797,6 +797,64 @@ do { \
fputs (_name, FILE); \
} while (0)
+/*
+ * Switch into a generic section.
+ *
+ * We make the section read-only and executable for a function decl,
+ * read-only for a const data decl, and writable for a non-const data decl.
+ *
+ * If the section has already been defined, we must not
+ * emit the attributes here. The SVR4 assembler does not
+ * recognize section redefinitions.
+ * If DECL is NULL, no attributes are emitted.
+ *
+ * Note, Solaris as doesn't like @nobits, and gas can handle .sbss without
+ * needing @nobits.
+ */
+
+#undef ASM_OUTPUT_SECTION_NAME
+#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \
+do { \
+ static struct section_info \
+ { \
+ struct section_info *next; \
+ char *name; \
+ enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \
+ } *sections; \
+ struct section_info *s; \
+ char *mode; \
+ enum sect_enum type; \
+ \
+ for (s = sections; s; s = s->next) \
+ if (!strcmp (NAME, s->name)) \
+ break; \
+ \
+ if (DECL && TREE_CODE (DECL) == FUNCTION_DECL) \
+ type = SECT_EXEC, mode = "ax"; \
+ else if (DECL && TREE_READONLY (DECL)) \
+ type = SECT_RO, mode = "a"; \
+ else \
+ type = SECT_RW, mode = "aw"; \
+ \
+ if (s == 0) \
+ { \
+ s = (struct section_info *) xmalloc (sizeof (struct section_info)); \
+ s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME)); \
+ strcpy (s->name, NAME); \
+ s->type = type; \
+ s->next = sections; \
+ sections = s; \
+ fprintf (FILE, ".section\t%s,\"%s\"\n", NAME, mode); \
+ } \
+ else \
+ { \
+ if (DECL && s->type != type) \
+ error_with_decl (DECL, "%s causes a section type conflict"); \
+ \
+ fprintf (FILE, ".section\t%s\n", NAME); \
+ } \
+} while (0)
+
#undef ASM_OUTPUT_CONSTRUCTOR
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
do { \
@@ -1088,19 +1146,20 @@ scrti.o%s"
%{traditional:values-Xt.o%s} \
%{!traditional:values-Xa.o%s}} \
%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
+ %{solaris-cclib: /opt/SUNWspro/SC4.0/lib/libabi.a} \
%{!shared: %{!symbolic: -lc }}}"
#endif
#ifndef STARTFILE_SOLARIS_SPEC
#define STARTFILE_SOLARIS_SPEC "\
%{!msolaris-cclib: scrti.o%s scrt0.o%s} \
-%{msolaris-cclib: crti.o%s crt1.o%s}"
+%{msolaris-cclib: /opt/SUNWspro/SC4.0/lib/crti.o%s /opt/SUNWspro/SC4.0/lib/crt1.o%s}"
#endif
#ifndef ENDFILE_SOLARIS_SPEC
#define ENDFILE_SOLARIS_SPEC "\
%{!msolaris-cclib: scrtn.o%s} \
-%{msolaris-cclib: crtn.o%s}"
+%{msolaris-cclib: /opt/SUNWspro/SC4.0/lib/crtn.o%s}"
#endif
#ifndef LINK_START_SOLARIS_SPEC
diff --git a/gcc/config/rs6000/t-ppc b/gcc/config/rs6000/t-ppc
index 69c7e75..e8cf667 100644
--- a/gcc/config/rs6000/t-ppc
+++ b/gcc/config/rs6000/t-ppc
@@ -25,23 +25,9 @@ eabi-ctors.c: $(srcdir)/config/rs6000/eabi-ctors.c
# explicit little endian or big endian libraries, since it depends on the
# -mbig/-mlittle switches passed to gas. The -mrelocatable support also needs
# -mrelocatable passed to gas, so don't use it either.
-MULTILIB_OPTIONS = msoft-float \
- mcall-sysv-noeabi/mcall-sysv-eabi/mcall-aix/mcall-solaris
-
-MULTILIB_DIRNAMES = nof \
- le be \
- cs ce ca sol
-
-MULTILIB_MATCHES = mlittle=mlittle-endian \
- mbig=mbig-endian \
- mbig=mcall-linux \
- msoft-float=mcpu?403 \
- msoft-float=mcpu?821 \
- msoft-float=mcpu?860 \
- mcall-sysv-noeabi=mcall-linux \
- mcall-sysv-eabi=meabi \
- mcall-sysv-noeabi=mno-eabi
-
+MULTILIB_OPTIONS = msoft-float
+MULTILIB_DIRNAMES = nof
+MULTILIB_MATCHES =
MULTILIB_EXCEPTIONS =
LIBGCC = stmp-multilib stmp-crt