summaryrefslogtreecommitdiff
path: root/projects/sample/autoconf/m4
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-05-05 15:02:39 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-05-05 15:02:39 +0000
commit0017180e70edb1461e06a4aeafd95d760a539e69 (patch)
treeb8be401ce3bc5277ced4dd2df9a0b809f4ef745a /projects/sample/autoconf/m4
parent59957500f94965f2ac69048f682ea983e96646c7 (diff)
downloadllvm-0017180e70edb1461e06a4aeafd95d760a539e69.tar.gz
llvm-0017180e70edb1461e06a4aeafd95d760a539e69.tar.bz2
llvm-0017180e70edb1461e06a4aeafd95d760a539e69.tar.xz
Update all outdated autoconf files in the sample project.
We might just use symlinks here, but I'm afraid of possible portability issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'projects/sample/autoconf/m4')
-rw-r--r--projects/sample/autoconf/m4/config_makefile.m44
-rw-r--r--projects/sample/autoconf/m4/huge_val.m42
-rw-r--r--projects/sample/autoconf/m4/link_options.m42
-rw-r--r--projects/sample/autoconf/m4/visibility_inlines_hidden.m46
4 files changed, 8 insertions, 6 deletions
diff --git a/projects/sample/autoconf/m4/config_makefile.m4 b/projects/sample/autoconf/m4/config_makefile.m4
index d9bfcb8528..b1eaffdcd8 100644
--- a/projects/sample/autoconf/m4/config_makefile.m4
+++ b/projects/sample/autoconf/m4/config_makefile.m4
@@ -4,6 +4,6 @@
#
AC_DEFUN([AC_CONFIG_MAKEFILE],
[AC_CONFIG_COMMANDS($1,
- [${srcdir}/autoconf/mkinstalldirs `dirname $1`
- ${SHELL} ${srcdir}/autoconf/install-sh -m 0644 -c ${srcdir}/$1 $1])
+ [${llvm_src}/autoconf/mkinstalldirs `dirname $1`
+ ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/$1 $1])
])
diff --git a/projects/sample/autoconf/m4/huge_val.m4 b/projects/sample/autoconf/m4/huge_val.m4
index 7ef9dcae69..9dc76f2235 100644
--- a/projects/sample/autoconf/m4/huge_val.m4
+++ b/projects/sample/autoconf/m4/huge_val.m4
@@ -6,7 +6,7 @@ AC_DEFUN([AC_HUGE_VAL_CHECK],[
AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
AC_LANG_PUSH([C++])
ac_save_CXXFLAGS=$CXXFLAGS
- CXXFLAGS+=" -pedantic"
+ CXXFLAGS="$CXXFLAGS -pedantic"
AC_RUN_IFELSE(
AC_LANG_PROGRAM(
[#include <math.h>],
diff --git a/projects/sample/autoconf/m4/link_options.m4 b/projects/sample/autoconf/m4/link_options.m4
index 4c5f2f435d..57da4a0d92 100644
--- a/projects/sample/autoconf/m4/link_options.m4
+++ b/projects/sample/autoconf/m4/link_options.m4
@@ -10,7 +10,7 @@ AC_DEFUN([AC_LINK_GET_VERSION],
# Check for ld64.
if (echo "$version_string" | grep -q "ld64"); then
- llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#")
+ 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
diff --git a/projects/sample/autoconf/m4/visibility_inlines_hidden.m4 b/projects/sample/autoconf/m4/visibility_inlines_hidden.m4
index 42ddbe9128..b1cc42aa5f 100644
--- a/projects/sample/autoconf/m4/visibility_inlines_hidden.m4
+++ b/projects/sample/autoconf/m4/visibility_inlines_hidden.m4
@@ -8,8 +8,10 @@ AC_DEFUN([AC_CXX_USE_VISIBILITY_INLINES_HIDDEN],
[llvm_cv_cxx_visibility_inlines_hidden],
[ AC_LANG_PUSH([C++])
oldcxxflags="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ CXXFLAGS="$CXXFLAGS -O0 -fvisibility-inlines-hidden -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [template <typename T> struct X { void __attribute__((noinline)) f() {} };],
+ [X<int>().f();])],
[llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no])
CXXFLAGS="$oldcxxflags"
AC_LANG_POP([C++])