ports/emulators/simh/files/patch-makefile
Stefan Eßer e4211f22be Fix build with clang11
Reported by:	pkg-fallout
2020-09-01 10:49:52 +00:00

72 lines
2.4 KiB
Text

--- makefile.orig 2020-09-01 10:06:51 UTC
+++ makefile
@@ -110,7 +110,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
PCAPLIB = wpcap
LIBEXT = a
else
- LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
+########### LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
ifneq (,$(LDSEARCH))
LIBPATH := $(LDSEARCH)
endif
@@ -300,7 +300,7 @@ ifneq ($(DEBUG),)
CFLAGS_O = -O0
BUILD_FEATURES = - debugging support
else
- CFLAGS_O = -O2
+ CFLAGS_O ?= -O2
LDFLAGS_O =
GCC_MAJOR_VERSION = $(firstword $(subst ., ,$(GCC_VERSION)))
ifneq (3,$(GCC_MAJOR_VERSION))
@@ -309,9 +309,9 @@ else
endif
GCC_OPTIMIZERS = $(shell $(GCC_OPTIMIZERS_CMD))
endif
- ifneq (,$(findstring $(GCC_VERSION),$(LTO_EXCLUDE_VERSIONS)))
- NO_LTO = 1
- endif
+# ifneq (,$(findstring $(GCC_VERSION),$(LTO_EXCLUDE_VERSIONS)))
+# NO_LTO = 1
+# endif
ifneq (,$(findstring -finline-functions,$(GCC_OPTIMIZERS)))
CFLAGS_O += -finline-functions
endif
@@ -330,12 +330,14 @@ else
ifneq (,$(findstring -fstrict-overflow,$(GCC_OPTIMIZERS)))
CFLAGS_O += -fno-strict-overflow
endif
- ifeq (,$(NO_LTO))
- ifneq (,$(findstring -flto,$(GCC_OPTIMIZERS)))
- CFLAGS_O += -flto -fwhole-program
- LDFLAGS_O += -flto -fwhole-program
- endif
- endif
+# ifeq (,$(NO_LTO))
+# ifneq (,$(findstring -flto,$(GCC_OPTIMIZERS)))
+# ifneq (,$(findstring -fwhole-program,$(GCC_OPTIMIZERS)))
+# CFLAGS_O += -flto -fwhole-program
+# LDFLAGS_O += -flto -fwhole-program
+# endif
+# endif
+# endif
BUILD_FEATURES = - compiler optimizations and no debugging support
endif
ifneq (3,$(GCC_MAJOR_VERSION))
@@ -523,7 +525,7 @@ IBM1130 = ${IBM1130D}/ibm1130_cpu.c ${IBM1130D}/ibm113
${IBM1130D}/ibm1130_fmt.c ${IBM1130D}/ibm1130_ptrp.c \
${IBM1130D}/ibm1130_plot.c ${IBM1130D}/ibm1130_sca.c \
${IBM1130D}/ibm1130_t2741.c
-IBM1130_OPT = -I ${IBM1130D}
+IBM1130_OPT = -I ${IBM1130D} -D HAVE_VM_INIT
ID16D = Interdata
@@ -570,7 +572,7 @@ ALTAIRZ80 = ${ALTAIRZ80D}/altairz80_cpu.c ${ALTAIRZ80D
${ALTAIRZ80D}/s100_scp300f.c ${ALTAIRZ80D}/sim_imd.c \
${ALTAIRZ80D}/wd179x.c ${ALTAIRZ80D}/s100_hdc1001.c \
${ALTAIRZ80D}/s100_if3.c ${ALTAIRZ80D}/s100_adcs6.c
-ALTAIRZ80_OPT = -I ${ALTAIRZ80D}
+ALTAIRZ80_OPT = -I ${ALTAIRZ80D} -D HAVE_VM_INIT
GRID = GRI