Skip to content
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

Pull build-related changes from YosysHQ fork #315

Merged
merged 8 commits into from
Aug 8, 2024

Conversation

povik
Copy link
Contributor

@povik povik commented Aug 7, 2024

These are all the build-related changes from the YosysHQ fork of ABC. They relate to:

  • More platform support (some BSD platforms, compilation to WebAssembly)
  • Easier out-of-tree builds
  • Having a .gitcommit file containing the Git revision when we distribute a tarball with ABC sources

josuah and others added 8 commits August 7, 2024 14:31
Some platforms were already listed, this includes OpenBSD to the list
and makes it easier to add more.

(cherry picked from commit b6c0b36)
not required.  Same treatment as FreeBSD.

(cherry picked from commit ecce27c)
(cherry picked from commit 2c52e3f)
The `make clean` target consists of a single `rm` call that passes every
generated file, object file, and dependency directory.  This results in
a command line that's around 53,800 characters long.

On Linux, the maximum length of a command line is 131,072 or 262,144
characters, however on Windows the limit is 32,768.

The 53,800 character command simply fails to run on Windows, which is a
problem when the first command that gets run is `make clean`.

Break this target into steps, first removing the output files, then the
object files, then any generated garbage, and then the object depedency
directories.

This fixes `make clean` (and as a result yosys) on Windows.

Signed-off-by: Sean Cross <sean@xobs.io>
(cherry picked from commit 11c4f99)
(cherry picked from commit 4e89fc7)
On platforms such as Android, legacy macros are no longer defined.
Hence, we define them in terms of the new POSIX macros if the new ones are defined. Otherwise, we throw an error.

Signed-off-by: Mohamed A. Bamakhrama <mohamed@alumni.tum.de>
Signed-off-by: Miodrag Milanovic <mmicko@gmail.com>
(cherry picked from commit e792072)
Co-authored-by: whitequark <whitequark@whitequark.org>
The git archive export-subst option does not have consistent results
over time, since the abbreviated commit hash can get longer over time.

Instead, let's export the full commit hash.

This was found in an audit of source archive reproducibility in nixpkgs:

```
~ » expected=$(nix-store -r /nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source)
actual=$(nix-prefetch-url --print-path --unpack --name source https://github.com/yosyshq/abc/archive/896e5e7dedf9b9b1459fa019f1fa8aa8101fdf43.tar.gz | tail -n1)
nix-shell -p diffoscope --run "diffoscope $expected $actual"
this path will be fetched (3.77 MiB download, 34.50 MiB unpacked):
  /nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source
copying path '/nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source' from 'https://cache.nixos.org'...
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
--- /nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source
+++ /nix/store/v7ms5ghibzi8pk71nzlhvsbn7a0rdpy7-source
│   --- /nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source/.gitcommit
├── +++ /nix/store/v7ms5ghibzi8pk71nzlhvsbn7a0rdpy7-source/.gitcommit
│ @@ -1 +1 @@
│ -896e5e7de
│ +896e5e7ded
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ -  Size: 10        	Blocks: 1          IO Block: 512    regular file
│ │ +  Size: 11        	Blocks: 1          IO Block: 512    regular file
│ │  Device: 0,24	Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
│ │
│ │  Modify: 1970-01-01 00:00:01.000000000 +0000
```

(cherry picked from commit 04f5040)
@alanminko alanminko merged commit e6b36cb into berkeley-abc:master Aug 8, 2024
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants