diff options
author | Alan Modra <amodra@gmail.com> | 2015-12-02 19:23:41 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-12-02 19:24:34 +1030 |
commit | 26e3a0c9ba4a8376fdf9f898637919d144d8b1d8 (patch) | |
tree | 0ca1b1292613c63d98adbe15a5c99704ec3649e8 | |
parent | c27b8c2aeb369972f4f9f98f390607694c56a127 (diff) | |
download | gdb-26e3a0c9ba4a8376fdf9f898637919d144d8b1d8.zip gdb-26e3a0c9ba4a8376fdf9f898637919d144d8b1d8.tar.gz gdb-26e3a0c9ba4a8376fdf9f898637919d144d8b1d8.tar.bz2 |
Make --enable-initfini-array the default
* configure.ac (--enable-initfini-array): Remove run test. Default
to "yes". Change help string to --disable-initfini-array.
* configure: Regenerate.
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rwxr-xr-x | ld/configure | 43 | ||||
-rw-r--r-- | ld/configure.ac | 22 |
3 files changed, 17 insertions, 54 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index c2fabd3..0f622d0 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2015-12-02 Alan Modra <amodra@gmail.com> + + * configure.ac (--enable-initfini-array): Remove run test. Default + to "yes". Change help string to --disable-initfini-array. + * configure: Regenerate. + 2015-11-20 Maciej W. Rozycki <macro@imgtec.com> * configure.tgt <mips*el-mti-elf*, mips*el-img-elf*>: Add diff --git a/ld/configure b/ld/configure index 120d934..d019688 100755 --- a/ld/configure +++ b/ld/configure @@ -1450,7 +1450,7 @@ Optional Features: --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings --disable-nls do not use Native Language Support - --enable-initfini-array use .init_array/.fini_array sections + --disable-initfini-array do not use .init_array/.fini_array sections Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -16814,43 +16814,12 @@ fi # Check whether --enable-initfini-array was given. if test "${enable_initfini_array+set}" = set; then : - enableval=$enable_initfini_array; -else - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5 -$as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; } -if test "${gcc_cv_initfini_array+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x${build}" = "x${target}" ; then - if test "$cross_compiling" = yes; then : - gcc_cv_initfini_array=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -static int x = -1; -int main (void) { return x; } -int foo (void) { x = 0; } -int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gcc_cv_initfini_array=yes + enableval=$enable_initfini_array; case "${enableval}" in + yes|no) ;; + *) as_fn_error "invalid --enable-initfini-array argument" "$LINENO" 5 ;; + esac else - gcc_cv_initfini_array=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - else - gcc_cv_initfini_array=no - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_initfini_array" >&5 -$as_echo "$gcc_cv_initfini_array" >&6; } - enable_initfini_array=$gcc_cv_initfini_array - + enable_initfini_array=yes fi diff --git a/ld/configure.ac b/ld/configure.ac index 188172d..d61beb2 100644 --- a/ld/configure.ac +++ b/ld/configure.ac @@ -215,23 +215,11 @@ AC_SEARCH_LIBS([dlopen], [dl]) AM_CONDITIONAL([ENABLE_PLUGINS], [test x$plugins = xyes]) AC_ARG_ENABLE(initfini-array, - [ --enable-initfini-array use .init_array/.fini_array sections], - [], [ -AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, - gcc_cv_initfini_array, [dnl - if test "x${build}" = "x${target}" ; then - AC_RUN_IFELSE([AC_LANG_SOURCE([ -static int x = -1; -int main (void) { return x; } -int foo (void) { x = 0; } -int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;])], - [gcc_cv_initfini_array=yes], [gcc_cv_initfini_array=no], - [gcc_cv_initfini_array=no]) - else - gcc_cv_initfini_array=no - fi]) - enable_initfini_array=$gcc_cv_initfini_array -]) +[ --disable-initfini-array do not use .init_array/.fini_array sections], +[case "${enableval}" in + yes|no) ;; + *) AC_MSG_ERROR([invalid --enable-initfini-array argument]) ;; + esac], [enable_initfini_array=yes]) AC_SUBST(enable_initfini_array) if test $enable_initfini_array = yes; then AC_DEFINE(HAVE_INITFINI_ARRAY, 1, |