diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-07 22:48:10 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-07 22:48:10 +0000 |
commit | 5646395db284960872ceedfef587b49035d29ebe (patch) | |
tree | 2cc5994f81d8776fc5e0b254f4578c6dcd94b4b3 /gcc/aclocal.m4 | |
parent | 8fb1488cd750fc8c0395874ff4fa42d4096ba191 (diff) | |
download | gcc-5646395db284960872ceedfef587b49035d29ebe.tar.gz |
* config/ia64/crtend.asm: Include "auto-host.h".
[HAVE_INITFINI_ARRAY]: Invoke __do_global_ctors_aux via .init_array.
* config/ia64/crtbegin.asm: Similarly.
* config/ia64/t-ia64 (crtbegin.o): Include from current directory.
(crtend.o, crtbeginS.o, crtendS.o): Likewise.
* aclocal.m4 (gcc_AC_INITFINI_ARRAY): New.
* configure.in: Use it if --enable-initfini-array not specified.
* doc/install.texi (Configuration): Document --enable-initfini-array.
* configure, config.in: Rebuild.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58909 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/aclocal.m4')
-rw-r--r-- | gcc/aclocal.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index 0c4b5c638d0..acfef120c71 100644 --- a/gcc/aclocal.m4 +++ b/gcc/aclocal.m4 @@ -1690,3 +1690,29 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) + +AC_DEFUN(gcc_AC_INITFINI_ARRAY, +[AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, + gcc_cv_initfinit_array, [dnl + cat > conftest.c <<EOF +static int x = -1; +int main (void) { return x; } +int foo (void) { x = 0; } +int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; +EOF + if AC_TRY_COMMAND([${CC-cc} -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]) + then + if ./conftest; then + gcc_cv_initfinit_array=yes + else + gcc_cv_initfinit_array=no + fi + else + gcc_cv_initfinit_array=no + fi + rm -f conftest*]) + AC_SUBST(gcc_cv_initfinit_array) + if test $gcc_cv_initfinit_array = yes; then + AC_DEFINE(HAVE_INITFINI_ARRAY, 1, + [Define .init_array/.fini_array sections are available and working.]) + fi]) |