uasm: fix building with gcc > 13 (#489125)
This commit is contained in:
@@ -1,40 +1,37 @@
|
||||
{
|
||||
lib,
|
||||
gcc13Stdenv,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
testers,
|
||||
uasm,
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv = gcc13Stdenv;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "uasm";
|
||||
version = "2.57";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Terraspace";
|
||||
repo = "uasm";
|
||||
tag = "v${version}r";
|
||||
tag = "v${finalAttrs.version}r";
|
||||
hash = "sha256-HaiK2ogE71zwgfhWL7fesMrNZYnh8TV/kE3ZIS0l85w=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makefile =
|
||||
if gcc13Stdenv.hostPlatform.isDarwin then
|
||||
"Makefile-OSX-Clang-64.mak"
|
||||
else
|
||||
"Makefile-Linux-GCC-64.mak";
|
||||
if stdenv.hostPlatform.isDarwin then "Makefile-OSX-Clang-64.mak" else "Makefile-Linux-GCC-64.mak";
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
||||
|
||||
# Needed for compiling with GCC > 13
|
||||
env.CFLAGS = "-std=c99 -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-int-conversion";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dt "$out/bin" -m0755 GccUnixR/uasm
|
||||
install -Dt "$out/share/doc/${pname}" -m0644 {Readme,History}.txt Doc/*
|
||||
install -Dt "$out/share/doc/uasm" -m0644 {Readme,History}.txt Doc/*
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
@@ -42,7 +39,7 @@ stdenv.mkDerivation rec {
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = uasm;
|
||||
command = "uasm -h";
|
||||
version = "v${version}";
|
||||
version = "v${finalAttrs.version}";
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -50,8 +47,8 @@ stdenv.mkDerivation rec {
|
||||
description = "Free MASM-compatible assembler based on JWasm";
|
||||
mainProgram = "uasm";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ ];
|
||||
maintainers = [ lib.maintainers.zane ];
|
||||
license = lib.licenses.watcom;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user