From 0cdc2e038cad19beee6ece3878c62a3e30fdbdc1 Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Thu, 25 Jun 2020 14:12:09 +0100 Subject: [PATCH] Workaround for Travis OS X dbg exe corruption --- ci/travis-script.bash | 21 +++++++++++++++++++-- configure.ac | 10 +++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ci/travis-script.bash b/ci/travis-script.bash index 0a3c26778..329764891 100755 --- a/ci/travis-script.bash +++ b/ci/travis-script.bash @@ -38,8 +38,14 @@ if [ "$TRAVIS_BUILD_STAGE_NAME" = "build" ]; then autoconf ./configure --enable-longtests --enable-ccwarn make -j "$NPROC" - file bin/verilator_bin - file bin/verilator_bin_dbg + if [ "$TRAVIS_OS_NAME" = "osx" ]; then + file bin/verilator_bin + file bin/verilator_bin_dbg + md5 bin/verilator_bin + md5 bin/verilator_bin_dbg + stat bin/verilator_bin + stat bin/verilator_bin_dbg + fi else nodist/code_coverage --stages 1-2 fi @@ -51,6 +57,17 @@ elif [ "$TRAVIS_BUILD_STAGE_NAME" = "test" ]; then export VERILATOR_TEST_NO_GDB=1 # Pain to get GDB to work on OS X export VERILATOR_TEST_NO_GPROF=1 # Apple Clang has no -pg # export PATH="/Applications/gtkwave.app/Contents/Resources/bin:$PATH" # fst2vcd + file bin/verilator_bin + file bin/verilator_bin_dbg + md5 bin/verilator_bin + md5 bin/verilator_bin_dbg + stat bin/verilator_bin + stat bin/verilator_bin_dbg + # For some reason, the dbg exe is corrupted by this point ('file' reports + # it as data rather than a Mach-O). Unclear if this is an OS X issue or + # one for Travis. Remove the file and re-link... + rm bin/verilator_bin_dbg + make -j "$NPROC" fi # Run the specified test diff --git a/configure.ac b/configure.ac index bcf287e14..53ff82eaa 100644 --- a/configure.ac +++ b/configure.ac @@ -128,11 +128,11 @@ AC_ARG_ENABLE([prec11], AC_SUBST(CFG_WITH_PREC11) AC_MSG_RESULT($CFG_WITH_PREC11) -# Compiler flags (set them to non-empty string to avoid configure defaults) -CFLAGS=" " -CPPFLAGS=" " -CXXFLAGS=" " -LDFLAGS=" " +# Compiler flags (ensure they are not empty to avoid configure defaults) +CFLAGS+=" " +CPPFLAGS+=" " +CXXFLAGS+=" " +LDFLAGS+=" " # Checks for programs. AC_PROG_CC