From 3a90ec96a5cb2506b0e2e08ff29a0228af9ea0ea Mon Sep 17 00:00:00 2001 From: div72 Date: Thu, 9 Jan 2025 11:25:43 +0300 Subject: [PATCH 1/2] _9base: fix build on x86_64-linux The previous Darwin breakage due to p9mbtowc also happens on Linux now. (cherry picked from commit ed59c747b6091c43b7ec9d7ad0e55a1bfc6d22e1) --- pkgs/by-name/_9/_9base/package.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/by-name/_9/_9base/package.nix b/pkgs/by-name/_9/_9base/package.nix index 983b569062bcb..f6595fe5fdef9 100644 --- a/pkgs/by-name/_9/_9base/package.nix +++ b/pkgs/by-name/_9/_9base/package.nix @@ -49,8 +49,6 @@ stdenv.mkDerivation { # hide really common warning that floods the logs: # warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" "-D_DEFAULT_SOURCE" - ] - ++ lib.optionals stdenv.cc.isClang [ # error: call to undeclared function 'p9mbtowc'; ISO C99 and later do not support implicit function declarations "-Wno-error=implicit-function-declaration" ] From 1453ffc01435d1fae77a9d6619a0df06dd8f53be Mon Sep 17 00:00:00 2001 From: div72 Date: Thu, 9 Jan 2025 11:33:25 +0300 Subject: [PATCH 2/2] _9base: format package.nix (cherry picked from commit d17072281932871307166013dcbe7e2866c99309) --- pkgs/by-name/_9/_9base/package.nix | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/_9/_9base/package.nix b/pkgs/by-name/_9/_9base/package.nix index f6595fe5fdef9..02aa841117af5 100644 --- a/pkgs/by-name/_9/_9base/package.nix +++ b/pkgs/by-name/_9/_9base/package.nix @@ -40,19 +40,17 @@ stdenv.mkDerivation { enableParallelBuilding = true; strictDeps = true; nativeBuildInputs = [ pkg-config ]; - env.NIX_CFLAGS_COMPILE = toString ( - [ - # workaround build failure on -fno-common toolchains like upstream - # gcc-10. Otherwise build fails as: - # ld: diffio.o:(.bss+0x16): multiple definition of `bflag'; diffdir.o:(.bss+0x6): first defined here - "-fcommon" - # hide really common warning that floods the logs: - # warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" - "-D_DEFAULT_SOURCE" - # error: call to undeclared function 'p9mbtowc'; ISO C99 and later do not support implicit function declarations - "-Wno-error=implicit-function-declaration" - ] - ); + env.NIX_CFLAGS_COMPILE = toString ([ + # workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: diffio.o:(.bss+0x16): multiple definition of `bflag'; diffdir.o:(.bss+0x6): first defined here + "-fcommon" + # hide really common warning that floods the logs: + # warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + "-D_DEFAULT_SOURCE" + # error: call to undeclared function 'p9mbtowc'; ISO C99 and later do not support implicit function declarations + "-Wno-error=implicit-function-declaration" + ]); env.LDFLAGS = lib.optionalString enableStatic "-static"; makeFlags = [ "PREFIX=${placeholder "out"}"