Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc: rename enablePlugin to enablePlugins #217978

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/development/compilers/gcc/10/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
, zlib ? null
, gnatboot ? null
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand Down Expand Up @@ -104,7 +104,7 @@ let majorVersion = "10";
crossStageStatic
enableLTO
enableMultilib
enablePlugin
enablePlugins
enableShared
fetchpatch
fetchurl
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/compilers/gcc/11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
, zlib ? null
, gnatboot ? null
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand All @@ -27,7 +27,7 @@
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
, libxcrypt
, disableGdbPlugin ? !enablePlugin
, disableGdbPlugin ? !enablePlugins
}:

# Make sure we get GNU sed.
Expand Down Expand Up @@ -115,7 +115,7 @@ let majorVersion = "11";
crossStageStatic
enableLTO
enableMultilib
enablePlugin
enablePlugins
disableGdbPlugin
enableShared
disableBootstrap
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/compilers/gcc/12/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
, libucontext ? null
, gnatboot ? null
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand All @@ -28,7 +28,7 @@
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
, libxcrypt
, disableGdbPlugin ? !enablePlugin
, disableGdbPlugin ? !enablePlugins
}:

# Make sure we get GNU sed.
Expand Down Expand Up @@ -148,7 +148,7 @@ let majorVersion = "12";
disableGdbPlugin
enableLTO
enableMultilib
enablePlugin
enablePlugins
enableShared
fetchpatch
fetchurl
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/gcc/4.8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
, libXrandr ? null, libXi ? null
, x11Support ? langJava
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand Down Expand Up @@ -137,7 +137,7 @@ let majorVersion = "4";
crossStageStatic
enableLTO
enableMultilib
enablePlugin
enablePlugins
enableShared
fetchpatch
fetchurl
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/gcc/4.9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
, libXrandr ? null, libXi ? null
, x11Support ? langJava
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand Down Expand Up @@ -153,7 +153,7 @@ let majorVersion = "4";
crossStageStatic
enableLTO
enableMultilib
enablePlugin
enablePlugins
enableShared
fetchpatch
fetchurl
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/gcc/6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
, libXrandr ? null, libXi ? null
, x11Support ? langJava
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand Down Expand Up @@ -141,7 +141,7 @@ let majorVersion = "6";
crossStageStatic
enableLTO
enableMultilib
enablePlugin
enablePlugins
enableShared
fetchFromGitHub
fetchpatch
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/gcc/7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand Down Expand Up @@ -112,7 +112,7 @@ let majorVersion = "7";
crossStageStatic
enableLTO
enableMultilib
enablePlugin
enablePlugins
enableShared
fetchpatch
fetchurl
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/gcc/8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand Down Expand Up @@ -94,7 +94,7 @@ let majorVersion = "8";
crossStageStatic
enableLTO
enableMultilib
enablePlugin
enablePlugins
enableShared
fetchpatch
fetchurl
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/gcc/9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
, zlib ? null
, gnatboot ? null
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, enablePlugins ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
Expand Down Expand Up @@ -105,7 +105,7 @@ let majorVersion = "9";
crossStageStatic
enableLTO
enableMultilib
enablePlugin
enablePlugins
enableShared
fetchpatch
fetchurl
Expand Down
8 changes: 4 additions & 4 deletions pkgs/development/compilers/gcc/common/configure-flags.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

, enableLTO
, enableMultilib
, enablePlugin
, disableGdbPlugin ? !enablePlugin
, enablePlugins
, disableGdbPlugin ? !enablePlugins
, enableShared

, langC
Expand All @@ -27,7 +27,7 @@
, disableBootstrap ? stdenv.targetPlatform != stdenv.hostPlatform
}:

assert disableGdbPlugin -> !enablePlugin;
assert !enablePlugins -> disableGdbPlugin;
assert langJava -> lib.versionOlder version "7";

# Note [Windows Exception Handling]
Expand Down Expand Up @@ -174,7 +174,7 @@ let
then ["--enable-multilib" "--disable-libquadmath"]
else ["--disable-multilib"])
++ lib.optional (!enableShared) "--disable-shared"
++ lib.singleton (lib.enableFeature enablePlugin "plugin")
++ lib.singleton (lib.enableFeature enablePlugins "plugin")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While gcc/gcc has only --enable-plugin m4 code contains both flags:

$ git grep plugin |& fgrep AC_ARG
config/gcc-plugin.m4:   AC_ARG_ENABLE(plugin,
config/plugins.m4:  AC_ARG_ENABLE([plugins],

It is really scary that enablePlugins enable not the one you expect from the name.

I find enablePlugin and enablePlugins equally non-descriptive for what it does. But at least enablePlugin matches the configure option. There are at least 3 things I know of that gcc has to do with plugins:

  • liblto_plugin.so: binutils linker plugin
  • plugin API
  • libcc1plugin.so

I suggest picking something more distinctive across the 3. Maybe enablePluginApi? Or not do the rename at all.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes, I didn't know that there was an --enable-plugin in there.

# Libcc1 is the GCC cc1 plugin for the GDB debugger which is only used by gdb
++ lib.optional disableGdbPlugin "--disable-libcc1"

Expand Down