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

imagemagick: Allow compilation without --with-gcc-arch #125150

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

zhaofengli
Copy link
Member

Motivation for this change

The --with-gcc-arch flag is used to specify the value used for --march and --mtune [1], therefore it does not make sense to fail the evaluation simply because it's not enumerated by us. However, it's necessary to specify --without-gcc-arch, otherwise the config script will try to guess the values which leads to incompatible/non-determinstic artifacts.

I also have doubts whether some of the current values in the if arms are even correct. For example, aarch64 is not a valid value for -march/-mtune in aarch64 GCC. They "work" because the config script gracefully falls back (search for "whether C compiler accepts").

Tested by compiling imagemagick7 natively on riscv64 (with #115406 and #125132 for dependencies). A dependency of imagemagick6 does not build on riscv64 but that's a separate issue. This should not affect currently "supported" targets.

[1] https://github.com/ImageMagick/ImageMagick/blob/850d5a9fc5d8d6ae7534421737a1709efe164a77/m4/ax_gcc_archflag.m4

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Added a release notes entry if the change is major or breaking
  • Fits CONTRIBUTING.md.

The --with-gcc-arch flag is used to specify the value used for
--march and --mtune [1], therefore it does not make sense to fail the
evaluation simply because it's not enumerated by us. However,
it's necessary to specify --without-gcc-arch, otherwise the config
script will guess the values and lead to incompatible / non-determinstic
artifacts.

[1] https://github.com/ImageMagick/ImageMagick/blob/850d5a9fc5d8d6ae7534421737a1709efe164a77/m4/ax_gcc_archflag.m4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants