Fix config_build.h issues (#4380) (#4381)

This commit is contained in:
Andrew Miloradovsky
2023-07-27 05:42:35 -04:00
committed by GitHub
parent a5eccc199b
commit 106a9fe67f
12 changed files with 53 additions and 34 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
*~
*.old
config_build.h
config_package.h
Makefile
Makefile_obj
.objcache*
+1 -1
View File
@@ -324,7 +324,7 @@ file(TO_NATIVE_PATH ${srcdir}/../bin/verilator_includer VERILATOR_INCLUDER)
file(TO_NATIVE_PATH ${srcdir}/vlcovgen VLCOVGEN)
file(TO_NATIVE_PATH ${srcdir}/config_rev CONFIG_REV)
configure_file(config_build.h.in config_build.h @ONLY)
configure_file(config_package.h.in config_package.h @ONLY)
add_custom_command(
OUTPUT V3Ast__gen_forward_class_decls.h V3Dfg__gen_forward_class_decls.h
+1 -1
View File
@@ -95,7 +95,7 @@ clean mostlyclean distclean maintainer-clean::
-rm -f .objcache*
distclean maintainer-clean::
-rm -f Makefile Makefile_obj config_build.h
-rm -f Makefile Makefile_obj config_package.h
maintainer-clean::
-rm -f config_rev.h
+2 -2
View File
@@ -19,8 +19,8 @@
// clang-format off
#include "config_build.h"
#ifndef HAVE_CONFIG_BUILD
# error "Something failed during ./configure as config_build.h is incomplete. Perhaps you used autoreconf, don't."
#ifndef HAVE_CONFIG_PACKAGE
# error "Something failed during ./configure as config_package.h is incomplete. Perhaps you used autoreconf, don't."
#endif
// clang-format on
+1 -1
View File
@@ -896,7 +896,7 @@ void V3Options::notify() {
// V3 Options accessors
string V3Options::version() VL_PURE {
string ver = DTVERSION;
string ver = PACKAGE_STRING;
ver += " rev " + cvtToStr(DTVERSION_rev);
return ver;
}
+3 -3
View File
@@ -16,8 +16,8 @@
// clang-format off
#include "config_build.h"
#ifndef HAVE_CONFIG_BUILD
# error "Something failed during ./configure as config_build.h is incomplete. Perhaps you used autoreconf, don't."
#ifndef HAVE_CONFIG_PACKAGE
# error "Something failed during ./configure as config_package.h is incomplete. Perhaps you used autoreconf, don't."
#endif
// clang-format on
@@ -48,7 +48,7 @@ static int debug() { return V3Error::debugDefault(); }
void VlcOptions::addReadFile(const string& filename) { m_readFiles.insert(filename); }
string VlcOptions::version() {
string ver = DTVERSION;
string ver = PACKAGE_STRING;
ver += " rev " + cvtToStr(DTVERSION_rev);
return ver;
}
+1 -21
View File
@@ -19,12 +19,7 @@
//**********************************************************************
//**** Version and host name
// Autoconf substitutes this with the strings from AC_INIT.
#define PACKAGE_STRING ""
#define PACKAGE_VERSION_NUMBER_STRING "0.000"
#define DTVERSION PACKAGE_STRING
#include "config_package.h"
//**********************************************************************
//**** Functions
@@ -73,22 +68,7 @@ using string = std::string;
using std::cout;
using std::endl;
//**********************************************************************
//**** Configure-discovered library options
// Define if struct stat has st_mtim.tv_nsec (from configure)
#undef HAVE_STAT_NSEC
// 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
#undef HAVE_COROUTINES
//**********************************************************************
//**** OS and compiler specifics
#include "verilatedos.h"
//**********************************************************************
//**** This file sometimes gets truncated, so check in consumers
#define HAVE_CONFIG_BUILD
+38
View File
@@ -0,0 +1,38 @@
// -*- mode: C++; c-file-style: "cc-mode" -*-
// DESCRIPTION: Verilator: Configure source; system configuration
//
// This file is part of Verilator.
//
// Code available from: https://verilator.org
//
// Copyright 2003-2023 by Wilson Snyder. This program is free software;
// you can redistribute it and/or modify it under the terms of either
// the GNU Lesser General Public License Version 3 or
// the Perl Artistic License Version 2.0.
//
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
// Autoconf substitutes this with the strings from AC_INIT.
#define PACKAGE_STRING ""
#define PACKAGE_VERSION_NUMBER_STRING "0.000"
// Otherwise Autoheader generates it (with all the same macros and more)
//**********************************************************************
//**** Configure-discovered library options
// Define if struct stat has st_mtim.tv_nsec (from configure)
#undef HAVE_STAT_NSEC
// 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
// Define if coroutines are supported on this platform
#undef HAVE_COROUTINES
//**********************************************************************
//**** This file sometimes gets truncated, so check in consumers
#define HAVE_CONFIG_PACKAGE