summaryrefslogtreecommitdiff
path: root/projects/sample/autoconf/m4/link_options.m4
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-03-12 22:40:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-03-12 22:40:22 +0000
commit9802a6cbdc2ddcb445fc8620fd756654de6d85b4 (patch)
tree3aaa6a28cdc4233c55a7d8084796af305455cc21 /projects/sample/autoconf/m4/link_options.m4
parent1da4b5ba045bd9d4c9c3760ca53101042d157ce4 (diff)
downloadllvm-9802a6cbdc2ddcb445fc8620fd756654de6d85b4.tar.gz
llvm-9802a6cbdc2ddcb445fc8620fd756654de6d85b4.tar.bz2
llvm-9802a6cbdc2ddcb445fc8620fd756654de6d85b4.tar.xz
Remove projects/sample.
As an example that was not actually being used, it suffered from a slow bitrot. The two main issues with it were that it had no cmake support and included a copy of the autoconf directory. The reality is that autoconf is not easily composable. The lack of composabilty is why we have clang options in llvm's configure. Suggesting that users include a copy of autoconf/ in their projects seems a bad idea. We are also in the process of switching to cmake, so pushing autoconf to new project is probably not what we want. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'projects/sample/autoconf/m4/link_options.m4')
-rw-r--r--projects/sample/autoconf/m4/link_options.m4109
1 files changed, 0 insertions, 109 deletions
diff --git a/projects/sample/autoconf/m4/link_options.m4 b/projects/sample/autoconf/m4/link_options.m4
deleted file mode 100644
index b58d61745f..0000000000
--- a/projects/sample/autoconf/m4/link_options.m4
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# Get the linker version string.
-#
-# This macro is specific to LLVM.
-#
-AC_DEFUN([AC_LINK_GET_VERSION],
- [AC_CACHE_CHECK([for linker version],[llvm_cv_link_version],
- [
- version_string="$(ld -v 2>&1 | head -1)"
-
- # Check for ld64.
- if (echo "$version_string" | grep -q "ld64"); then
- llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\{0,1\}#\1#")
- else
- llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#")
- fi
- ])
- AC_DEFINE_UNQUOTED([HOST_LINK_VERSION],"$llvm_cv_link_version",
- [Linker version detected at compile time.])
-])
-
-#
-# Determine if the system can handle the -R option being passed to the linker.
-#
-# This macro is specific to LLVM.
-#
-AC_DEFUN([AC_LINK_USE_R],
-[AC_CACHE_CHECK([for compiler -Wl,-R<path> option],[llvm_cv_link_use_r],
-[ AC_LANG_PUSH([C])
- oldcflags="$CFLAGS"
- CFLAGS="$CFLAGS -Wl,-R."
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
- [llvm_cv_link_use_r=yes],[llvm_cv_link_use_r=no])
- CFLAGS="$oldcflags"
- AC_LANG_POP([C])
-])
-if test "$llvm_cv_link_use_r" = yes ; then
- AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.])
- fi
-])
-
-#
-# Determine if the system can handle the -rdynamic option being passed
-# to the compiler.
-#
-# This macro is specific to LLVM.
-#
-AC_DEFUN([AC_LINK_EXPORT_DYNAMIC],
-[AC_CACHE_CHECK([for compiler -rdynamic option],
- [llvm_cv_link_use_export_dynamic],
-[ AC_LANG_PUSH([C])
- oldcflags="$CFLAGS"
- CFLAGS="$CFLAGS -rdynamic"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
- [llvm_cv_link_use_export_dynamic=yes],[llvm_cv_link_use_export_dynamic=no])
- CFLAGS="$oldcflags"
- AC_LANG_POP([C])
-])
-if test "$llvm_cv_link_use_export_dynamic" = yes ; then
- AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use -rdynamic.])
- fi
-])
-
-#
-# Determine if the system can handle the --version-script option being
-# passed to the linker.
-#
-# This macro is specific to LLVM.
-#
-AC_DEFUN([AC_LINK_VERSION_SCRIPT],
-[AC_CACHE_CHECK([for compiler -Wl,--version-script option],
- [llvm_cv_link_use_version_script],
-[ AC_LANG_PUSH([C])
- oldcflags="$CFLAGS"
-
- # The following code is from the autoconf manual,
- # "11.13: Limitations of Usual Tools".
- # Create a temporary directory $tmp in $TMPDIR (default /tmp).
- # Use mktemp if possible; otherwise fall back on mkdir,
- # with $RANDOM to make collisions less likely.
- : ${TMPDIR=/tmp}
- {
- tmp=`
- (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
- ` &&
- test -n "$tmp" && test -d "$tmp"
- } || {
- tmp=$TMPDIR/foo$$-$RANDOM
- (umask 077 && mkdir "$tmp")
- } || exit $?
-
- echo "{" > "$tmp/export.map"
- echo " global: main;" >> "$tmp/export.map"
- echo " local: *;" >> "$tmp/export.map"
- echo "};" >> "$tmp/export.map"
-
- CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
- [llvm_cv_link_use_version_script=yes],[llvm_cv_link_use_version_script=no])
- rm "$tmp/export.map"
- rmdir "$tmp"
- CFLAGS="$oldcflags"
- AC_LANG_POP([C])
-])
-if test "$llvm_cv_link_use_version_script" = yes ; then
- AC_SUBST(HAVE_LINK_VERSION_SCRIPT,1)
- fi
-])
-