From 9c20f9ca35c25490d1b5cb25cd1388f436ed9438 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 9 Dec 2025 16:43:14 -1000 Subject: [PATCH] makefile: Add support for building all simulators on illumos (Open Indiana) - Proper compiler detection selects 64bit libraries when gcc generates 64bit code. Fix #1237 --- README.md | 1 + makefile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ac96539..9061f04b 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ Simulator binaries for x86 Linus, x86 macOS, and Windows for all recent changes - Enhanced Ethernet functionality on macOS which leverages the OS provided vmnet capabilities. This is available on all intel and Apple Silicon macOS systems starting with Catalina (10.15) which was released in 2019. - SCP IF command supports RegEx comparisons. - Windows builds are supported running all versions of Microsoft Visual Studio, including the most recent VS2026. +- All simulators build with full functionality on illumos Open Indiana. #### All simulators build cleanly under OpenVMS on ia64 systems. diff --git a/makefile b/makefile index e5e2d53c..d4629497 100644 --- a/makefile +++ b/makefile @@ -632,7 +632,10 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) ifeq (SunOS,$(OSTYPE)) OSNAME = Solaris ifneq (lib,$(findstring lib,$(UNSUPPORTED_BUILD))) - LIBPATH := $(shell LANG=C; crle | grep 'Default Library Path' | awk '{ print $$5 }' | sed 's/:/ /g') + ifneq (,$(shell gcc -dumpmachine 2>&1 | grep 64)) + _LIB64 := -64 + endif + LIBPATH := $(shell LANG=C; crle $(_LIB64) | grep 'Default Library Path' | awk '{ print $$5 }' | sed 's/:/ /g') endif LIBEXT = so OS_LDFLAGS += -lsocket -lnsl