-DNO_GOT_CHECK=@got_check@ \
-DUSE_EMIT_RELOCS=@emit_relocs@ \
-DEMIT_CTOR_DTOR=@emit_ctor_dtor@ \
- -DALWAYS_RELOC_TEXT=@always_reloc_text@
+ -DALWAYS_RELOC_TEXT=@always_reloc_text@ \
+ -DHAVE_BFD_XTENSA_PDIFF_RELOCS=@HAVE_BFD_XTENSA_PDIFF_RELOCS@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
ac_subst_vars='LTLIBOBJS
LIBOBJS
+HAVE_BFD_XTENSA_PDIFF_RELOCS
SYMBOL_PREFIX
always_reloc_text
emit_ctor_dtor
} # ac_fn_c_try_link
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
fi
+HAVE_BFD_XTENSA_PDIFF_RELOCS=0
+case $target in
+ xtensa*)
+ OLD_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="-I$bfd_include_dir -I$binutils_include_dir $CPPFLAGS"
+ ac_fn_c_check_decl "$LINENO" "R_XTENSA_PDIFF8" "ac_cv_have_decl_R_XTENSA_PDIFF8" "#include \"bfd.h\"
+ #include \"elf/xtensa.h\"
+"
+if test "x$ac_cv_have_decl_R_XTENSA_PDIFF8" = xyes; then :
+ HAVE_BFD_XTENSA_PDIFF_RELOCS=1
+fi
+
+ CPPFLAGS=$OLD_CPPFLAGS
+ ;;
+esac
+
for ac_func in vprintf
do :
ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
+
ac_config_files="$ac_config_files ld-elf2flt.sh:ld-elf2flt.in Makefile elf2flt.ld"
cat >confcache <<\_ACEOF
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
+HAVE_BFD_XTENSA_PDIFF_RELOCS=0
+case $target in
+ xtensa*)
+ AS_VAR_COPY([OLD_CPPFLAGS], [CPPFLAGS])
+ AS_VAR_SET([CPPFLAGS], ["-I$bfd_include_dir -I$binutils_include_dir $CPPFLAGS"])
+ AC_CHECK_DECL([R_XTENSA_PDIFF8],
+ [HAVE_BFD_XTENSA_PDIFF_RELOCS=1],,
+ [#include "bfd.h"
+ #include "elf/xtensa.h"])
+ AS_VAR_COPY([CPPFLAGS], [OLD_CPPFLAGS])
+ ;;
+esac
+
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_SUBST(emit_ctor_dtor)
AC_SUBST(always_reloc_text)
AC_SUBST(SYMBOL_PREFIX)
+AC_SUBST(HAVE_BFD_XTENSA_PDIFF_RELOCS)
AC_OUTPUT(ld-elf2flt.sh:ld-elf2flt.in Makefile elf2flt.ld)