s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
+sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;;
esac
if test $TARGETDIR = unknown; then
SH_FALSE=
fi
+if test x$TARGET = xSH64; then
+ SH64_TRUE=
+ SH64_FALSE='#'
+else
+ SH64_TRUE='#'
+ SH64_FALSE=
+fi
+
if test x$TARGET = xMIPS_LINUX; then
TARGET=MIPS
fi
EOF
fi
+
+ echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
+echo "configure:3600: checking assembler .register pseudo-op support" >&5
+if eval "test \"`echo '$''{'libffi_cv_as_register_pseudo_op'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ libffi_cv_as_register_pseudo_op=unknown
+ # Check if we have .register
+ cat > conftest.$ac_ext <<EOF
+#line 3608 "configure"
+#include "confdefs.h"
+asm (".register %g2, #scratch");
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ libffi_cv_as_register_pseudo_op=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ libffi_cv_as_register_pseudo_op=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$libffi_cv_as_register_pseudo_op" 1>&6
+ if test "x$libffi_cv_as_register_pseudo_op" = xyes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_AS_REGISTER_PSEUDO_OP 1
+EOF
+
+ fi
+fi
+
+echo $ac_n "checking whether .eh_frame section should be read-only""... $ac_c" 1>&6
+echo "configure:3495: checking whether .eh_frame section should be read-only" >&5
+if eval "test \"`echo '$''{'libffi_cv_ro_eh_frame'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ libffi_cv_ro_eh_frame=no
+ echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
+ if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
+ if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
+ libffi_cv_ro_eh_frame=yes
+ elif grep '.section.*eh_frame.*#alloc' conftest.c \
+ | grep -v '#write' > /dev/null; then
+ libffi_cv_ro_eh_frame=yes
+ fi
+ fi
+ rm -f conftest.*
+
+fi
+
+echo "$ac_t""$libffi_cv_ro_eh_frame" 1>&6
+if test "x$libffi_cv_ro_eh_frame" = xyes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_RO_EH_FRAME 1
+EOF
+
fi
s%@X86_64_FALSE@%$X86_64_FALSE%g
s%@SH_TRUE@%$SH_TRUE%g
s%@SH_FALSE@%$SH_FALSE%g
+s%@SH64_TRUE@%$SH64_TRUE%g
+s%@SH64_FALSE@%$SH64_FALSE%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@TARGET@%$TARGET%g