From 80d9f7a6aada9a5c227a42abe2c14d15b09cefad Mon Sep 17 00:00:00 2001 From: Julie Schwartz Date: Wed, 29 May 2024 11:39:51 +1200 Subject: [PATCH] Update BSC to compile with GHC 9.10.1 The only change is to an invocation of GHC used to compile Htcl, to use -optc-D instead of -D, since not all versions of GHC pass -D options to the C compiler. --- src/comp/Makefile | 4 ++-- src/vendor/htcl/Makefile | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/comp/Makefile b/src/comp/Makefile index ae8828b01..ac57e3e55 100644 --- a/src/comp/Makefile +++ b/src/comp/Makefile @@ -81,8 +81,8 @@ GHCPATCH=$(shell echo $(GHCVERSION) | cut -d. -f3) ifeq ($(GHCMAJOR),9) # Warn about newer versions that are not yet supported -GHCMINORGT8 := $(shell expr $(GHCMINOR) \> 8) -ifeq ($(GHCMINORGT8),1) +GHCMINORGT10 := $(shell expr $(GHCMINOR) \> 10) +ifeq ($(GHCMINORGT10),1) $(warning Unsupported GHC 9 minor version: $(GHCMINOR)) endif diff --git a/src/vendor/htcl/Makefile b/src/vendor/htcl/Makefile index 221f4711e..87d926795 100644 --- a/src/vendor/htcl/Makefile +++ b/src/vendor/htcl/Makefile @@ -7,7 +7,9 @@ include $(TOP)/platform.mk TCLVER=$(shell echo 'catch { puts [info tclversion]; exit 0}; exit 1' | $(TCLSH)) ifeq ($(TCLVER),8.5) -GHCFLAGS += -DTCL85 +# Use -optc-D instead of -D, since not all versions of GHC pass -D to the C compiler +# (see GHC issue 24885) +GHCFLAGS += -optc-DTCL85 else ifeq ($(TCLVER),8.6) # No flags needed