Unverified Commit a5e3f306 authored by Adam Joseph's avatar Adam Joseph Committed by GitHub
Browse files

Merge pull request #244255 from amjoseph-nixpkgs/pr/mips/openssl-march

openssl: prevent -march= flags from being added on mips
parents e6027c26 7eaaa6ef
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -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"