Fix MacOS portability, bug1231.

This commit is contained in:
Wilson Snyder 2017-10-14 12:56:16 -04:00
parent db8e8392fa
commit f81daac9c0
2 changed files with 5 additions and 4 deletions

View File

@ -37,7 +37,7 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix float-conversion warning, bug1229. [Robert Henry] **** Fix float-conversion warning, bug1229. [Robert Henry]
**** Fix MacOS portability, bug1230. [Jeff Bush] **** Fix MacOS portability, bug1230, bug1231. [Jeff Bush]
* Verilator 3.912 2017-09-23 * Verilator 3.912 2017-09-23

View File

@ -111,10 +111,11 @@ AC_DEFUN([_MY_CXX_CHECK_FLAG],
# Set $_my_result appropriately # Set $_my_result appropriately
ACO_SAVE_CXXFLAGS="$CXXFLAGS" ACO_SAVE_CXXFLAGS="$CXXFLAGS"
# -Werror needed otherwise unknown -Wno-div-by-zero won't report problems # -Werror needed otherwise unknown -Wno-div-by-zero won't report problems
# new/delete is needed to find -faligned-new link problem on Darwin
CXXFLAGS="$CXXFLAGS $1 -Werror" CXXFLAGS="$CXXFLAGS $1 -Werror"
AC_MSG_CHECKING([whether $CXX accepts $1]) AC_MSG_CHECKING([whether $CXX accepts $1])
AC_COMPILE_IFELSE( AC_LINK_IFELSE(
[AC_LANG_PROGRAM([],[])], [AC_LANG_PROGRAM([], [[int* a=new int; delete a; ]])],
[_my_result=yes [_my_result=yes
if test -s conftest.err; then if test -s conftest.err; then
if grep -e "$1" conftest.err >/dev/null; then if grep -e "$1" conftest.err >/dev/null; then
@ -223,7 +224,7 @@ AC_SUBST(CFG_CXXFLAGS_NO_UNUSED)
# Checks for library functions. # Checks for library functions.
AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec], AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
[AC_DEFINE([HAVE_STAT_NSEC],[1],[Define if struct stat has st_mtim.tv_nsec.])], [AC_DEFINE([HAVE_STAT_NSEC],[1],[Defined if struct stat has st_mtim.tv_nsec])],
[], [#include <sys/stat.h>]) [], [#include <sys/stat.h>])
# Checks for system services # Checks for system services