Skip to content

sasquatch: pass -fcommon to fix build on -fno-common toolchains #147627

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkgs/tools/filesystems/sasquatch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ stdenv.mkDerivation rec {
postPatch = ''
# Drop blanket -Werror to avoid build failure on fresh toolchains
# like gcc-11.
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'
Comment on lines -48 to +51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fetch the patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

cd squashfs-tools
'';

Expand Down