mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 12:17:35 +00:00
Travis: Add 32-bit build on focal
This commit is contained in:
parent
958654909f
commit
7342cf278a
14
.travis.yml
14
.travis.yml
@ -49,6 +49,13 @@ before_script:
|
||||
export SYSTEMC_INCLUDE=/usr/include
|
||||
export SYSTEMC_LIBDIR=/usr/lib/x86_64-linux-gnu
|
||||
fi
|
||||
# Override compiler for M32
|
||||
- |
|
||||
if [ "$M32" = "1" ]; then
|
||||
export CC="$CC -m32"
|
||||
export CXX="$CXX -m32"
|
||||
unset M32 # verilated.mk actually references $(M32) so unset
|
||||
fi
|
||||
|
||||
before_cache:
|
||||
- ccache -s -z
|
||||
@ -72,6 +79,8 @@ jobs:
|
||||
- {stage: build, os: linux, dist: focal, compiler: clang, workspaces: {create: {name: focal-clang, paths: .}}}
|
||||
# Coverage build
|
||||
- {stage: build, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {create: {name: coverage, paths: .}}, env: COVERAGE=1}
|
||||
# 32-bit build
|
||||
- {stage: build, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {create: {name: focal-gcc-m32, paths: .}}, env: M32=1}
|
||||
# OS X build
|
||||
- {stage: build, if: type = cron, os: osx, osx_image: xcode11.6, compiler: clang, workspaces: {create: {name: osx-xcode11.6, paths: .}}}
|
||||
# FreeBSD build
|
||||
@ -115,6 +124,11 @@ jobs:
|
||||
- {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vltmt-1}
|
||||
- {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vltmt-2}
|
||||
- {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vltmt-3}
|
||||
# 32-bit tests
|
||||
- {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc-m32}, git: {clone: false}, env: [M32=1, TESTS=dist-vlt-0]}
|
||||
- {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc-m32}, git: {clone: false}, env: [M32=1, TESTS=dist-vlt-1]}
|
||||
- {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc-m32}, git: {clone: false}, env: [M32=1, TESTS=vltmt-0]}
|
||||
- {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc-m32}, git: {clone: false}, env: [M32=1, TESTS=vltmt-1]}
|
||||
# OS X tests
|
||||
- {stage: test, if: type = cron, os: osx, osx_image: xcode11.6, compiler: clang, workspaces: {use: osx-xcode11.6}, git: {clone: false}, env: TESTS=dist-vlt-0}
|
||||
- {stage: test, if: type = cron, os: osx, osx_image: xcode11.6, compiler: clang, workspaces: {use: osx-xcode11.6}, git: {clone: false}, env: TESTS=dist-vlt-1}
|
||||
|
@ -55,6 +55,9 @@ if [ "$TRAVIS_BUILD_STAGE_NAME" = "build" ]; then
|
||||
if [ "$COVERAGE" = 1 ]; then
|
||||
yes yes | sudo cpan -fi Unix::Processors Parallel::Forker
|
||||
fi
|
||||
if [ "$M32" = 1 ]; then
|
||||
sudo apt-get install gcc-multilib g++-multilib
|
||||
fi
|
||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
brew update
|
||||
brew install ccache perl gperftools
|
||||
@ -74,6 +77,9 @@ elif [ "$TRAVIS_BUILD_STAGE_NAME" = "test" ]; then
|
||||
if [ "$TRAVIS_DIST" = "focal" ]; then
|
||||
sudo apt-get install libsystemc-dev
|
||||
fi
|
||||
if [ "$M32" = 1 ]; then
|
||||
sudo apt-get install lib32z1-dev gcc-multilib g++-multilib
|
||||
fi
|
||||
yes yes | sudo cpan -fi Unix::Processors Parallel::Forker
|
||||
# Not listing Bit::Vector as slow to install, and only skips one test
|
||||
install-vcddiff
|
||||
|
12
configure.ac
12
configure.ac
@ -447,14 +447,18 @@ AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
|
||||
# - If not found or not system-wide, user can set SYSTEMC_INCLUDE.
|
||||
# AC_CHECK_HEADERS seems to not locate on Travis-CI but include does work.
|
||||
AC_MSG_CHECKING([whether SystemC is found (in system path)])
|
||||
AC_COMPILE_IFELSE(
|
||||
ACO_SAVE_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lsystemc"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <systemc.h>
|
||||
]],[])],
|
||||
extern "C" int sc_main(int argc, char* argv[]) {}
|
||||
]],[[sc_version()]])],
|
||||
[_my_result=yes
|
||||
AC_DEFINE([HAVE_SYSTEMC_H],[1],[Defined if have systemc.h])],
|
||||
AC_DEFINE([HAVE_SYSTEMC],[1],[Defined if have SystemC library])],
|
||||
[_my_result=no])
|
||||
AC_MSG_RESULT($_my_result)
|
||||
AC_SUBST(HAVE_SYSTEMC_H)
|
||||
LIBS="$ACO_SAVE_LIBS"
|
||||
AC_SUBST(HAVE_SYSTEMC)
|
||||
|
||||
# Checks for system services
|
||||
|
||||
|
@ -843,7 +843,7 @@ inline vluint64_t vl_time_stamp64() { return static_cast<vluint64_t>(sc_time_sta
|
||||
// Optimized assuming scale is always constant.
|
||||
// Can't use multiply in Q flavor, as might lose precision
|
||||
#define VL_TIME_UNITED_Q(scale) (VL_TIME_Q() / static_cast<QData>(scale))
|
||||
#define VL_TIME_UNITED_D(scale) (VL_TIME_D() * (1.0 / (scale)))
|
||||
#define VL_TIME_UNITED_D(scale) (VL_TIME_D() / static_cast<double>(scale))
|
||||
/// Time imported from units to time precision
|
||||
double vl_time_multiplier(int scale);
|
||||
|
||||
|
@ -568,7 +568,7 @@ string V3Options::getenvVERILATOR_ROOT() {
|
||||
}
|
||||
|
||||
bool V3Options::systemCSystemWide() {
|
||||
#ifdef HAVE_SYSTEMC_H
|
||||
#ifdef HAVE_SYSTEMC
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
@ -80,7 +80,7 @@ using std::make_pair;
|
||||
// Define if SystemC found
|
||||
// - If defined, the default search path has it, so support is always enabled.
|
||||
// - If undef, not system-wide, user can set SYSTEMC_INCLUDE.
|
||||
#undef HAVE_SYSTEMC_H
|
||||
#undef HAVE_SYSTEMC
|
||||
|
||||
//**********************************************************************
|
||||
//**** OS and compiler specifics
|
||||
|
@ -9,7 +9,8 @@ BEGIN {
|
||||
if (!$ENV{VERILATOR_ROOT} && -x "../bin/verilator") {
|
||||
$ENV{VERILATOR_ROOT} = Cwd::getcwd()."/..";
|
||||
}
|
||||
$ENV{MAKE} ||= "make"
|
||||
$ENV{MAKE} ||= "make";
|
||||
$ENV{CXX} ||= "c++";
|
||||
}
|
||||
|
||||
use Getopt::Long;
|
||||
@ -1165,7 +1166,7 @@ sub compile {
|
||||
|
||||
if ($param{make_pli}) {
|
||||
$self->oprint("Compile vpi\n") if $self->{verbose};
|
||||
my @cmd = ('c++', @{$param{pli_flags}}, "-DIS_VPI",
|
||||
my @cmd = ($ENV{CXX}, @{$param{pli_flags}}, "-DIS_VPI",
|
||||
"$self->{t_dir}/$self->{pli_filename}");
|
||||
|
||||
$self->_run(logfile=>"$self->{obj_dir}/pli_compile.log",
|
||||
|
@ -11,13 +11,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||
scenarios(vlt => 1);
|
||||
|
||||
run(cmd => ["cd $Self->{obj_dir}"
|
||||
." && c++ -c ../../t/t_flag_ldflags_a.cpp"
|
||||
." && $ENV{CXX} -c ../../t/t_flag_ldflags_a.cpp"
|
||||
." && ar -cr t_flag_ldflags_a.a t_flag_ldflags_a.o"
|
||||
." && ranlib t_flag_ldflags_a.a "],
|
||||
check_finished => 0);
|
||||
run(cmd => ["cd $Self->{obj_dir}"
|
||||
." && c++ -fPIC -c ../../t/t_flag_ldflags_so.cpp"
|
||||
." && c++ -shared -o t_flag_ldflags_so.so -lc t_flag_ldflags_so.o"],
|
||||
." && $ENV{CXX} -fPIC -c ../../t/t_flag_ldflags_so.cpp"
|
||||
." && $ENV{CXX} -shared -o t_flag_ldflags_so.so -lc t_flag_ldflags_so.o"],
|
||||
check_finished => 0);
|
||||
|
||||
compile(
|
||||
|
Loading…
Reference in New Issue
Block a user