Skip to content
Open
Show file tree
Hide file tree
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
45 changes: 20 additions & 25 deletions pkgs/development/compilers/opensmalltalk-vm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
pango,
pkg-config,
xorg,
libGL,
}:
let
buildVM =
Expand All @@ -31,8 +32,8 @@ let
src = fetchFromGitHub {
owner = "OpenSmalltalk";
repo = "opensmalltalk-vm";
tag = "202206021410";
hash = "sha256-QqElPiJuqD5svFjWrLz1zL0Tf+pHxQ2fPvkVRn2lyBI=";
tag = "202312181441";
hash = "sha256-j8fVL8072ccdaRyW5sPDcYXxMcIZIvSFJ+4Q1+41ey0=";
};
in
stdenv.mkDerivation {
Expand All @@ -45,6 +46,10 @@ let

inherit src;

# Fixes build errors triggered by the format-security compiler flag
# and caused by passing non-literals as the first argument to printf.
patches = [ ./printOptionStrings.patch ];

postPatch = ''
vmVersionFiles=$(sed -n 's/^versionfiles="\(.*\)"/\1/p' ./scripts/updateSCCSVersions)
for vmVersionFile in $vmVersionFiles; do
Expand Down Expand Up @@ -74,9 +79,12 @@ let

configureFlags = [ "--with-scriptname=${scriptName}" ] ++ configureFlags;

buildFlags = [ "all" ];
buildFlags = [
"getversion"
"all"
];

enableParallelBuilding = true;
enableParallelBuilding = false;

nativeBuildInputs = [
file
Expand All @@ -86,6 +94,7 @@ let
buildInputs = [
alsa-lib
freetype
libGL
libpulseaudio
libtool
libuuid
Expand All @@ -106,7 +115,7 @@ let
'';

meta = {
description = "Cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak";
description = "Cross-platform virtual machine for Squeak, Pharo, and Cuis";
mainProgram = scriptName;
homepage = "https://opensmalltalk.org/";
license = with lib.licenses; [ mit ];
Expand All @@ -123,7 +132,7 @@ let
scriptName = "squeak";
configureFlagsArray = ''
(
CFLAGS="-DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1"
CFLAGS="-fpermissive -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1"
LIBS="-lrt"
)
'';
Expand All @@ -132,6 +141,7 @@ let
"--with-src=src/spur64.cog"
"--without-npsqueak"
"--enable-fast-bitblt"
"--disable-dynamicopenssl"
];
};

Expand All @@ -141,49 +151,34 @@ let
scriptName = "squeak";
configureFlagsArray = ''
(
CFLAGS="-DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -D__ARM_ARCH_ISA_A64 -DARM64 -D__arm__ -D__arm64__ -D__aarch64__"
CFLAGS="-fpermissive -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -D__ARM_ARCH_ISA_A64 -DARM64 -D__arm__ -D__arm64__ -D__aarch64__"
)
'';
configureFlags = [
"--with-vmversion=5.0"
"--with-src=src/spur64.stack"
"--disable-cogit"
"--without-npsqueak"
"--disable-dynamicopenssl"
];
};
};

"x86_64-linux" = {
"newspeak-cog-spur" = buildVM {
platformDir = "linux64x64";
vmName = "newspeak.cog.spur";
scriptName = "newspeak";
configureFlagsArray = ''
(
CFLAGS="-DNDEBUG -DDEBUGVM=0"
)
'';
configureFlags = [
"--with-vmversion=5.0"
"--with-src=src/spur64.cog.newspeak"
"--without-vm-display-fbdev"
"--without-npsqueak"
];
};

"squeak-cog-spur" = buildVM {
platformDir = "linux64x64";
vmName = "squeak.cog.spur";
scriptName = "squeak";
configureFlagsArray = ''
(
CFLAGS="-DNDEBUG -DDEBUGVM=0 -DCOGMTVM=0"
CFLAGS="-fpermissive -DNDEBUG -DDEBUGVM=0 -DCOGMTVM=0"
)
'';
configureFlags = [
"--with-vmversion=5.0"
"--with-src=src/spur64.cog"
"--without-npsqueak"
"--disable-dynamicopenssl"
];
};
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m b/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m
index d248e9fd0..0ae695061 100644
--- a/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m
+++ b/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m
@@ -559,7 +559,7 @@ printOptionStrings()
sizeof(char *),
(int (*)(const void*,const void*))sortStrings);
while (--count >= 0)
- printf(optionStrings[count]);
+ printf("%s", optionStrings[count]);
}

- (void) printUsage {
diff --git a/platforms/unix/vm/sqUnixMain.c b/platforms/unix/vm/sqUnixMain.c
index 4795563f5..419f527e3 100644
--- a/platforms/unix/vm/sqUnixMain.c
+++ b/platforms/unix/vm/sqUnixMain.c
@@ -1829,7 +1829,7 @@ printOptionStrings()
sizeof(char *),
(int (*)(const void*,const void*))sortStrings);
while (--count >= 0)
- printf(optionStrings[count]);
+ printf("%s", optionStrings[count]);
}

void
Loading