+2007-10-16 Nick Clifton <nickc@redhat.com>
+
+ PR 5146
+ * configure.in (AC_CHECK_HEADERS): Add alloca.h
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * som.c: Replace alloca-conf.h inclusion with code recommended in
+ autoconf documentation.
+ * elf64-hppa.c: Likewise.
+
2007-10-16 Nick Clifton <nickc@redhat.com>
* configure.in (--enable-elf-stt-common): New configure
language is requested. */
#undef ENABLE_NLS
+/* Define to 1 if you have the <alloca.h> header file. */
+#undef HAVE_ALLOCA_H
+
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#undef HAVE_DECL_BASENAME
esac
else
# We have to choose a default behaviour. For native builds we could
-# test whether the loader supports the STT_COMMON type. For cross
-# toolchains we default to assuming that they are not supported.
-if test "$cross_compiling" != yes; then
- want_elf_stt_common=false
- else
- # XXX FIXME: Add code to test the loader here.
+# test whether the loader supports the STT_COMMON type, but that would
+# mean that built binaries could not be exported to older systems where
+# the loader does not support it. So by default we always choose to
+# disable this feature.
want_elf_stt_common=false
- fi
fi; if test $want_elf_stt_common = true; then
cat >>confdefs.h <<\_ACEOF
-
# Check whether --with-pkgversion or --without-pkgversion was given.
if test "${with_pkgversion+set}" = set; then
withval="$with_pkgversion"
-for ac_header in stddef.h string.h strings.h stdlib.h time.h unistd.h
+
+for ac_header in alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
BFD_CC_FOR_BUILD
-AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
+AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h)
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
GCC_HEADER_STDINT(bfd_stdint.h)
AC_HEADER_TIME
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include "alloca-conf.h"
#include "sysdep.h"
#include "bfd.h"
#include "libbfd.h"
#include "elf/hppa.h"
#include "libhppa.h"
#include "elf64-hppa.h"
+
+/* This is the code recommended in the autoconf documentation, almost
+ verbatim. */
+#ifndef __GNUC__
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+/* Indented so that pre-ansi C compilers will ignore it, rather than
+ choke on it. Some versions of AIX require this to be the first
+ thing in the file. */
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+# if !defined (__STDC__) && !defined (__hpux)
+extern char *alloca ();
+# else
+extern void *alloca ();
+# endif /* __STDC__, __hpux */
+# endif /* alloca */
+# endif /* _AIX */
+# endif /* HAVE_ALLOCA_H */
+#endif /* __GNUC__ */
+
+
#define ARCH_SIZE 64
#define PLT_ENTRY_SIZE 0x10
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "alloca-conf.h"
#include "sysdep.h"
#include "bfd.h"
#include <machine/reg.h>
#include <sys/file.h>
+/* This is the code recommended in the autoconf documentation, almost
+ verbatim. */
+
+#ifndef __GNUC__
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+/* Indented so that pre-ansi C compilers will ignore it, rather than
+ choke on it. Some versions of AIX require this to be the first
+ thing in the file. */
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+# if !defined (__STDC__) && !defined (__hpux)
+extern char *alloca ();
+# else
+extern void *alloca ();
+# endif /* __STDC__, __hpux */
+# endif /* alloca */
+# endif /* _AIX */
+# endif /* HAVE_ALLOCA_H */
+#endif /* __GNUC__ */
+
static bfd_reloc_status_type hppa_som_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_boolean som_mkobject (bfd *);