Skip to content

Commit

Permalink
Re-commit r220667.
Browse files Browse the repository at this point in the history
C++ source given to check_cxx_source_compile should have define "main".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220669 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rui314 committed Oct 27, 2014
1 parent a85a0b3 commit 490f286
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 363 deletions.
6 changes: 5 additions & 1 deletion autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1592,8 +1592,12 @@ AC_HEADER_SYS_WAIT
AC_HEADER_TIME

AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([cxxabi.h])
dnl size_t must be defined before including cxxabi.h on FreeBSD 10.0.
AC_CHECK_HEADERS([cxxabi.h], [], [],
[#include <stddef.h>
])
AC_LANG_POP([C++])

AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h inttypes.h link.h])
AC_CHECK_HEADERS([malloc.h setjmp.h signal.h stdint.h termios.h unistd.h])
AC_CHECK_HEADERS([utime.h])
Expand Down
8 changes: 7 additions & 1 deletion cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function(check_type_exists type files variable)
endfunction()

# include checks
check_include_file_cxx(cxxabi.h HAVE_CXXABI_H)
check_include_file(dirent.h HAVE_DIRENT_H)
check_include_file(dlfcn.h HAVE_DLFCN_H)
check_include_file(errno.h HAVE_ERRNO_H)
Expand Down Expand Up @@ -81,6 +80,13 @@ check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT)
check_include_file(mach/mach.h HAVE_MACH_MACH_H)
check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)

# size_t must be defined before including cxxabi.h on FreeBSD 10.0.
check_cxx_source_compiles("
#include <stddef.h>
#include <cxxabi.h>
int main() { return 0; }
" HAVE_CXXABI_H)

# library checks
if( NOT PURE_WINDOWS )
check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
Expand Down
Loading

0 comments on commit 490f286

Please sign in to comment.