Unverified Commit 912403e8 authored by John Ericson's avatar John Ericson Committed by GitHub
Browse files

hello: re-enable fortify and patch gnulib to fix compile (#479392)

parents 37db84c8 de105372
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
  testers,
  versionCheckHook,
  hello,
  gnulib,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -18,6 +19,8 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-WpqZbcKSzCTc9BHO6H6S9qrluNE72caBm0x6nc4IGKs=";
  };

  patches = lib.optional stdenv.hostPlatform.isCygwin gnulib.patches.memcpy-fix-backport-250512;

  # The GNU Hello `configure` script detects how to link libiconv but fails to actually make use of that.
  # Unfortunately, this cannot be a patch to `Makefile.am` because `autoreconfHook` causes a gettext
  # infrastructure mismatch error when trying to build `hello`.
@@ -25,12 +28,6 @@ stdenv.mkDerivation (finalAttrs: {
    NIX_LDFLAGS = "-liconv";
  };

  # lib/string.h:754:20: error: expected declaration specifiers or '...' before numeric constant
  # The embedded gnulib is currently broken on cygwin when fortify is enabled.
  # This can be removed when gnulib is updated with the fix:
  # https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff_plain;h=c44fe03b72687c9e913727724c29bdb49c1f86e3
  hardeningDisable = lib.optional stdenv.hostPlatform.isCygwin "fortify";

  doCheck = true;

  doInstallCheck = true;