diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42eb92003..653197c85 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,34 +37,20 @@ jobs: compiler: - { cc: clang, cxx: clang++ } - { cc: gcc, cxx: g++ } - # m32 1 is deprecated, not here to speed up regressions - m32: [0] - exclude: - # Build pull requests only with ubuntu-22.04 and without m32 - # - os: ${{ github.event_name == 'pull_request' && 'ubuntu-18.04' || 'do-not-exclude' }} - # - os: ${{ github.event_name == 'pull_request' && 'ubuntu-20.04' || 'do-not-exclude' }} - # - m32: ${{ github.event_name == 'pull_request' && 1 || 'do-not-exclude' }} - # Build -m32 only on ubuntu-22.04 clang++ - - {os: ubuntu-18.04, m32: 1} - - {os: ubuntu-20.04, m32: 1} - - compiler: { cc: gcc, cxx: g++ } - m32: 1 include: # Build GCC 10 on ubuntu-20.04 - os: ubuntu-20.04 compiler: { cc: gcc-10, cxx: g++-10 } - m32: 0 runs-on: ${{ matrix.os }} - name: Build | ${{ matrix.os }} | ${{ matrix.compiler.cc }} ${{ matrix.m32 && '| -m32' || '' }} + name: Build | ${{ matrix.os }} | ${{ matrix.compiler.cc }} env: CI_BUILD_STAGE_NAME: build CI_RUNS_ON: ${{ matrix.os }} - CI_M32: ${{ matrix.m32 }} CC: ${{ matrix.compiler.cc }} CXX: ${{ matrix.compiler.cxx }} - CACHE_BASE_KEY: build-${{ matrix.os }}-${{ matrix.compiler.cc }}-m32=${{ matrix.m32 }} + CACHE_BASE_KEY: build-${{ matrix.os }}-${{ matrix.compiler.cc }} CCACHE_MAXSIZE: 1000M # Per build matrix entry (* 5 = 5000M in total) - VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}${{ matrix.m32 && '-m32' || '' }}.tar.gz + VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}.tar.gz steps: - name: Checkout @@ -108,36 +94,24 @@ jobs: compiler: - { cc: clang, cxx: clang++ } - { cc: gcc, cxx: g++ } - m32: [0] suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, vltmt-0, vltmt-1] - exclude: - # Build pull requests only with ubuntu-22.04 and without m32 - # - os: ${{ github.event_name == 'pull_request' && 'ubuntu-18.04' || 'do-not-exclude' }} - # - os: ${{ github.event_name == 'pull_request' && 'ubuntu-20.04' || 'do-not-exclude' }} - # - m32: ${{ github.event_name == 'pull_request' && 1 || 'do-not-exclude' }} - # Build -m32 only on ubuntu-22.04 - - {os: ubuntu-18.04, m32: 1} - - {os: ubuntu-20.04, m32: 1} - - compiler: { cc: gcc, cxx: g++ } - m32: 1 include: - # Test with GCC 10 on ubuntu-20.04 without m32 - - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: dist-vlt-0} - - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: dist-vlt-1} - - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: dist-vlt-2} - - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: vltmt-0} - - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, m32: 0, suite: vltmt-1} + # Test with GCC 10 on ubuntu-20.04 + - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: dist-vlt-0} + - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: dist-vlt-1} + - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: dist-vlt-2} + - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: vltmt-0} + - {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: vltmt-1} runs-on: ${{ matrix.os }} - name: Test | ${{ matrix.os }} | ${{ matrix.compiler.cc }} | ${{ matrix.suite }} ${{ matrix.m32 && '| -m32' || '' }} + name: Test | ${{ matrix.os }} | ${{ matrix.compiler.cc }} | ${{ matrix.suite }} env: CI_BUILD_STAGE_NAME: test CI_RUNS_ON: ${{ matrix.os }} - CI_M32: ${{ matrix.m32 }} CC: ${{ matrix.compiler.cc }} CXX: ${{ matrix.compiler.cxx }} - CACHE_BASE_KEY: test-${{ matrix.os }}-${{ matrix.compiler.cc }}-m32=${{ matrix.m32 }}-${{ matrix.suite }} + CACHE_BASE_KEY: test-${{ matrix.os }}-${{ matrix.compiler.cc }}-${{ matrix.suite }} CCACHE_MAXSIZE: 100M # Per build per suite (* 5 * 5 = 2500M in total) - VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}${{ matrix.m32 && '-m32' || '' }}.tar.gz + VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}.tar.gz steps: - name: Download tar archive @@ -174,7 +148,6 @@ jobs: env: CI_BUILD_STAGE_NAME: build CI_RUNS_ON: ubuntu-22.04 - CI_M32: 0 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4dcffead4..8bba01198 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -11,7 +11,6 @@ on: env: CI_OS_NAME: linux CI_COMMIT: ${{ github.sha }} - CI_M32: 0 COVERAGE: 1 VERILATOR_ARCHIVE: verilator-coverage-${{ github.sha }}.tar.gz diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 3aa88e6a6..df69546d4 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -16,7 +16,6 @@ jobs: CI_OS_NAME: linux CI_RUNS_ON: ubuntu-22.04 CI_COMMIT: ${{ github.sha }} - CI_M32: 0 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/Changes b/Changes index a2c83c324..055678d16 100644 --- a/Changes +++ b/Changes @@ -13,6 +13,9 @@ Verilator 5.021 devel **Minor:** +* Remove deprecated 32-bit pointer mode (`gcc -m32`). + + Verilator 5.020 2024-01-01 ========================== diff --git a/ci/ci-install.bash b/ci/ci-install.bash index 668400b07..07a6141b3 100755 --- a/ci/ci-install.bash +++ b/ci/ci-install.bash @@ -27,12 +27,6 @@ fatal() { echo "ERROR: $(basename "$0"): $1" >&2; exit 1; } -if [ "$CI_M32" = "0" ]; then - unset CI_M32 -elif [ "$CI_M32" != "1" ]; then - fatal "\$CI_M32 must be '0' or '1'"; -fi - if [ "$CI_OS_NAME" = "linux" ]; then MAKE=make elif [ "$CI_OS_NAME" = "osx" ]; then @@ -77,10 +71,6 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then if [ "$COVERAGE" = 1 ]; then yes yes | sudo cpan -fi Parallel::Forker fi - if [ "$CI_M32" = 1 ]; then - sudo apt-get install gcc-multilib g++-multilib || - sudo apt-get install gcc-multilib g++-multilib - fi elif [ "$CI_OS_NAME" = "osx" ]; then brew update brew install ccache perl gperftools @@ -114,10 +104,6 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then sudo apt-get install libsystemc-dev || sudo apt-get install libsystemc-dev fi - if [ "$CI_M32" = 1 ]; then - sudo apt-get install lib32z1-dev gcc-multilib g++-multilib || - sudo apt-get install lib32z1-dev gcc-multilib g++-multilib - fi elif [ "$CI_OS_NAME" = "osx" ]; then brew update # brew cask install gtkwave # fst2vcd hangs at launch, so don't bother diff --git a/ci/ci-script.bash b/ci/ci-script.bash index ea2389faf..b254a4932 100755 --- a/ci/ci-script.bash +++ b/ci/ci-script.bash @@ -21,12 +21,6 @@ fatal() { echo "ERROR: $(basename "$0"): $1" >&2; exit 1; } -if [ "$CI_M32" = "0" ]; then - unset CI_M32 -elif [ "$CI_M32" != "1" ]; then - fatal "\$CI_M32 must be '0' or '1'"; -fi - if [ "$CI_OS_NAME" = "linux" ]; then export MAKE=make NPROC=$(nproc) @@ -46,7 +40,7 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then if [ "$COVERAGE" != 1 ]; then autoconf - ./configure --enable-longtests --enable-ccwarn ${CI_M32:+--enable-m32} + ./configure --enable-longtests --enable-ccwarn ccache -z "$MAKE" -j "$NPROC" -k # 22.04: ccache -s -v @@ -91,7 +85,7 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then fi # Run sanitize on Ubuntu 22.04 only - [ "$CI_RUNS_ON" = 'ubuntu-22.04' ] && [ "$CI_M32" = "" ] && sanitize='--sanitize' || sanitize='' + [ "$CI_RUNS_ON" = 'ubuntu-22.04' ] && sanitize='--sanitize' || sanitize='' # Run the specified test ccache -z diff --git a/configure.ac b/configure.ac index 726446f9a..7679d98e6 100644 --- a/configure.ac +++ b/configure.ac @@ -67,20 +67,6 @@ AC_ARG_ENABLE([tcmalloc], [CFG_WITH_TCMALLOC=check;]) AC_MSG_RESULT($CFG_WITH_TCMALLOC) -# Flag to enable -m32 build -AC_MSG_CHECKING(whether to use -m32) -AC_ARG_ENABLE([m32], - [AS_HELP_STRING([--enable-m32], - [Use -m32 for all compilation and link, - including Verilator and generated models.])], - [case "${enableval}" in - yes) CFG_ENABLE_M32=yes ;; - no) CFG_ENABLE_M32=no ;; - *) AC_MSG_ERROR([bad value '${enableval}' for --enable-m32]) ;; - esac], - CFG_ENABLE_M32=no) -AC_MSG_RESULT($CFG_ENABLE_M32) - # Flag to enable coverage build AC_MSG_CHECKING(whether to build for coverage collection) AC_ARG_ENABLE([coverage], @@ -319,15 +305,7 @@ AC_DEFUN([_MY_LDLIBS_CHECK_OPT], _MY_LDLIBS_CHECK_IFELSE($2, $1="$$1 $2") ]) -# When using -m32. Check this first as later checks may fail with the -m32 flag. -if test "$CFG_ENABLE_M32" = "yes"; then - _MY_CXX_CHECK_IFELSE( - -m32, - [CXX="$CXX -m32"], - [AC_MSG_ERROR([--enable-m32 was given but compiler does not support -m32])]) -fi - -# Similarly, add the coverage flags early as they influence later checks. +# Add the coverage flags early as they influence later checks. if test "$CFG_ENABLE_COVERAGE" = "yes"; then _MY_CXX_CHECK_OPT(CXX,--coverage) # Otherwise inline may not show as uncovered diff --git a/docs/guide/deprecations.rst b/docs/guide/deprecations.rst index 149cbd370..52d396976 100644 --- a/docs/guide/deprecations.rst +++ b/docs/guide/deprecations.rst @@ -13,8 +13,3 @@ C++11 compiler support Verilator will require C++20 or newer compilers for both compiling Verilator and compiling all Verilated models no sooner than January 2025. - -32-bit compiler support - Verilator currently regresses both 64-bit and 32-bit pointer modes (GCC's - `-m64` and `-m32`). Support for 32-bit `-m32` mode will be deprecated no - sooner than January 2024. diff --git a/include/verilated.mk.in b/include/verilated.mk.in index cc9e615c8..c8cf05d6d 100644 --- a/include/verilated.mk.in +++ b/include/verilated.mk.in @@ -101,9 +101,6 @@ LDFLAGS += $(CFG_LDFLAGS_VERILATED) #OPT = -ggdb -DPRINTINITSTR CPPFLAGS += $(OPT) -CPPFLAGS += $(M32) -LDFLAGS += $(M32) - # On macOS, specify all weak symbols as dynamic_lookup. # Otherwise, you get undefined symbol errors. ifeq ($(UNAME_S),Darwin) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 07db695c2..526ced720 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -640,7 +640,6 @@ sub new { ? " -Wl,-undefined,dynamic_lookup" : " -export-dynamic") . ($opt_verbose ? " -DTEST_VERBOSE=1" : "") - . (cfg_with_m32() ? " -m32" : "") . " -o $self->{obj_dir}/libvpi.so"], tool_c_flags => [], # ATSIM @@ -2432,13 +2431,6 @@ sub cfg_with_ccache { return $_Cfg_with_ccache; } -our $_Cfg_with_m32; - -sub cfg_with_m32 { - $_Cfg_with_m32 ||= `grep "CXX.*=.*-m32" "$ENV{VERILATOR_ROOT}/include/verilated.mk"` ne ""; - return $_Cfg_with_m32; -} - sub tries { # Number of retries when reading logfiles, generally only need many # retries when system is busy running a lot of tests diff --git a/test_regress/t/t_flag_ldflags.pl b/test_regress/t/t_flag_ldflags.pl index 33d73877b..b68cea7ad 100755 --- a/test_regress/t/t_flag_ldflags.pl +++ b/test_regress/t/t_flag_ldflags.pl @@ -10,16 +10,14 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); -my $m32 = $Self->cfg_with_m32 ? "-m32" : ""; - run(cmd => ["cd $Self->{obj_dir}" - . " && $ENV{CXX} $m32 -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}" - . " && $ENV{CXX} $m32 -fPIC -c ../../t/t_flag_ldflags_so.cpp" - . " && $ENV{CXX} $m32 -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( diff --git a/test_regress/t/t_threads_crazy_context.pl b/test_regress/t/t_threads_crazy_context.pl index 6a3f1512e..73ba5c3b8 100755 --- a/test_regress/t/t_threads_crazy_context.pl +++ b/test_regress/t/t_threads_crazy_context.pl @@ -10,10 +10,6 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt_all => 1); -if ($Self->cfg_with_m32) { - skip("Does not work with -m32 (resource unavailable)"); -} - top_filename("t/t_threads_crazy.v"); compile(