imagemagick: Allow compilation without --with-gcc-arch#125150
Merged
Mic92 merged 1 commit intoNixOS:masterfrom Jun 1, 2021
Merged
imagemagick: Allow compilation without --with-gcc-arch#125150Mic92 merged 1 commit intoNixOS:masterfrom
Mic92 merged 1 commit intoNixOS:masterfrom
Conversation
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
Closed
13 tasks
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.
Motivation for this change
The
--with-gcc-archflag is used to specify the value used for--marchand--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
ifarms are even correct. For example,aarch64is not a valid value for-march/-mtunein 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
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)