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
1 change: 1 addition & 0 deletions building/linux64ARMv8/squeak.cog.spur/build.debug/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if [ `uname` = "OpenBSD" ]; then
LIBRT=""
# OpenBSD has problems with fast-bitblt under gcc and clang
FASTBITBLT=""
OPT="$OPT -DMUSL"
# Prefer clang over gcc if available
if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi
else # non-OpenBSD Linux
Expand Down
2 changes: 1 addition & 1 deletion building/linux64ARMv8/squeak.cog.spur/build/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ INSTALLDIR=sqcogspur64ARMv8linuxht
# tpr - add enablementisation of fast bitblt ben avison code
MACHINE="-march=armv8-a -mtune=cortex-a72"
OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -D_GNU_SOURCE -DUSEEVDEV"
##OPT="-g -O3 -DMUSL -DNDEBUG -DDEBUGVM=0"

if [ `uname` = "OpenBSD" ]; then
DUALMAP="-DDUAL_MAPPED_CODE_ZONE=0"
Expand All @@ -16,6 +15,7 @@ if [ `uname` = "OpenBSD" ]; then
LIBRT=""
# OpenBSD has problems with fast-bitblt under gcc and clang
FASTBITBLT=""
OPT="$OPT -DMUSL"
# Prefer clang over gcc if available
if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi
else # non-OpenBSD Linux
Expand Down
1 change: 1 addition & 0 deletions building/linux64x64/squeak.cog.spur/build.debug/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if [ `uname` = "OpenBSD" ]; then
CFLAGS="$CFLAGS -I/usr/local/include"
LIBS="$LIBS -lexecinfo"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
OPT="$OPT -DMUSL"
fi

if [ $# -ge 1 ]; then
Expand Down
12 changes: 6 additions & 6 deletions building/linux64x64/squeak.cog.spur/build/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ if [ -n "$(command -v clang || true)" ]; then CC=clang; else CC=gcc; fi
# librt and libpthread funs now supplied by libc
# Many Linux systems supply empty library files
# but OpenBSD does not.
if [ `uname` = "OpenBSD" ]; then LIBRT=""; else LIBRT="-lrt"; fi

CFLAGS="$OPT -msse2 -DCOGMTVM=0"
LIBS=$LIBRT
LDFLAGS=""

# Special treatment for OpenBSD Linux
if [ `uname` = "OpenBSD" ]; then
CFLAGS="$CFLAGS -I/usr/local/include"
OPT="$OPT -DMUSL"
CFLAGS="$CFLAGS $OPT -I/usr/local/include"
LIBS="$LIBS -lexecinfo"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
else
CFLAGS="$CFLAGS $OPT -msse2 -DCOGMTVM=0"
LIBS="$LIBS -lrt"
LDFLAGS="$LDFLAGS"
fi

if [ $# -ge 1 ]; then
Expand Down
4 changes: 4 additions & 0 deletions platforms/unix/vm/sqUnixMemory.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ int mmapErrno = 0;
#endif

#define MAP_PROT (PROT_READ | PROT_WRITE)
#ifdef __OpenBSD__
#define MAP_FLAGS (MAP_ANON | MAP_PRIVATE | MAP_STACK)
#else
#define MAP_FLAGS (MAP_ANON | MAP_PRIVATE)
#endif

extern int useMmap;
/* Since Cog needs to make memory executable via mprotect, and since mprotect
Expand Down
Loading