diff options
author | John Criswell <criswell@uiuc.edu> | 2003-11-17 19:46:02 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2003-11-17 19:46:02 +0000 |
commit | cb7a1eba4571f1efb472121f585b1dfcdea90bc7 (patch) | |
tree | c2dfd1e6542930908c9d806f53366748ae7bddd1 /autoconf | |
parent | 444fdea19d7c8ea54770080f7311e217497d6915 (diff) | |
download | external_llvm-cb7a1eba4571f1efb472121f585b1dfcdea90bc7.zip external_llvm-cb7a1eba4571f1efb472121f585b1dfcdea90bc7.tar.gz external_llvm-cb7a1eba4571f1efb472121f585b1dfcdea90bc7.tar.bz2 |
Added a check for the -R linker option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/aclocal.m4 | 18 | ||||
-rw-r--r-- | autoconf/configure.ac | 3 |
2 files changed, 20 insertions, 1 deletions
diff --git a/autoconf/aclocal.m4 b/autoconf/aclocal.m4 index aca868a..32db1b3 100644 --- a/autoconf/aclocal.m4 +++ b/autoconf/aclocal.m4 @@ -6244,4 +6244,20 @@ AC_DEFUN([AC_C_PRINTF_A], 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 +]) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 06d06b9..c3d6c0a 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -523,6 +523,9 @@ dnl these checks should go away. 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 ************************************************************************** |