Commit a8e68029 by Daniel Jacobowitz Committed by Joseph Myers

configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set need_64bit_hwint=yes.

libcpp:
2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
            Mark Mitchell  <mark@codesourcery.com>

	* configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
	need_64bit_hwint=yes.
	* configure: Regenerate.

gcc:
2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
            Mark Mitchell  <mark@codesourcery.com>

	* config/i386/sol2-10.h, config/i386/t-sol2-10: New files.
	* config/i386/i386.c (i386_solaris_elf_named_section): New
	function.
	* config.gcc (i[34567]86-*-solaris2*): Handle Solaris 2.10.
	* config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Handle
	64-bit.
	(ASM_QUAD): Don't undefine for biarch targets.
	* config/i386/t-sol2: Introduce multilib support.

gcc/testsuite:
2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
            Mark Mitchell  <mark@codesourcery.com>

	* testsuite/gcc.dg/pragma-init-fini-2.c: New test.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r90839
parent e1990f69
2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
* config/i386/sol2-10.h, config/i386/t-sol2-10: New files.
* config/i386/i386.c (i386_solaris_elf_named_section): New
function.
* config.gcc (i[34567]86-*-solaris2*): Handle Solaris 2.10.
* config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Handle
64-bit.
(ASM_QUAD): Don't undefine for biarch targets.
* config/i386/t-sol2: Introduce multilib support.
2004-11-18 Ben Elliston <bje@au.ibm.com> 2004-11-18 Ben Elliston <bje@au.ibm.com>
* cgraphunit.c: Replace "it's" with "its" and fix a typo. * cgraphunit.c: Replace "it's" with "its" and fix a typo.
......
...@@ -1020,6 +1020,7 @@ i[34567]86-*-solaris2*) ...@@ -1020,6 +1020,7 @@ i[34567]86-*-solaris2*)
tm_p_file="${tm_p_file} sol2-protos.h" tm_p_file="${tm_p_file} sol2-protos.h"
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"
tm_defines="${tm_defines} TARGET_GNU_LD=1"
else else
tmake_file="$tmake_file t-slibgcc-sld" tmake_file="$tmake_file t-slibgcc-sld"
fi fi
...@@ -1028,7 +1029,20 @@ i[34567]86-*-solaris2*) ...@@ -1028,7 +1029,20 @@ i[34567]86-*-solaris2*)
tm_file="$tm_file tm-dwarf2.h" tm_file="$tm_file tm-dwarf2.h"
;; ;;
esac esac
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o" case ${target} in
*-*-solaris2.1[0-9])
tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h"
tm_defines="${tm_defines} TARGET_BI_ARCH=1"
tmake_file="$tmake_file i386/t-sol2-10"
need_64bit_hwint=yes
# Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
# part of the base system.
extra_parts="gmon.o crtbegin.o crtend.o"
;;
*)
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
;;
esac
case ${enable_threads}:${have_pthread_h}:${have_thread_h} in case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
"":yes:* | yes:yes:* ) thread_file=posix ;; "":yes:* | yes:yes:* ) thread_file=posix ;;
"":*:yes | yes:*:yes ) thread_file=solaris ;; "":*:yes | yes:*:yes ) thread_file=solaris ;;
......
...@@ -927,6 +927,7 @@ static bool ix86_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, ...@@ -927,6 +927,7 @@ static bool ix86_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
#if defined (DO_GLOBAL_CTORS_BODY) && defined (HAS_INIT_SECTION) #if defined (DO_GLOBAL_CTORS_BODY) && defined (HAS_INIT_SECTION)
static void ix86_svr3_asm_out_constructor (rtx, int); static void ix86_svr3_asm_out_constructor (rtx, int);
#endif #endif
static void i386_solaris_elf_named_section (const char *, unsigned int, tree);
/* Register class used for passing given 64bit part of the argument. /* Register class used for passing given 64bit part of the argument.
These represent classes as documented by the PS ABI, with the exception These represent classes as documented by the PS ABI, with the exception
...@@ -15270,4 +15271,24 @@ void ix86_emit_i387_log1p (rtx op0, rtx op1) ...@@ -15270,4 +15271,24 @@ void ix86_emit_i387_log1p (rtx op0, rtx op1)
emit_label (label2); emit_label (label2);
} }
/* Solaris named-section hook. Parameters are as for
named_section_real. */
static void
i386_solaris_elf_named_section (const char *name, unsigned int flags,
tree decl)
{
/* With Binutils 2.15, the "@unwind" marker must be specified on
every occurrence of the ".eh_frame" section, not just the first
one. */
if (TARGET_64BIT
&& strcmp (name, ".eh_frame") == 0)
{
fprintf (asm_out_file, "\t.section\t%s,\"%s\",@unwind\n", name,
flags & SECTION_WRITE ? "aw" : "a");
return;
}
default_elf_asm_named_section (name, flags, decl);
}
#include "gt-i386.h" #include "gt-i386.h"
/* Solaris 10 configuration.
Copyright (C) 2004 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
This file is part of GCC.
GCC 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.
GCC 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 GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "/"
#undef ASM_SPEC
#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \
"%{Wa,*:%*} %{m32:--32} %{m64:--64} -s %(asm_cpu)"
#undef NO_PROFILE_COUNTERS
#undef MCOUNT_NAME
#define MCOUNT_NAME "_mcount"
#undef WCHAR_TYPE
#define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
#undef WINT_TYPE
#define WINT_TYPE (TARGET_64BIT ? "int" : "long int")
#undef WINT_TYPE_SIZE
#define WINT_TYPE_SIZE 32
#define SUBTARGET_OVERRIDE_OPTIONS \
do \
{ \
if (flag_omit_frame_pointer == 2) \
flag_omit_frame_pointer = 0; \
} \
while (0)
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP \
| MASK_FLOAT_RETURNS \
| MASK_OMIT_LEAF_FRAME_POINTER)
#define MULTILIB_DEFAULTS { "m32" }
#undef LINK_ARCH64_SPEC_BASE
#define LINK_ARCH64_SPEC_BASE \
"%{G:-G} \
%{YP,*} \
%{R*} \
%{compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64} \
%{!p:%{!pg:-Y P,/usr/ucblib/64:/lib:/usr/lib/64}}} \
-R /usr/ucblib/64} \
%{!compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \
%{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}"
#undef LINK_ARCH64_SPEC
#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
#ifdef TARGET_GNU_LD
#define TARGET_LD_EMULATION "%{m64:-m elf_x86_64}%{!m64:-m elf_i386} "
#else
#define TARGET_LD_EMULATION ""
#endif
#undef LINK_ARCH_SPEC
#define LINK_ARCH_SPEC TARGET_LD_EMULATION \
"%{m64:" LINK_ARCH64_SPEC "}%{!m64:" LINK_ARCH32_SPEC "}"
/* We do not need to search a special directory for startup files. */
#undef MD_STARTFILE_PREFIX
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION i386_solaris_elf_named_section
/* In 32-bit mode, follow the SVR4 ABI definition; in 64-bit mode, use
the AMD64 ABI definition. */
#undef RETURN_IN_MEMORY
#define RETURN_IN_MEMORY(TYPE) \
(TARGET_64BIT \
? ix86_return_in_memory (TYPE) \
: (TYPE_MODE (TYPE) == BLKmode \
|| (VECTOR_MODE_P (TYPE_MODE (TYPE)) \
&& int_size_in_bytes (TYPE) == 8)))
...@@ -31,12 +31,13 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,12 +31,13 @@ Boston, MA 02111-1307, USA. */
it knows what it is doing. */ it knows what it is doing. */
#define FORCE_CODE_SECTION_ALIGN asm(ALIGN_ASM_OP "16"); #define FORCE_CODE_SECTION_ALIGN asm(ALIGN_ASM_OP "16");
/* Select a format to encode pointers in exception handling data. CODE /* Old versions of the Solaris assembler can not handle the difference of
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is labels in different sections, so force DW_EH_PE_datarel. */
true if the symbol may be affected by dynamic relocations. */
#undef ASM_PREFERRED_EH_DATA_FORMAT #undef ASM_PREFERRED_EH_DATA_FORMAT
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
(flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \ (flag_pic ? ((GLOBAL ? DW_EH_PE_indirect : 0) \
| (TARGET_64BIT ? DW_EH_PE_pcrel | DW_EH_PE_sdata4 \
: DW_EH_PE_datarel)) \
: DW_EH_PE_absptr) : DW_EH_PE_absptr)
/* Solaris 2/Intel as chokes on #line directives. */ /* Solaris 2/Intel as chokes on #line directives. */
...@@ -63,8 +64,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -63,8 +64,10 @@ Boston, MA 02111-1307, USA. */
#undef LOCAL_LABEL_PREFIX #undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "." #define LOCAL_LABEL_PREFIX "."
/* The Solaris assembler does not support .quad. Do not use it. */ /* The 32-bit Solaris assembler does not support .quad. Do not use it. */
#ifndef TARGET_BI_ARCH
#undef ASM_QUAD #undef ASM_QUAD
#endif
/* The Solaris assembler wants a .local for non-exported aliases. */ /* The Solaris assembler wants a .local for non-exported aliases. */
#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \ #define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \
......
# gmon build rule: # gmon build rule:
gmon.o: $(srcdir)/config/i386/gmon-sol2.c $(GCC_PASSES) $(CONFIG_H) $(T)gmon.o: $(srcdir)/config/i386/gmon-sol2.c $(GCC_PASSES) $(CONFIG_H)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) \
-c $(srcdir)/config/i386/gmon-sol2.c -o gmon.o -c $(srcdir)/config/i386/gmon-sol2.c -o $(T)gmon.o
# Assemble startup files. # Assemble startup files.
# Apparently Sun believes that assembler files don't need comments, because no # Apparently Sun believes that assembler files don't need comments, because no
# single ASCII character is valid (tried them all). So we manually strip out # single ASCII character is valid (tried them all). So we manually strip out
# the comments with sed. This bug may only be in the Early Access releases. # the comments with sed. This bug may only be in the Early Access releases.
gcrt1.o: $(srcdir)/config/i386/sol2-gc1.asm $(T)gcrt1.o: $(srcdir)/config/i386/sol2-gc1.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/sol2-gc1.asm >gcrt1.s sed -e '/^!/d' <$(srcdir)/config/i386/sol2-gc1.asm >gcrt1.s
$(AS) -o gcrt1.o gcrt1.s $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)gcrt1.o gcrt1.s
crt1.o: $(srcdir)/config/i386/sol2-c1.asm $(GCC_PASSES) $(T)crt1.o: $(srcdir)/config/i386/sol2-c1.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/sol2-c1.asm >crt1.s sed -e '/^!/d' <$(srcdir)/config/i386/sol2-c1.asm >crt1.s
$(GCC_FOR_TARGET) -c -o crt1.o crt1.s $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crt1.o crt1.s
crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES) $(T)crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s
$(GCC_FOR_TARGET) -c -o crti.o crti.s $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o crti.s
crtn.o: $(srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES) $(T)crtn.o: $(srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES)
sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s
$(GCC_FOR_TARGET) -c -o crtn.o crtn.s $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o crtn.s
# We need to use -fPIC when we are using gcc to compile the routines in # We need to use -fPIC when we are using gcc to compile the routines in
# crtstuff.c. This is only really needed when we are going to use gcc/g++ # crtstuff.c. This is only really needed when we are going to use gcc/g++
......
MULTILIB_OPTIONS = m32/m64
MULTILIB_DIRNAMES = 32 64
MULTILIB_OSDIRNAMES = . 64
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
# GCC contains i386 assembler sources for some of the startfiles
# which aren't appropriate for amd64. Just use the installed
# versions of: crt1.o crti.o crtn.o gcrt1.o
EXTRA_MULTILIB_PARTS=gmon.o crtbegin.o crtend.o
2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
* testsuite/gcc.dg/pragma-init-fini-2.c: New test.
2004-11-17 Janis Johnson <janis187@us.ibm.com> 2004-11-17 Janis Johnson <janis187@us.ibm.com>
Aldy Hernandez <aldyh@redhat.com> Aldy Hernandez <aldyh@redhat.com>
......
/* Tests for #pragma init and #pragma fini. */
/* { dg-do link { target *-*-solaris2.* } } */
/* { dg-options "-fpic" } */
#include <stdio.h>
#pragma fini (f)
void f() {
fprintf (stderr, "f\n");
}
int main () {
}
2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
* configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
need_64bit_hwint=yes.
* configure: Regenerate.
2004-11-09 Joseph S. Myers <joseph@codesourcery.com> 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
* Makefile.in ($(PACKAGE).pot): New rule. Depend on * Makefile.in ($(PACKAGE).pot): New rule. Depend on
......
...@@ -7044,6 +7044,7 @@ case $target in ...@@ -7044,6 +7044,7 @@ case $target in
x86_64-*-* | \ x86_64-*-* | \
ia64-*-* | \ ia64-*-* | \
hppa*64*-*-* | parisc*64*-*-* | \ hppa*64*-*-* | parisc*64*-*-* | \
i[34567]86-*-solaris2.1[0-9]* | \
mips*-*-* | \ mips*-*-* | \
mmix-*-* | \ mmix-*-* | \
powerpc*-*-* | \ powerpc*-*-* | \
......
...@@ -110,6 +110,7 @@ case $target in ...@@ -110,6 +110,7 @@ case $target in
x86_64-*-* | \ x86_64-*-* | \
ia64-*-* | \ ia64-*-* | \
hppa*64*-*-* | parisc*64*-*-* | \ hppa*64*-*-* | parisc*64*-*-* | \
i[34567]86-*-solaris2.1[0-9]* | \
mips*-*-* | \ mips*-*-* | \
mmix-*-* | \ mmix-*-* | \
powerpc*-*-* | \ powerpc*-*-* | \
......
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