diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-20 23:14:07 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-20 23:14:07 +0200 |
commit | c59fc9e953db9723b34eebe96c3ad2cef893c4bb (patch) | |
tree | bd9c6dd8e8343d17c80a1a5d6762e1f99f3367b7 /configure | |
parent | 654611b4d68129954697bb94d49c671e164ec938 (diff) | |
parent | 784b06732b24f3079e88e5be4284b645aa715512 (diff) |
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Conflicts:
configure
configure.in
hurd/ctty-input.c
hurd/ctty-output.c
hurd/hurd/signal.h
hurd/hurdexec.c
hurd/hurdmsg.c
hurd/hurdsig.c
hurd/hurdsocket.h
socket/recvmmsg.c
socket/sendmmsg.c
sysdeps/mach/hurd/i386/sigreturn.c
sysdeps/mach/hurd/i386/trampoline.c
sysdeps/mach/hurd/pipe.c
sysdeps/mach/hurd/recvmsg.c
sysdeps/mach/hurd/sendmsg.c
sysdeps/mach/hurd/sigaction.c
sysdeps/mach/hurd/sigpending.c
sysdeps/mach/hurd/sigprocmask.c
sysdeps/mach/hurd/sigsuspend.c
sysdeps/mach/hurd/sigwait.c
sysdeps/mach/hurd/socketpair.c
sysdeps/mach/hurd/tls.h
sysdeps/unix/sysv/linux/recvmmsg.c
sysdeps/unix/sysv/linux/sendmmsg.c
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 526 |
1 files changed, 195 insertions, 331 deletions
@@ -659,6 +659,7 @@ libc_cv_nss_crypt all_warnings force_install bindnow +hardcoded_path_in_tests oldest_abi use_default_link sysheaders @@ -685,6 +686,10 @@ build_vendor build_cpu build subdirs +REPORT_BUGS_TEXI +REPORT_BUGS_TO +PKGVERSION_TEXI +PKGVERSION target_alias host_alias build_alias @@ -726,6 +731,8 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +with_pkgversion +with_bugurl with_gd with_gd_include with_gd_lib @@ -739,6 +746,7 @@ enable_shared enable_profile enable_versioning enable_oldest_abi +enable_hardcoded_path_in_tests enable_stackguard_randomization enable_add_ons enable_hidden_plt @@ -1391,6 +1399,9 @@ Optional Features: objects [default=yes if supported] --enable-oldest-abi=ABI configure the oldest ABI supported [e.g. 2.2] [default=glibc default] + --enable-hardcoded-path-in-tests + hardcode newly built glibc path in tests + [default=no] --enable-stackguard-randomization initialize __stack_chk_guard canary with a random number at program start @@ -1417,6 +1428,8 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pkgversion=PKG Use PKG in the version string in place of "GNU libc" + --with-bugurl=URL Direct users to URL to report a bug --with-gd=DIR find libgd include dir and library with prefix DIR --with-gd-include=DIR find libgd include files in DIR --with-gd-lib=DIR find libgd library files in DIR @@ -1560,43 +1573,6 @@ fi } # ac_fn_c_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. @@ -2285,10 +2261,78 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Check whether --with-pkgversion was given. +if test "${with_pkgversion+set}" = set; then : + withval=$with_pkgversion; case "$withval" in + yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; + no) PKGVERSION= ;; + *) PKGVERSION="($withval) " ;; + esac +else + PKGVERSION="(GNU libc) " + +fi + + PKGVERSION_TEXI=`echo "$PKGVERSION" | sed 's/@/@@/g'` + + + + + +# Check whether --with-bugurl was given. +if test "${with_bugurl+set}" = set; then : + withval=$with_bugurl; case "$withval" in + yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; + no) BUGURL= + ;; + *) BUGURL="$withval" + ;; + esac +else + BUGURL="http://www.gnu.org/software/libc/bugs.html" + +fi + + case ${BUGURL} in + "") + REPORT_BUGS_TO= + REPORT_BUGS_TEXI= + ;; + *) + REPORT_BUGS_TO="<$BUGURL>" + REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} + ;; + esac; + + + + +cat >>confdefs.h <<_ACEOF +#define PKGVERSION "$PKGVERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define REPORT_BUGS_TO "$REPORT_BUGS_TO" +_ACEOF + + # Do not make decisions based on the host system's C library, as we must be # independent of it. +# We require GCC, and by default use its preprocessor. Override AC_PROG_CPP +# here to work around the Autoconf issue discussed in +# <http://sourceware.org/ml/libc-alpha/2013-01/msg00721.html>. +# AC_PROG_CPP + +# We require GCC. Override _AC_PROG_CC_C89 here to work around the Autoconf +# issue discussed in +# <http://sourceware.org/ml/libc-alpha/2013-01/msg00757.html>. + + subdirs="$subdirs " @@ -2861,96 +2905,6 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3003,142 +2957,13 @@ done fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue + CPP="$CC -E" fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu # We need the C++ compiler only for testing. ac_ext=cpp @@ -3633,6 +3458,15 @@ _ACEOF fi +# Check whether --enable-hardcoded-path-in-tests was given. +if test "${enable_hardcoded_path_in_tests+set}" = set; then : + enableval=$enable_hardcoded_path_in_tests; hardcoded_path_in_tests=$enableval +else + hardcoded_path_in_tests=no +fi + + + # Check whether --enable-stackguard-randomization was given. if test "${enable_stackguard_randomization+set}" = set; then : enableval=$enable_stackguard_randomization; enable_stackguard_randomize=$enableval @@ -4152,7 +3986,7 @@ $as_echo_n "checking for assembler and linker STT_GNU_IFUNC support... " >&6; } if ${libc_cv_ld_gnu_indirect_function+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.s <<EOF + cat > conftest.S <<EOF .type foo,%gnu_indirect_function foo: .globl _start @@ -4160,12 +3994,16 @@ _start: .globl __start __start: .data +#ifdef _LP64 +.quad foo +#else .long foo +#endif EOF libc_cv_ld_gnu_indirect_function=no if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ -nostartfiles -nostdlib \ - -o conftest conftest.s 1>&5 2>&5; then + -o conftest conftest.S 1>&5 2>&5; then # Do a link to see if the backend supports IFUNC relocs. $READELF -r conftest 1>&5 LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || { @@ -4212,6 +4050,7 @@ if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then multi_arch=no fi fi +multi_arch_d= if test x"$multi_arch" != xno; then multi_arch_d=/multiarch fi @@ -4264,11 +4103,16 @@ while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do set $m # Prepend the machine's FPU directory unless --without-fp. if test "$with_fp" = yes; then - mach="$mach /$1/fpu" + maybe_fpu=/fpu else - mach="$mach /$1/nofpu" + maybe_fpu=/nofpu fi - mach="$mach /$1" + # For each machine term, try it with and then without /multiarch. + for try_fpu in $maybe_fpu ''; do + for try_multi in $multi_arch_d ''; do + mach="$mach /$1$try_fpu$try_multi" + done + done tail="$2" done @@ -4282,15 +4126,16 @@ for b in $base ''; do test "$v" = / && continue for o in /$ostry ''; do test "$o" = / && continue - for m in $multi_arch_d $mach ''; do + for m in $mach ''; do for d in $add_ons_pfx ''; do for a in $add_ons_sfx ''; do - if test -n "$m0$m0sub$b$v$o$m$msub"; then + try_suffix="$m0$b$v$o$m" + if test -n "$try_suffix"; then try_srcdir="${srcdir}/" case "$d" in /*) try_srcdir= ;; esac - try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a" + try="${d}sysdeps$try_suffix$a" test -n "$enable_debug_configure" && echo "$0 DEBUG: try $try" >&2 if test -d "$try_srcdir$try"; then @@ -5354,12 +5199,11 @@ if test -n "$sysheaders"; then -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" if test -n "$CXX"; then CXX_SYSINCLUDES= - cxxmachine=`$CXX -dumpmachine 2>&5` && - cxxheaders=`$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \ - | sed -n -e '1,/#include/d' -e '/^ \//{p;q;}' | sed 's/ //'` - test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" && - CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \ --isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward" + for cxxheaders in `$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \ + | sed -n -e '1,/#include/d' -e 's/^ \(\/.*\/[cg]++\)/\1/p'`; do + test "x$cxxheaders" != x && + CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders" + done fi fi @@ -6166,86 +6010,101 @@ if test $libc_cv_cc_with_libunwind = yes; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z nodelete option" >&5 -$as_echo_n "checking for -z nodelete option... " >&6; } -if ${libc_cv_z_nodelete+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<EOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z nodelete" >&5 +$as_echo_n "checking for linker that supports -z nodelete... " >&6; } +libc_linker_feature=no +if test x"$gnu_ld" = x"yes"; then + libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z nodelete"` + if test -n "$libc_linker_check"; then + cat > conftest.c <<EOF int _start (void) { return 42; } EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -fPIC -shared -o conftest.so conftest.c - -nostartfiles -nostdlib - -Wl,--enable-new-dtags,-z,nodelete 1>&5' + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -Wl,--enable-new-dtags,-z,nodelete -nostdlib -nostartfiles + -fPIC -shared -o conftest.so conftest.c + 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } -then + then + libc_linker_feature=yes + fi + rm -f conftest* + fi +fi +if test $libc_linker_feature = yes; then libc_cv_z_nodelete=yes else as_fn_error $? "linker with -z nodelete support required" "$LINENO" 5 fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_nodelete" >&5 -$as_echo "$libc_cv_z_nodelete" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5 +$as_echo "$libc_linker_feature" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z nodlopen option" >&5 -$as_echo_n "checking for -z nodlopen option... " >&6; } -if ${libc_cv_z_nodlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<EOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z nodlopen" >&5 +$as_echo_n "checking for linker that supports -z nodlopen... " >&6; } +libc_linker_feature=no +if test x"$gnu_ld" = x"yes"; then + libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z nodlopen"` + if test -n "$libc_linker_check"; then + cat > conftest.c <<EOF int _start (void) { return 42; } EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -fPIC -shared -o conftest.so conftest.c - -nostartfiles -nostdlib - -Wl,--enable-new-dtags,-z,nodlopen 1>&5' + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -Wl,--enable-new-dtags,-z,nodlopen -nostdlib -nostartfiles + -fPIC -shared -o conftest.so conftest.c + 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } -then + then + libc_linker_feature=yes + fi + rm -f conftest* + fi +fi +if test $libc_linker_feature = yes; then libc_cv_z_nodlopen=yes else as_fn_error $? "linker with -z nodlopen support required" "$LINENO" 5 fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_nodlopen" >&5 -$as_echo "$libc_cv_z_nodlopen" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5 +$as_echo "$libc_linker_feature" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z initfirst option" >&5 -$as_echo_n "checking for -z initfirst option... " >&6; } -if ${libc_cv_z_initfirst+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<EOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z initfirst" >&5 +$as_echo_n "checking for linker that supports -z initfirst... " >&6; } +libc_linker_feature=no +if test x"$gnu_ld" = x"yes"; then + libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z initfirst"` + if test -n "$libc_linker_check"; then + cat > conftest.c <<EOF int _start (void) { return 42; } EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -fPIC -shared -o conftest.so conftest.c - -nostartfiles -nostdlib - -Wl,--enable-new-dtags,-z,initfirst 1>&5' + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -Wl,--enable-new-dtags,-z,initfirst -nostdlib -nostartfiles + -fPIC -shared -o conftest.so conftest.c + 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } -then + then + libc_linker_feature=yes + fi + rm -f conftest* + fi +fi +if test $libc_linker_feature = yes; then libc_cv_z_initfirst=yes else as_fn_error $? "linker with -z initfirst support required" "$LINENO" 5 fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_initfirst" >&5 -$as_echo "$libc_cv_z_initfirst" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5 +$as_echo "$libc_linker_feature" >&6; } # Add-on fragments can set these for other machines. libc_commonpagesize=${libc_commonpagesize:-no} @@ -6442,32 +6301,37 @@ if test "$libc_cv_z_combreloc" = yes; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z execstack" >&5 -$as_echo_n "checking for -z execstack... " >&6; } -if ${libc_cv_z_execstack+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<EOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z execstack" >&5 +$as_echo_n "checking for linker that supports -z execstack... " >&6; } +libc_linker_feature=no +if test x"$gnu_ld" = x"yes"; then + libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z execstack"` + if test -n "$libc_linker_check"; then + cat > conftest.c <<EOF int _start (void) { return 42; } EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -fPIC -shared -o conftest.so conftest.c - -Wl,-z,execstack -nostdlib - 1>&5' + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -Wl,-z,execstack -nostdlib -nostartfiles + -fPIC -shared -o conftest.so conftest.c + 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } -then + then + libc_linker_feature=yes + fi + rm -f conftest* + fi +fi +if test $libc_linker_feature = yes; then libc_cv_z_execstack=yes else libc_cv_z_execstack=no fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_execstack" >&5 -$as_echo "$libc_cv_z_execstack" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5 +$as_echo "$libc_linker_feature" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fpie" >&5 |