miranda: use gcc14Stdenv to fix build

This commit is contained in:
Ben Siraphob
2026-04-20 13:13:39 -07:00
parent 8cb63be624
commit 8dad9ee524
+5 -12
View File
@@ -1,11 +1,11 @@
{
stdenv,
gcc14Stdenv,
lib,
fetchzip,
fetchpatch,
}:
stdenv.mkDerivation (finalAttrs: {
gcc14Stdenv.mkDerivation (finalAttrs: {
pname = "miranda";
version = "2.066";
@@ -62,17 +62,10 @@ stdenv.mkDerivation (finalAttrs: {
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: types.o:(.bss+0x11b0): multiple definition of `current_file'; y.tab.o:(.bss+0x70): first defined here
env.NIX_CFLAGS_COMPILE = toString (
[
"-fcommon"
]
++ lib.optionals stdenv.cc.isClang [
"-Wno-error=int-conversion"
]
);
env.NIX_CFLAGS_COMPILE = "-fcommon";
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CC=${gcc14Stdenv.cc.targetPrefix}cc"
"CFLAGS=-O2"
"PREFIX=${placeholder "out"}"
];
@@ -81,7 +74,7 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
patchShebangs quotehostinfo
substituteInPlace Makefile --replace strip '${stdenv.cc.targetPrefix}strip'
substituteInPlace Makefile --replace strip '${gcc14Stdenv.cc.targetPrefix}strip'
'';
meta = {