[llvm-commits] CVS: llvm/autoconf/aclocal.m4 configure.ac

John Criswell criswell at cs.uiuc.edu
Mon Nov 17 13:47:01 PST 2003


Changes in directory llvm/autoconf:

aclocal.m4 updated: 1.8 -> 1.9
configure.ac updated: 1.55 -> 1.56

---
Log message:

Added a check for the -R linker option.



---
Diffs of the changes:  (+20 -1)

Index: llvm/autoconf/aclocal.m4
diff -u llvm/autoconf/aclocal.m4:1.8 llvm/autoconf/aclocal.m4:1.9
--- llvm/autoconf/aclocal.m4:1.8	Sun Nov  9 21:06:07 2003
+++ llvm/autoconf/aclocal.m4	Mon Nov 17 13:46:01 2003
@@ -6244,4 +6244,20 @@
 	fi
 ])
 
-
+#
+# Determine if the system can handle the -R option being passed to the linker.
+#
+AC_DEFUN([AC_LINK_USE_R],
+[
+  AC_LANG_SAVE
+  AC_LANG_C
+  oldcflags=${CFLAGS}
+  CFLAGS="${CFLAGS} -Wl,-R."
+  AC_LINK_IFELSE([int main() { return 0;}],[ac_cv_link_use_r=yes],[ac_cv_link_se_r=no])
+  CFLAGS=${oldcflags}
+  AC_LANG_RESTORE
+  if test "$ac_cv_link_use_r = yes"
+  then
+    AC_DEFINE([HAVE_LINK_R],[1])
+  fi
+])


Index: llvm/autoconf/configure.ac
diff -u llvm/autoconf/configure.ac:1.55 llvm/autoconf/configure.ac:1.56
--- llvm/autoconf/configure.ac:1.55	Sun Nov 16 18:30:48 2003
+++ llvm/autoconf/configure.ac	Mon Nov 17 13:46:02 2003
@@ -523,6 +523,9 @@
 AC_CHECK_FUNC(mmap,,AC_MSG_ERROR([Function mmap() required but not found]))
 AC_CHECK_FUNC(mprotect,,AC_MSG_ERROR([Function mprotect() required but not found]))
 
+dnl Determine if the linker supports the -R option.
+AC_LINK_USE_R()
+
 dnl **************************************************************************
 dnl * Enable various compile-time options
 dnl **************************************************************************





More information about the llvm-commits mailing list