From 86a0e46ed4687f9a8ab8e1c38c7f0b926bf77d11 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 23 Feb 2023 22:47:58 -0800 Subject: [PATCH] gcc: fix implication order in assertion In 6812dd98c47b54dc30d920655eb89fda844818c4 I mistakenly had the implication order reversed. This commit corrects that mistake. The original assertion (which is correct) was the following, which asserts that if you enable the GDB plugin, you must enable plugins generally (there is shared infrastructure): ``` assert enableGdbPlugin -> enablePlugin; ``` When the option name was changed to `disableGdbPlugin`, I incorrectly wrote: ``` assert disableGdbPlugin -> enablePlugin; ``` And then again incorrectly wrote: ``` assert disableGdbPlugin -> !enablePlugin; ``` This commit uses the correct equivalent for the first statement, which is the contrapositive: ``` assert !enablePlugin -> disableGdbPlugin; ``` --- pkgs/development/compilers/gcc/common/configure-flags.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index e0a713bc3853..eadc6967acfc 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -27,7 +27,7 @@ , disableBootstrap ? stdenv.targetPlatform != stdenv.hostPlatform }: -assert disableGdbPlugin -> !enablePlugin; +assert !enablePlugin -> disableGdbPlugin; assert langJava -> lib.versionOlder version "7"; # Note [Windows Exception Handling]