OSDN Git Service

gcc:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Nov 2008 17:13:01 +0000 (17:13 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Nov 2008 17:13:01 +0000 (17:13 +0000)
PR bootstrap/33100
* config.gcc (i[34567]86-*-solaris2*): Don't include
i386/t-crtstuff here.
Move extra_parts, i386/t-sol2 in tmake_file to libgcc/config.host.
* config/i386/t-sol2: Move to libgcc/config/i386.

libgcc:
PR bootstrap/33100
* configure.ac (i?86-*-solaris2.1[0-9]*): Only include
i386/t-crtstuff if linker supports ZERO terminator unwind entries.
* configure: Regenerate.
* config.host (i[34567]86-*-solaris2*): Move i386/t-sol2 in
tmake_file here from gcc/config.gcc.
Move extra_parts here from gcc/config.gcc.
* config/i386/t-sol2: Move here from gcc/config/i386.
Use gcc_srcdir instead of srcdir.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142050 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
libgcc/ChangeLog
libgcc/config.host
libgcc/config/i386/t-sol2 [moved from gcc/config/i386/t-sol2 with 63% similarity]
libgcc/configure
libgcc/configure.ac

index fa60fd5..af07c93 100644 (file)
@@ -1,3 +1,11 @@
+2008-11-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       PR bootstrap/33100
+       * config.gcc (i[34567]86-*-solaris2*): Don't include
+       i386/t-crtstuff here.
+       Move extra_parts, i386/t-sol2 in tmake_file to libgcc/config.host.
+       * config/i386/t-sol2: Move to libgcc/config/i386.
+
 2008-11-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
        PR driver/21706
index ae60bcd..a78dcc0 100644 (file)
@@ -1173,7 +1173,7 @@ i[34567]86-*-solaris2*)
                ;;
        esac
        tm_file="${tm_file} i386/sol2.h"
-       tmake_file="${tmake_file} t-sol2 i386/t-sol2 t-svr4"
+       tmake_file="${tmake_file} t-sol2 t-svr4"
        c_target_objs="${c_target_objs} sol2-c.o"
        cxx_target_objs="${cxx_target_objs} sol2-c.o"
        extra_objs="sol2.o"
@@ -1192,7 +1192,10 @@ i[34567]86-*-solaris2*)
        *-*-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-crtstuff i386/t-sol2-10"
+               tmake_file="$tmake_file i386/t-sol2-10"
+               # i386/t-crtstuff only affects libgcc.  Its inclusion
+               # depends on a runtime test and is thus performed in
+               # libgcc/configure.ac instead.
                need_64bit_hwint=yes
                case X"${with_cpu}" in
                Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
@@ -1208,12 +1211,6 @@ i[34567]86-*-solaris2*)
                        exit 1
                        ;;
                esac
-               # 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
index f73b8c7..dd079c2 100644 (file)
@@ -1,3 +1,15 @@
+2008-11-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       PR bootstrap/33100
+       * configure.ac (i?86-*-solaris2.1[0-9]*): Only include
+       i386/t-crtstuff if linker supports ZERO terminator unwind entries.
+       * configure: Regenerate.
+       * config.host (i[34567]86-*-solaris2*): Move i386/t-sol2 in
+       tmake_file here from gcc/config.gcc.
+       Move extra_parts here from gcc/config.gcc.
+       * config/i386/t-sol2: Move here from gcc/config/i386.
+       Use gcc_srcdir instead of srcdir.
+
 2008-11-18  Adam Nemet  <anemet@caviumnetworks.com>
 
        * config.host (mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*): New
index 747fd7e..f85f3cf 100644 (file)
@@ -318,6 +318,17 @@ i[34567]86-*-nto-qnx*)
 i[34567]86-*-rtems*)
        ;;
 i[34567]86-*-solaris2*)
+       tmake_file="${tmake_file} i386/t-sol2"
+       case ${host} in
+       *-*-solaris2.1[0-9]*)
+               # 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
        ;;
 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
        ;;
similarity index 63%
rename from gcc/config/i386/t-sol2
rename to libgcc/config/i386/t-sol2
index 0eec96f..24b7c7c 100644 (file)
@@ -1,23 +1,23 @@
 # gmon build rule:
