diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-03-17 22:25:30 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-03-17 22:25:30 +0000 |
commit | 9201d894910e26e87fbfc0af24d9460797b1890f (patch) | |
tree | 777029282e401e722d33f5fc0528fc02c267979f /gold/configure.ac | |
parent | ef4ab7a8185e12b2a2e76982a9fe82c8d0f10a38 (diff) | |
download | gdb-9201d894910e26e87fbfc0af24d9460797b1890f.zip gdb-9201d894910e26e87fbfc0af24d9460797b1890f.tar.gz gdb-9201d894910e26e87fbfc0af24d9460797b1890f.tar.bz2 |
* configure.ac: Check for chsize and posix_fallocate. Replace
ftruncate.
* ftruncate.c: New file, from gnulib.
* output.cc (posix_fallocate): Define dummy version if not
HAVE_POSIX_FALLOCATE.
(Output_file::map): Call posix_fallocate rather than lseek and
write.
* gold.h (ftruncate): Declare if not HAVE_FTRUNCATE.
* configure, Makefile.in, config.in: Rebuild.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r-- | gold/configure.ac | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/configure.ac b/gold/configure.ac index c26c05d..134efe6 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -307,7 +307,8 @@ dnl host dependent. If build == host, we can check getconf LFS_CFLAGS. LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" AC_SUBST(LFS_CFLAGS) -AC_REPLACE_FUNCS(pread) +AC_CHECK_FUNCS(chsize) +AC_REPLACE_FUNCS(pread ftruncate) # Link in zlib if we can. This allows us to write compressed sections. AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)]) @@ -318,7 +319,7 @@ AC_LANG_PUSH(C++) AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map) AC_CHECK_HEADERS(ext/hash_map ext/hash_set) AC_CHECK_HEADERS(byteswap.h) -AC_CHECK_FUNCS(mallinfo) +AC_CHECK_FUNCS(mallinfo posix_fallocate) # gcc 4.3.0 doesn't recognize the printf attribute on a template # function. Check for that. This is gcc bug 35546. This test can |