libgcc: use glibc major and minor version but not the patch level

libgcc requires the version scheme X.Y whilst our glibc version
attribute usually is X.Y-Z where Z is our patchlevel.
This commit is contained in:
Andreas Rammhold 2021-05-17 00:38:59 +02:00 committed by Jonathan Ringer
parent 20acd4c4f1
commit 6020fe2508

View File

@ -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 = [