nbench: fix build with gcc15

This commit is contained in:
Xiangyan Sun
2026-05-03 18:23:57 -07:00
parent ac3bc672c5
commit 30ef665347
+4 -3
View File
@@ -14,11 +14,12 @@ stdenv.mkDerivation (finalAttrs: {
};
prePatch = ''
substituteInPlace nbench1.h --replace '"NNET.DAT"' "\"$out/NNET.DAT\""
substituteInPlace sysspec.h --replace "malloc.h" "stdlib.h"
substituteInPlace nbench1.h --replace-fail '"NNET.DAT"' "\"$out/NNET.DAT\"" \
--replace-fail 'static void adjust_mid_wts();' 'static void adjust_mid_wts(int);'
substituteInPlace sysspec.h --replace-fail "malloc.h" "stdlib.h"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile --replace "-static" ""
substituteInPlace Makefile --replace-fail "-static" ""
'';
buildInputs = lib.optionals stdenv.hostPlatform.isGnu [