Since I posted the port the last time, there have been a number of changes
as well in GCC trunk as in the port, so a new patch set is required to
build the port in trunk.

Sanity-checked by bootstrapping i686-pc-linux-gnu.

OK to apply?
toplevel:

2013-02-25  Simon Cook  <simon.c...@embecosm.com>

        Changes to build configuration to allow big endian ARC ELF toolchain
        * configure.ac: Also add target-libgloss to noconfigdirs for arceb-*-*.
        * configure: Regenerate.

gcc:

2013-04-03  Joern Rennecke  <joern.renne...@embecosm.com>
            Brendan Kehoe  <bren...@zen.org>
            Simon Cook  <simon.c...@embecosm.com>

         * config.gcc (arc*-*-elf*, arc*-*-linux-uclibc*): New configurations.

libstdc++-v3:

2012-08-16  Joern Rennecke  <joern.renne...@embecosm.com>

        * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Also check for
        _Unwind_SjLj_Register when deciding if to set enable_sjlj_exceptions.
        * configure: Regenerate.

contrib:

2013-09-05  Joern Rennecke  <joern.renne...@embecosm.com>

        * config-list.mk: Add arc configurations.

diff --git a/configure.ac b/configure.ac
index d72b40a..b5caebb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -956,7 +956,7 @@ case "${target}" in
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
     ;;
-  arc-*-*)
+  arc-*-*|arceb-*-*)
     noconfigdirs="$noconfigdirs target-libgloss"
     ;;
   arm-*-pe*)
diff --git a/contrib/config-list.mk b/contrib/config-list.mk
index 9a141c2..0033937 100644
--- a/contrib/config-list.mk
+++ b/contrib/config-list.mk
@@ -14,6 +14,8 @@ TEST=all-gcc
 LIST = aarch64-elf aarch64-linux-gnu \
   alpha-linux-gnu alpha-freebsd6 alpha-netbsd alpha-openbsd \
   alpha64-dec-vms alpha-dec-vms am33_2.0-linux \
+  arc-elf32OPT-with-cpu=arc600 arc-elf32OPT-with-cpu=arc700 \
+  arc-linux-uclibcOPT-with-cpu=arc700 arceb-linux-uclibcOPT-with-cpu=arc700 \
   arm-wrs-vxworks arm-netbsdelf \
   arm-linux-androideabi arm-uclinux_eabi arm-eabi \
   arm-symbianelf avr-rtems avr-elf \
diff --git a/gcc/config.gcc b/gcc/config.gcc
index eeab290..6c25784 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -324,6 +324,9 @@ alpha*-*-*)
 am33_2.0-*-linux*)
        cpu_type=mn10300
        ;;
+arc*-*-*)
+       cpu_type=arc
+       ;;
 arm*-*-*)
        cpu_type=arm
        extra_headers="mmintrin.h arm_neon.h"
@@ -838,7 +841,7 @@ case ${target} in
     *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
   esac
   ;;
-*-*-elf)
+*-*-elf|arc*-*-elf*)
   # Assume that newlib is being used and so __cxa_atexit is provided.
   default_use_cxa_atexit=yes
   use_gcc_stdint=wrap
@@ -925,6 +928,54 @@ alpha*-dec-*vms*)
        tm_file="${tm_file} vms/vms.h alpha/vms.h"
        tmake_file="${tmake_file} alpha/t-vms"
        ;;
+arc*-*-elf*)
+       extra_headers="arc-simd.h"
+       tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
+       tmake_file="arc/t-arc-newlib arc/t-arc"
+       case x"${with_cpu}" in
+         xarc600|xarc601|xarc700)
+               target_cpu_default="TARGET_CPU_$with_cpu"
+               ;;
+       esac
+       if test x${with_endian} = x; then
+               case ${target} in
+               arc*be-*-* | arc*eb-*-*)        with_endian=big ;;
+               *)                              with_endian=little ;;
+               esac
+       fi
+       case ${with_endian} in
+       big|little)             ;;
+       *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
+       esac
+       case ${with_endian} in
+       big*)   
tm_defines="DRIVER_ENDIAN_SELF_SPECS=\\\"%{!EL:%{!mlittle-endian:-mbig-endian}}\\\"
 ${tm_defines}"
+       esac
+       ;;
+arc*-*-linux-uclibc*)
+       extra_headers="arc-simd.h"
+       tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file}"
+       tmake_file="${tmake_file} arc/t-arc-uClibc arc/t-arc"
+       tm_defines="${tm_defines} TARGET_SDATA_DEFAULT=0"
+       tm_defines="${tm_defines} TARGET_MMEDIUM_CALLS_DEFAULT=1"
+       case x"${with_cpu}" in
+         xarc600|xarc601|xarc700)
+               target_cpu_default="TARGET_CPU_$with_cpu"
+               ;;
+       esac
+       if test x${with_endian} = x; then
+               case ${target} in
+               arc*be-*-* | arc*eb-*-*)        with_endian=big ;;
+               *)                              with_endian=little ;;
+               esac
+       fi
+       case ${with_endian} in
+       big|little)             ;;
+       *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
+       esac
+       case ${with_endian} in
+       big*)   
tm_defines="DRIVER_ENDIAN_SELF_SPECS=\\\"%{!EL:%{!mlittle-endian:-mbig-endian}}\\\"
 ${tm_defines}"
+       esac
+        ;;
 arm-wrs-vxworks)
        tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h 
arm/vxworks.h"
        extra_options="${extra_options} arm/vxworks.opt"
@@ -3328,6 +3379,17 @@ case "${target}" in
                done
                ;;
 
+       arc*-*-*) # was:        arc*-*-linux-uclibc)
+               supported_defaults="cpu"
+               case $with_cpu in
+                 arc600|arc601|arc700)
+                       ;;
+                 *) echo "Unknown cpu type"
+                       exit 1
+                       ;;
+               esac
+               ;;
+
        arm*-*-*)
                supported_defaults="arch cpu float tune fpu abi mode tls"
                for which in cpu tune; do
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 72b90a8..f9d12d0 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3139,6 +3139,8 @@ EOF
     if AC_TRY_EVAL(ac_compile); then
       if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
        enable_sjlj_exceptions=yes
+      elif grep _Unwind_SjLj_Register conftest.s >/dev/null 2>&1 ; then
+       enable_sjlj_exceptions=yes
       elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
        enable_sjlj_exceptions=no
       elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then

Reply via email to