3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-23 07:32:32 +00:00

CMake: Linux fixes + Merge fallout fix

This commit is contained in:
Mohamed Gaber 2026-06-16 18:45:02 +03:00
parent 1d94aa6965
commit bd7c32f8a6
No known key found for this signature in database
5 changed files with 71 additions and 3 deletions

View file

@ -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()

View file

@ -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)