tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
two emulators/simh issues
hi-
I'm currently testing on Darwin/OSX (mojave) with a new pkgsrc build.
Heree are two issues:
[1] the simulations build fails if you are logged in via ssh due to
an "SDL" error:
cp BIN/microvax3900 BIN/vax
BIN/microvax3900 /usr/local/src/pkgsrc/emulators/simh/work/simh-0fe4bf3281a4d1f9fd10bba07cf0f7e40da92fc3/VAX/tests/microvax3900_test.ini
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
SDL Video subsystem can't initialize
it works fine if you are building it while logged in directly on
the console rather via ssh.
is there a way to tell SDL not to do this or just switch it off?
[2] on Darwin the default for simh is to compile with "-O0" but pkgsrc
patch-makefile does the following to allow the environment
to override this:
else
ifneq (,$(findstring clang,$(COMPILER_NAME))$(findstring LLVM,$(COMPILER_NAME)))
- CFLAGS_O = -O0
+ CFLAGS_O ?= -O0
ifeq (Darwin,$(OSTYPE))
NO_LTO = 1
endif
this causes it to switch to "-O2" from pkgsrc which is almost ok, but
but to get "-O2" to function it also requires the "-fno-strict-overflow"
(and pkgsrc doesn't set that).
The result is a build error when the microvax3900 fails to pass
the EHKAA test due to "-O2" without "-fno-strict-overflow":
clang -std=c99 -U__STRICT_ANSI__ -O2 -I/usr/local/pkg.1901/include -I/usr/local/pkg.1901/include/SDL2 -I/opt/X11/include/freetype2 -finline-functions -DSIM_GIT_COMMIT_ID=0fe4bf3281a4d1f9fd10bba07cf0f7e40da92fc3 -DSIM_GIT_COMMIT_TIME=2018-09-19T22:36:48-07:00 -DSIM_BUILD=Unsupported=include+lib -DSIM_COMPILER="Apple LLVM version 10.0.0" -I . -D_GNU_SOURCE -DHAVE_PCREPOSIX_H -DHAVE_LIBPNG VAX/vax_cpu.c VAX/vax_cpu1.c VAX/vax_fpa.c VAX/vax_io.c VAX/vax_cis.c VAX/vax_octa.c VAX/vax_cmode.c VAX/vax_mmu.c VAX/vax_stddev.c VAX/vax_sysdev.c VAX/vax_sys.c VAX/vax_syscm.c VAX/vax_syslist.c VAX/vax_vc.c VAX/vax_lk.c VAX/vax_vs.c VAX/vax_2681.c PDP11/pdp11_rl.c PDP11/pdp11_rq.c PDP11/pdp11_ts.c PDP11/pdp11_dz.c PDP11/pdp11_lp.c PDP11/pdp11_tq.c PDP11/pdp11_xq.c PDP11/pdp11_vh.c PDP11/pdp11_cr.c PDP11/pdp11_td.c PDP11/pdp11_io_lib.c scp.c sim_console.c sim_fio.c sim_timer.c sim_sock.c sim_tmxr.c sim_ether.c sim_tape.c sim_disk.c sim_serial.c sim_video.c sim_imd.c sim_card.c -DVM_VAX -DUSE_INT64 -DUSE_ADDR64 -DUSE_SIM_VIDEO -I VAX -I PDP11 -Islirp -Islirp_glue -Islirp_glue/qemu -DHAVE_SLIRP_NETWORK -DUSE_SIMH_SLIRP_DEBUG slirp/*.c slirp_glue/*.c -DUSE_NETWORK -DHAVE_LIBSDL -DUSE_SIM_VIDEO `/usr/local/pkg.1901/bin/sdl2-config --cflags` -DSDL_MAIN_AVAILABLE `/usr/local/pkg.1901/bin/sdl2-config --libs` -o BIN/microvax3900 -L/usr/local/pkg.1901/lib -L/usr/lib -L/opt/X11/lib -L/usr/X11/lib -lm -lpcreposix -lpcre -lpng
cp BIN/microvax3900 BIN/vax
BIN/microvax3900 /usr/local/src/pkgsrc/emulators/simh/work/simh-0fe4bf3281a4d1f9fd10bba07cf0f7e40da92fc3/VAX/tests/microvax3900_test.ini
MicroVAX 3900 simulator V4.0-0 Current git commit id: 0fe4bf32 Build: Unsupported=include+lib
HALT instruction, PC: 8000279F (CMPL R8,R3)
MicroVAX 3900 Hardware Core Instruction test EHKAA - FAILED
gnumake: *** [BIN/microvax3900] Error 1
one way to resolve this problem is to put:
CFLAGS.Darwin+= -fno-strict-overflow
in the pkgsrc Makefile. if you do that, then the EHKAA test works fine
(at least on Darwin)... but I wonder if there are other systems where
the patch-makefile is setting -O2 without "-fno-strict-overflow" where
it is needed?
chuck
Home |
Main Index |
Thread Index |
Old Index