PR 5146
authorNick Clifton <nickc@redhat.com>
Tue, 16 Oct 2007 15:15:50 +0000 (15:15 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 16 Oct 2007 15:15:50 +0000 (15:15 +0000)
* 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.

bfd/ChangeLog
bfd/config.in
bfd/configure
bfd/configure.in
bfd/elf64-hppa.c
bfd/som.c

index 09d3a7eaa14b269e30f5aa4b566569226b22474a..955877df951b4b426597c05110ec121d821e3fb8 100644 (file)
@@ -1,3 +1,13 @@
+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
index fd14f828b865aef66a25da0245cc36b1e84de96f..386488521056d9e5d12f5afbc4d3489a7f2b8ff7 100644 (file)
@@ -4,6 +4,9 @@
    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
index 806ee7edaa30bb370aea1c663bd1f90a529b958b..c15a11819162e9697df041c6d9235f9211b44d79 100755 (executable)
@@ -10531,14 +10531,11 @@ echo "$as_me: error: bad value ${enableval} for ELF STT_COMMON option" >&2;}
  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
@@ -10549,7 +10546,6 @@ fi
 
 
 
-
 # Check whether --with-pkgversion or --without-pkgversion was given.
 if test "${with_pkgversion+set}" = set; then
   withval="$with_pkgversion"
@@ -12548,7 +12544,8 @@ fi
 
 
 
-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
index ad8440e24a225fd89b117486b5fc3fe41b8c0ecc..ac83f114988f7feb869ddb66eadcc62a3ab8b83b 100644 (file)
@@ -171,7 +171,7 @@ AC_SUBST(BFD_HOSTPTR_T)
 
 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
index 9a4eae2af9bbb2e52697a064a87894f488027953..0eb1787a1199dfeee5771d9fd55c331f3eef4861 100644 (file)
@@ -19,7 +19,6 @@
    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
index 006af8cae2a914eabaf00b2316d40fcbdb7a9bd2..a43271c5b5ad91418e80f9e8ddadf9d9e09bdf42 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -23,7 +23,6 @@
    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 *);
This page took 0.034569 seconds and 4 git commands to generate.