sasquatch: pass -fcommon to fix build on -fno-common toolchains#147627
Closed
trofi wants to merge 1 commit intoNixOS:masterfrom
Closed
sasquatch: pass -fcommon to fix build on -fno-common toolchains#147627trofi wants to merge 1 commit intoNixOS:masterfrom
trofi wants to merge 1 commit intoNixOS:masterfrom
Conversation
Without the change build on clang-12 or upstream gcc-12 fails as:
$ nix build --impure --expr 'with import ./. {}; sasquatch.override { stdenv = clang12Stdenv; }' -L
...
c++ ./LZMA/lzmalt/*.o ... -o sasquatch
ld: squashfs-tools/./error.h:34: multiple definition of `verbose'; unsquashfs.o:error.h:34: first defined here
Until upstrea fixes it by fixing `verbose` variable declaration at:
devttys0/sasquatch#44
and fork rebases let's set `-fcommon` explicitly.
Comment on lines
-48
to
+51
| substituteInPlace squashfs-tools/Makefile --replace ' -Werror' ' ' | ||
| # Add -fcommon as a woarkaround for compiler that default to -fno-common | ||
| # like upstream gcc-10 or clang-11. Will be fixed upstream at: | ||
| # https://github.com/devttys0/sasquatch/pull/44 | ||
| substituteInPlace squashfs-tools/Makefile --replace ' -Werror' ' -fcommon' |
Contributor
Author
There was a problem hiding this comment.
Unfortunately not directly. nixpkgs's sasquatch if a fork by @cole-h with a very invasive devttys0/sasquatch#40 applied (changes every hunk offset).
The repository format is already storing a patch (and not just the source) which makes any (even trivial) changes to it effectively non-composable.
Contributor
Author
|
Does not seem to happen. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Without the change build on clang-12 or upstream gcc-12 fails as:
Until upstream fixes it by fixing
verbosevariable declaration at:devttys0/sasquatch#44
and fork rebases let's set
-fcommonexplicitly.