Commit f7856bbc by Michael Meissner

Touch up solaris port

From-SVN: r12152
parent 27779754
......@@ -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" }
......@@ -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
......
......@@ -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
......
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