Skip to content

Commit

Permalink
Merge pull request #244255 from amjoseph-nixpkgs/pr/mips/openssl-march
Browse files Browse the repository at this point in the history
openssl: prevent -march= flags from being added on mips
  • Loading branch information
Adam Joseph authored Jul 31, 2023
2 parents e6027c2 + 7eaaa6e commit a5e3f30
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkgs/development/libraries/openssl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,19 @@ let
# trying to build binaries statically.
++ lib.optional static "no-ct"
++ lib.optional withZlib "zlib"
;
++ lib.optionals (stdenv.hostPlatform.isMips && stdenv.hostPlatform ? gcc.arch) [
# This is necessary in order to avoid openssl adding -march
# flags which ultimately conflict with those added by
# cc-wrapper. Openssl assumes that it can scan CFLAGS to
# detect any -march flags, using this perl code:
#
# && !grep { $_ =~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})
#
# The following bogus CFLAGS environment variable triggers the
# the code above, inhibiting `./Configure` from adding the
# conflicting flags.
"CFLAGS=-march=${stdenv.hostPlatform.gcc.arch}"
];

makeFlags = [
"MANDIR=$(man)/share/man"
Expand Down

0 comments on commit a5e3f30

Please sign in to comment.