Skip to content

Conversation

@zxalexis
Copy link

@zxalexis zxalexis commented Feb 5, 2026

Fix build compatibility with GCC 15.2+ which defaults to -std=c23

Fix build compatibility with GCC 15.2+ which defaults to -std=c23
@markpizz
Copy link
Contributor

markpizz commented Feb 5, 2026

Does the makefile build on that host?
If so, the problem is in the cmake setup which is forcing a new C dialect on a long functioning codebase.

@markpizz
Copy link
Contributor

markpizz commented Feb 6, 2026

Like I said above, the necessary fix to solve your problem is in the cmake logic.

The makefile builds just fine:

*** pdp11 Simulator being built with:
*** - compiler optimizations and no debugging support. GCC Version: 15.2.1.
*** - dynamic networking support using Linux provided libpcap components.
*** - Local LAN packet transports: PCAP TAP NAT(SLiRP)
*** - video capabilities provided by libSDL2 (Simple Directmedia Layer).
*** - Per simulator tests will be run.
***
*** git commit id is 4d38373206cd7c0ce8b94f5e16bd4429cb96430f.
*** git commit time is 2025-10-12T07:58:51+0200.
***
gcc -std=gnu99 -U__STRICT_ANSI__  -O2 -DNDEBUG=1 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -DSIM_GIT_COMMIT_ID=4d38373206cd7c0ce8b94f5e16bd4429cb96430f -DSIM_GIT_COMMIT_TIME=2025-10-12T07:58:51+0200  -DSIM_COMPILER="GCC Version: 15.2.1" -DSIM_BUILD_TOOL=simh-makefile -I . -Werror -D_GNU_SOURCE -DHAVE_PCRE_H -DHAVE_SEMAPHORE -DHAVE_SYS_IOCTL -DHAVE_LINUX_CDROM -DSIM_HAVE_DLOPEN=so -DHAVE_EDITLINE -DHAVE_UTIME -DHAVE_LIBPNG -DHAVE_ZLIB -DHAVE_GLOB -DHAVE_SHM_OPEN  ./PDP11/pdp11_fp.c ./PDP11/pdp11_cpu.c ./PDP11/pdp11_dz.c ./PDP11/pdp11_cis.c ./PDP11/pdp11_lp.c ./PDP11/pdp11_rk.c ./PDP11/pdp11_rl.c ./PDP11/pdp11_rp.c ./PDP11/pdp11_rx.c ./PDP11/pdp11_stddev.c ./PDP11/pdp11_sys.c ./PDP11/pdp11_tc.c ./PDP11/pdp11_tm.c ./PDP11/pdp11_ts.c ./PDP11/pdp11_io.c ./PDP11/pdp11_rq.c ./PDP11/pdp11_tq.c ./PDP11/pdp11_pclk.c ./PDP11/pdp11_ry.c ./PDP11/pdp11_pt.c ./PDP11/pdp11_hk.c ./PDP11/pdp11_xq.c ./PDP11/pdp11_xu.c ./PDP11/pdp11_vh.c ./PDP11/pdp11_rh.c ./PDP11/pdp11_tu.c ./PDP11/pdp11_cpumod.c ./PDP11/pdp11_cr.c ./PDP11/pdp11_rf.c ./PDP11/pdp11_dl.c ./PDP11/pdp11_ta.c ./PDP11/pdp11_rc.c ./PDP11/pdp11_kg.c ./PDP11/pdp11_ke.c ./PDP11/pdp11_dc.c ./PDP11/pdp11_dmc.c ./PDP11/pdp11_kmc.c ./PDP11/pdp11_dup.c ./PDP11/pdp11_rs.c ./PDP11/pdp11_vt.c ./PDP11/pdp11_td.c ./PDP11/pdp11_io_lib.c ./PDP11/pdp11_rom.c ./PDP11/pdp11_ch.c ./PDP11/pdp11_dh.c ./PDP11/pdp11_ng.c ./PDP11/pdp11_daz.c ./PDP11/pdp11_tv.c ./PDP11/pdp11_mb.c ./PDP11/pdp11_rr.c ./display/display.c ./display/sim_ws.c ./display/ng.c ./display/vt11.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_PDP11 -I ./PDP11 -DHAVE_PCAP_NETWORK -I/usr/include/ -DBPF_CONST_STRING -DUSE_SHARED -DHAVE_TAP_NETWORK -Islirp -Islirp_glue -Islirp_glue/qemu -DHAVE_SLIRP_NETWORK -DUSE_SIMH_SLIRP_DEBUG slirp/*.c slirp_glue/*.c -DUSE_DISPLAY -DHAVE_LIBSDL -DUSE_SIM_VIDEO `sdl2-config --cflags` `sdl2-config --libs` -DUSE_READER_THREAD -DSIM_ASYNCH_IO -o BIN/pdp11 -lm -lrt -lpthread -lpcre -ldl -ledit -ltermcap -lpng -lz
BIN/pdp11 RegisterSanityCheck  </dev/null
 Running internal register sanity checks on PDP-11 simulator.
*** Good Registers in PDP-11 simulator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants