diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index ab62fdf3fa20..f658106802b4 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -129,7 +129,8 @@ stdenvNoLibs.mkDerivation rec { "--with-system-zlib" ] ++ lib.optional (stdenvNoLibs.hostPlatform.libc == "glibc") - "--with-glibc-version=${glibc.version}"; + # libgcc expects a glibc version of the format X.Y while we usually have a version X.Y-Z where Z is our patchlevel. + "--with-glibc-version=${builtins.head (builtins.split "-" glibc.version)}"; configurePlatforms = [ "build" "host" ]; configureFlags = [