aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-09-20 04:09:56 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-09-20 04:09:56 +0000
commit777ce17d357383bcd03847e6442d9f818b8dec2b (patch)
treeb250260808062bd08c80033ca7be1584394ead1a /configure
parenta42b525ea81030ba9a547c4867deb76eb96c98c0 (diff)
downloadexternal_llvm-777ce17d357383bcd03847e6442d9f818b8dec2b.zip
external_llvm-777ce17d357383bcd03847e6442d9f818b8dec2b.tar.gz
external_llvm-777ce17d357383bcd03847e6442d9f818b8dec2b.tar.bz2
Fix problems with AC_FUNC_MMAP_FILE and AC_LINK_USE_R that caused problems
with correctly recognizing mmap of files and the linker's support of -r. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure44
1 files changed, 34 insertions, 10 deletions
diff --git a/configure b/configure
index fccdd4c..33be7ef 100755
--- a/configure
+++ b/configure
@@ -23221,25 +23221,37 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_file=no
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef HAVE_SYS_MMAN_H
+#include <sys/types.h>
#include <sys/mman.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
#include <fcntl.h>
-#endif
+
+int
+main ()
+{
int fd;
int main () {
- fd = creat ("foo",0777); fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); unlink ("foo"); return (fd != (int) MAP_FAILED);}
+ fd = creat ("foo",0777);
+ fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0);
+ unlink ("foo");
+ return (fd != (int) MAP_FAILED);}
+ ;
+ return 0;
+}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -23654,7 +23666,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
oldcflags="$CFLAGS"
CFLAGS="$CFLAGS -Wl,-R."
cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
int main() { return 0; }
+ ;
+ return 0;
+}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5