mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-15 11:45:41 +00:00
CMake: Linux fixes + Merge fallout fix
This commit is contained in:
parent
1d94aa6965
commit
bd7c32f8a6
5 changed files with 71 additions and 3 deletions
|
|
@ -1,8 +1,13 @@
|
|||
# Always force disable GNU Readline, GPL trap library
|
||||
set(YOSYS_ENABLE_READLINE OFF CACHE INTERNAL "")
|
||||
set(YOSYS_ENABLE_READLINE OFF CACHE BOOL "" FORCE)
|
||||
set(YOSYS_WITHOUT_READLINE ON CACHE BOOL "" FORCE)
|
||||
# Silimate fork has Verific in top-level directory
|
||||
set(YOSYS_VERIFIC_DIR ${PROJECT_SOURCE_DIR}/verific)
|
||||
# Pyosys is the primary interface for the Silimate fork
|
||||
set(YOSYS_WITH_PYTHON ON CACHE BOOL "" FORCE)
|
||||
|
||||
add_library(verific INTERFACE)
|
||||
|
||||
if (LINUX)
|
||||
add_link_options("-Wl,--allow-multiple-definition")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -44,7 +44,10 @@ for archive in filter(lambda x: x.endswith(".a"), files):
|
|||
object_dir.mkdir(parents=True, exist_ok=True)
|
||||
subprocess.check_call(["ar", "x", archive], cwd=object_dir)
|
||||
for object in object_dir.glob("*.o"):
|
||||
if len(symbol_localize_args):
|
||||
# on GNU/Linux we just use -Wl,--allow-multiple-definition; redefinitions
|
||||
# are ignored, and the Silimate objects are first in the archive, so they
|
||||
# are prioritized
|
||||
if sys.platform == "darwin" and len(symbol_localize_args):
|
||||
subprocess.check_call([objcopy_bin, *symbol_localize_args, object])
|
||||
final_archive_objects.append(object)
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include "backends/rtlil/rtlil_backend.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <strstream>
|
||||
#include <algorithm>
|
||||
#include <charconv>
|
||||
#include <optional>
|
||||
|
|
|
|||
|
|
@ -156,6 +156,14 @@ struct AbcConfig
|
|||
int abc_max_node_retention_origins = 5; // number of node retention origins (default 5)
|
||||
std::string signal_map_file;
|
||||
std::string cdc_file;
|
||||
|
||||
bool is_yosys_abc() const {
|
||||
#ifdef ABCEXTERNAL
|
||||
return false;
|
||||
#else
|
||||
return exe_file == yosys_abc_executable;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
struct AbcSigVal {
|
||||
|
|
|
|||
53
silimate-shell.nix
Normal file
53
silimate-shell.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let libs = pkgs.libs;
|
||||
binutils = pkgs.binutils;
|
||||
gnu-ar = pkgs.stdenvNoCC.mkDerivation {
|
||||
# match homebrew name
|
||||
pname = "gnu-ar";
|
||||
inherit (binutils) version;
|
||||
|
||||
buildInputs = [ binutils ];
|
||||
|
||||
phases = ["installPhase"];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${binutils}/bin/ar $out/bin/gar
|
||||
'';
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
bison
|
||||
flex
|
||||
cmake
|
||||
eigen
|
||||
swig
|
||||
boost
|
||||
libedit
|
||||
pkg-config
|
||||
m4
|
||||
cmake
|
||||
ninja
|
||||
tcl
|
||||
libffi
|
||||
nodejs
|
||||
gawk
|
||||
gperf
|
||||
autoconf
|
||||
libdwarf # provides libdwarf.so
|
||||
libelf # provides libelf.a
|
||||
doxygen
|
||||
cudd
|
||||
zlib
|
||||
clang
|
||||
iverilog # tests
|
||||
gtkwave # vcd2fst
|
||||
(python3.withPackages(ps: with ps; [pybind11 cxxheaderparser]))
|
||||
gnu-ar
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
elfutils # provides libdw.so (not to be confused with libdwarf.so)
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_C_COMPILER=clang" "-DCMAKE_CXX_COMPILER=clang++" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_CXX_FLAGS=-O0" "-DYOSYS_WITH_PYTHON:BOOL=ON" ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue