imagemagick: Allow compilation without --with-gcc-arch #125150
Merged
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-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
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)