-$(T)gmon.o:    $(srcdir)/config/i386/gmon-sol2.c $(GCC_PASSES) $(CONFIG_H)
+$(T)gmon.o:    $(gcc_srcdir)/config/i386/gmon-sol2.c $(GCC_PASSES) $(CONFIG_H)
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) \
-               -c $(srcdir)/config/i386/gmon-sol2.c -o $(T)gmon.o
+               -c $(gcc_srcdir)/config/i386/gmon-sol2.c -o $(T)gmon.o
 
 # Assemble startup files.
 # 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
 # the comments with sed.  This bug may only be in the Early Access releases.
-$(T)gcrt1.o: $(srcdir)/config/i386/sol2-gc1.asm $(GCC_PASSES)
-       sed -e '/^!/d' <$(srcdir)/config/i386/sol2-gc1.asm >gcrt1.s
+$(T)gcrt1.o: $(gcc_srcdir)/config/i386/sol2-gc1.asm $(GCC_PASSES)
+       sed -e '/^!/d' <$(gcc_srcdir)/config/i386/sol2-gc1.asm >gcrt1.s
        $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)gcrt1.o gcrt1.s
-$(T)crt1.o: $(srcdir)/config/i386/sol2-c1.asm $(GCC_PASSES)
-       sed -e '/^!/d' <$(srcdir)/config/i386/sol2-c1.asm >crt1.s
+$(T)crt1.o: $(gcc_srcdir)/config/i386/sol2-c1.asm $(GCC_PASSES)
+       sed -e '/^!/d' <$(gcc_srcdir)/config/i386/sol2-c1.asm >crt1.s
        $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crt1.o crt1.s
-$(T)crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
-       sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s
+$(T)crti.o: $(gcc_srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
+       sed -e '/^!/d' <$(gcc_srcdir)/config/i386/sol2-ci.asm >crti.s
        $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o crti.s
-$(T)crtn.o: $(srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES)
-       sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s
+$(T)crtn.o: $(gcc_srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES)
+       sed -e '/^!/d' <$(gcc_srcdir)/config/i386/sol2-cn.asm >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
index 75bf903..6315ecd 100644 (file)
@@ -3420,6 +3420,31 @@ esac
 # Collect host-machine-specific information.
 . ${srcdir}/config.host
 
+# Check if Solaris/x86 linker supports ZERO terminator unwind entries.
+# This is after config.host so we can augment tmake_file.
+# Link with -nostartfiles -nodefaultlibs since neither are present while
+# building libgcc.
+case ${host} in
+i?86-*-solaris2.1[0-9]*)
+  cat > conftest.s <<EOF
+       .section        .eh_frame,"a",@unwind
+       .zero   4
+       .section        .jcr,"aw",@progbits
+       .zero   8
+EOF
+  if { ac_try='${CC-cc} -shared -nostartfiles -nodefaultlibs -o conftest.so conftest.s 1>&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      # configure expects config files in libgcc/config, so need a relative
+      # path here.
+      tmake_file="${tmake_file} ../../gcc/config/i386/t-crtstuff"
+  fi
+  ;;
+esac
+
 # Check for visibility support.  This is after config.host so that
 # we can check for asm_hidden_op.
 echo "$as_me:$LINENO: checking for __attribute__((visibility(\"hidden\")))" >&5
index 1238d74..d48bccc 100644 (file)
@@ -171,6 +171,26 @@ esac
 # Collect host-machine-specific information.
 . ${srcdir}/config.host
 
+# Check if Solaris/x86 linker supports ZERO terminator unwind entries.
+# This is after config.host so we can augment tmake_file.
+# Link with -nostartfiles -nodefaultlibs since neither are present while
+# building libgcc.
+case ${host} in
+i?86-*-solaris2.1[[0-9]]*)
+  cat > conftest.s <<EOF
+       .section        .eh_frame,"a",@unwind
+       .zero   4
+       .section        .jcr,"aw",@progbits
+       .zero   8
+EOF
+  if AC_TRY_COMMAND(${CC-cc} -shared -nostartfiles -nodefaultlibs -o conftest.so conftest.s 1>&AS_MESSAGE_LOG_FD); then
+      # configure expects config files in libgcc/config, so need a relative
+      # path here.
+      tmake_file="${tmake_file} ../../gcc/config/i386/t-crtstuff"
+  fi
+  ;;
+esac
+
 # Check for visibility support.  This is after config.host so that
 # we can check for asm_hidden_op.
 AC_CACHE_CHECK([for __attribute__((visibility("hidden")))],