diff --git a/building/linux64ARMv8/squeak.cog.spur/build.debug/mvm b/building/linux64ARMv8/squeak.cog.spur/build.debug/mvm index 235c119042..64279e784f 100755 --- a/building/linux64ARMv8/squeak.cog.spur/build.debug/mvm +++ b/building/linux64ARMv8/squeak.cog.spur/build.debug/mvm @@ -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 diff --git a/building/linux64ARMv8/squeak.cog.spur/build/mvm b/building/linux64ARMv8/squeak.cog.spur/build/mvm index d299659380..5976ca0df6 100755 --- a/building/linux64ARMv8/squeak.cog.spur/build/mvm +++ b/building/linux64ARMv8/squeak.cog.spur/build/mvm @@ -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" @@ -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 diff --git a/building/linux64x64/squeak.cog.spur/build.debug/mvm b/building/linux64x64/squeak.cog.spur/build.debug/mvm index 5814694860..9fadf6ea3f 100755 --- a/building/linux64x64/squeak.cog.spur/build.debug/mvm +++ b/building/linux64x64/squeak.cog.spur/build.debug/mvm @@ -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 diff --git a/building/linux64x64/squeak.cog.spur/build/mvm b/building/linux64x64/squeak.cog.spur/build/mvm index 5f8639bf78..220d43b086 100755 --- a/building/linux64x64/squeak.cog.spur/build/mvm +++ b/building/linux64x64/squeak.cog.spur/build/mvm @@ -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 diff --git a/platforms/unix/vm/sqUnixMemory.c b/platforms/unix/vm/sqUnixMemory.c index 17d5343a26..681b0d800d 100644 --- a/platforms/unix/vm/sqUnixMemory.c +++ b/platforms/unix/vm/sqUnixMemory.c @@ -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