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

[Backport release-24.11] _9base: fix build on x86_64-linux #372809

Merged
merged 2 commits into from
Jan 11, 2025
Merged
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
26 changes: 11 additions & 15 deletions pkgs/by-name/_9/_9base/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +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"
]
++ 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"
]
);
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"}"
Expand Down
Loading