aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2003-11-17 19:46:02 +0000
committerJohn Criswell <criswell@uiuc.edu>2003-11-17 19:46:02 +0000
commitcb7a1eba4571f1efb472121f585b1dfcdea90bc7 (patch)
treec2dfd1e6542930908c9d806f53366748ae7bddd1 /configure
parent444fdea19d7c8ea54770080f7311e217497d6915 (diff)
downloadexternal_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 'configure')
-rwxr-xr-xconfigure50
1 files changed, 50 insertions, 0 deletions
diff --git a/configure b/configure
index 4f70a4c..abdffc3 100755
--- a/configure
+++ b/configure
@@ -22980,6 +22980,56 @@ fi
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ oldcflags=${CFLAGS}
+ CFLAGS="${CFLAGS} -Wl,-R."
+ cat >conftest.$ac_ext <<_ACEOF
+int main() { return 0;}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_link_use_r=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_link_se_r=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ CFLAGS=${oldcflags}
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ if test "$ac_cv_link_use_r = yes"
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LINK_R 1
+_ACEOF
+
+ fi
+
+
+
# Check whether --enable-purify or --disable-purify was given.
if test "${enable_purify+set}" = set; then
enableval="$enable_purify"