mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
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
This commit is contained in:
parent
444fdea19d
commit
cb7a1eba45
18
autoconf/aclocal.m4
vendored
18
autoconf/aclocal.m4
vendored
@ -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
|
||||
])
|
||||
|
@ -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 **************************************************************************
|
||||
|
50
configure
vendored
50
configure
vendored
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user