-
-
Notifications
You must be signed in to change notification settings - Fork 109
add: bsc (bluespec compiler) #11751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
add: bsc (bluespec compiler) #11751
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
25e5db5
add: bsc (bluespec compiler)
Owen-sz 1b721ce
see if this makes aarch64 work?
Owen-sz e91c022
this?
Owen-sz c18b454
oops
Owen-sz 1a134f9
yeah idk
Owen-sz de365e6
Merge branch 'frawhide' into owen/bsc
Owen-sz c66ff65
use zlib-ng-compat
Owen-sz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| project pkg { | ||
| rpm { | ||
| spec = "bsc.spec" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| %define debug_package %{nil} | ||
| %global __provides_exclude_from ^%{_libdir}/bsc/SAT/.* | ||
| %global __requires_exclude libstp\\.so\\.1|libyices\\.so\\.2\\.6 | ||
|
|
||
| Name: bsc | ||
| Version: 2025.07 | ||
| Release: 1%{?dist} | ||
| Summary: Bluespec Compiler (BSC) | ||
|
|
||
| License: BSD-3-Clause AND BSD-2-Clause AND MIT AND LGPL-2.0-or-later AND AND BSL-1.0 | ||
| URL: https://github.com/B-Lang-org/bsc | ||
| Source: %{url}/archive/refs/tags/%{version}.tar.gz | ||
|
|
||
| BuildRequires: ghc | ||
| BuildRequires: ghc-regex-compat-devel | ||
| BuildRequires: ghc-syb-devel | ||
| BuildRequires: ghc-old-time-devel | ||
| BuildRequires: ghc-split-devel | ||
| BuildRequires: gperf | ||
| BuildRequires: gcc-c++ | ||
| BuildRequires: autoconf | ||
| BuildRequires: flex | ||
| BuildRequires: bison | ||
| BuildRequires: zlib-devel | ||
| BuildRequires: tcl-devel | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PEAK ALERT |
||
|
|
||
| # For check | ||
| BuildRequires: binutils | ||
| BuildRequires: iverilog | ||
|
|
||
| Provides: bundled(stp) | ||
| Provides: bundled(yices) | ||
|
|
||
| Packager: Owen Zimmerman <owen@fyralabs.com> | ||
|
|
||
| %description | ||
| Compiler, simulator, and tools for the Bluespec Hardware Description Language. | ||
| Bluespec is a single language for digital electronic hardware designs that | ||
| comes in two syntactic flavors, which are interchangeable: | ||
|
|
||
| Bluespec SystemVerilog (BSV) | ||
| Bluespec Haskell (BH, or "Bluespec Classic") | ||
|
|
||
| Bluespec is a high-level hardware description language. It has a variety of | ||
| advanced features including a powerful type system that can prevent errors prior | ||
| to synthesis time, and its most distinguishing feature, Guarded Atomic Actions, | ||
| allow you to define hardware components in a modular manner based on their | ||
| invariants, and let the compiler pick a scheduler. | ||
|
|
||
| %prep | ||
| %git_clone %{url} %{version} | ||
|
|
||
| %build | ||
| %make_build install-src GHCJOBS=%{_smp_build_ncpus} | ||
|
|
||
| %install | ||
| mkdir -p %{buildroot}%{_datadir}/bsc/ | ||
| mkdir -p %{buildroot}%{_bindir} | ||
| cp -r inst/ %{buildroot}%{_datadir}/bsc/ | ||
|
|
||
| # https://github.com/B-Lang-org/bsc/blob/main/INSTALL.md#overview | ||
| # Note this is symlinking the wrapper scripts, not the ELFs | ||
| %{__ln_s} -f %{_datadir}/bsc/inst/bin/bsc %{buildroot}%{_bindir}/bsc | ||
| %{__ln_s} -f %{_datadir}/bsc/inst/bin/bluetcl %{buildroot}%{_bindir}/bluetcl | ||
|
|
||
| # Patch wrapper scripts to use correct paths | ||
| for wrapper in %{buildroot}%{_datadir}/bsc/inst/bin/bsc %{buildroot}%{_datadir}/bsc/inst/bin/bluetcl; do | ||
| sed -i 's|BLUESPECDIR="$(cd ${BINDIR}/../lib; echo $PWD)"|BLUESPECDIR="%{_datadir}/bsc/inst/lib"|' $wrapper | ||
| sed -i 's|BLUESPECEXEC=${BINDIR}/core/${SCRIPTNAME}|BLUESPECEXEC="%{_datadir}/bsc/inst/bin/core/${SCRIPTNAME}"|' $wrapper | ||
| done | ||
|
|
||
| %check | ||
| %{make_build} check-smoke | ||
|
|
||
| %files | ||
| %doc README.md DEVELOP.md | ||
| %license COPYING LICENSES/ | ||
| %{_bindir}/bsc | ||
| %{_bindir}/bluetcl | ||
| %{_datadir}/bsc/* | ||
|
|
||
| %changelog | ||
| * Fri Apr 24 2026 Owen Zimmerman <owen@fyralabs.com> | ||
| - Initial commit | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| rpm.version(gh("B-Lang-org/bsc")); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.