diff options
Diffstat (limited to 'gold/configure')
-rwxr-xr-x | gold/configure | 67 |
1 files changed, 62 insertions, 5 deletions
diff --git a/gold/configure b/gold/configure index 1a0d47d..5a7268d 100755 --- a/gold/configure +++ b/gold/configure @@ -6486,18 +6486,32 @@ WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmi LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" -for ac_func in chsize +for ac_header in sys/mman.h do : - ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize" -if test "x$ac_cv_func_chsize" = x""yes; then : + ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mman_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_CHSIZE 1 +#define HAVE_SYS_MMAN_H 1 +_ACEOF + +fi + +done + +for ac_func in chsize mmap +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -for ac_func in pread ftruncate mremap ffsll +for ac_func in pread ftruncate ffsll do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -6519,6 +6533,49 @@ done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking mremap with MREMAP_MAYMOVE" >&5 +$as_echo_n "checking mremap with MREMAP_MAYMOVE... " >&6; } +if test "${gold_cv_lib_mremap_maymove+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include <sys/mman.h> +void f() { mremap (0, 0, 0, MREMAP_MAYMOVE); } + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gold_cv_lib_mremap_maymove=yes +else + gold_cv_lib_mremap_maymove=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_lib_mremap_maymove" >&5 +$as_echo "$gold_cv_lib_mremap_maymove" >&6; } +if test "$gold_cv_lib_mremap_maymove" = "yes"; then + +$as_echo "#define HAVE_MREMAP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" mremap.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mremap.$ac_objext" + ;; +esac + +fi + # Link in zlib if we can. This allows us to write compressed sections. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 $as_echo_n "checking for library containing zlibVersion... " >&6; } |