Merge branch 'NetHack-3.7' into twitch-interact

This commit is contained in:
2026-04-23 20:37:34 -07:00
22 changed files with 270 additions and 142 deletions

View File

@@ -14,7 +14,7 @@ CCFLAGS = -g
#If you want to force use of one particular set of compilers, do it
#here, ahead of the detection, so that the detection will match your
#choice and set variables CCISCLANG, GCCGTEQ, CLANGPPGTEQ9 etc.
#choice and set variables CCISCLANG, CCISGCC, GCCGTEQ, CLANGPPGTEQ9 etc.
#accordingly.
#
#CC= gcc
@@ -41,7 +41,7 @@ endif
# If you want to override the compiler detection just carried out
# uncomment one of the following pairs. Note, however, that
# doing this after the detection above will likely result in
# mismatched variable values for CCISCLANG, GCCGTEQ, CLANGPPGTEQ9 etc.
# mismatched variable values for CCISCLANG, CCISGCC, GCCGTEQ, CLANGPPGTEQ9 etc.
#
#CC= gcc
#CXX= g++ -std-gnu++11
@@ -72,8 +72,17 @@ CFLAGS+=-Wstrict-prototypes
CFLAGS+=-Wnonnull
#detection of clang vs gcc
CCISCLANG := $(shell echo `$(CC) --version` | grep clang)
ifeq "$(CCISCLANG)" ""
CCTEST := $(shell echo `$(CC) --version` | grep clang)
ifneq "$(CCTEST)" ""
CCISCLANG=1
CCISGCC=
else
CCISCLANG=
CCISGCC=1
endif
#$(info CCISCLANG=$(CCISCLANG), CCISGCC=$(CCISGCC))
ifeq "$(CCISGCC)" "1"
# gcc-specific follows
CXX=g++ -std=gnu++11
# get the version of gcc
@@ -95,8 +104,8 @@ CFLAGS+=-Wimplicit-fallthrough
#endif
# end of gcc-specific
else # gcc or clang?
CXX=clang++ -std=gnu++11
# clang-specific follows
CXX=clang++ -std=gnu++11
CLANGGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
CLANGGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
CLANGGTEQ21 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 21)

View File

@@ -415,7 +415,7 @@ endif
SYSCFLAGS=-DLUA_USE_LINUX
ifdef GITSUBMODULES
LUAFLAGS=CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)'
ifneq "$(CCISCLANG)" ""
ifeq "$(CCISCLANG)" "1"
# clang
LUAFLAGS +=CWARNGCC=''
endif # clang

View File

@@ -338,7 +338,7 @@ endif # WANT_LIBNH
# this needs to be passed via make rather than defined in unixconf.h
ifdef GITSUBMODULES
LUAFLAGS=CC='$(CC)' MYCFLAGS=' -DLUA_USE_MACOSX'
ifneq "$(CCISCLANG)" ""
ifeq "$(CCISCLANG)" "1"
# clang
LUAFLAGS +=CWARNGCC=''
endif # clang

View File

@@ -123,10 +123,6 @@ main(int argc, char *argv[])
dir = nh_getenv("HACKDIR");
#endif /* CHDIR */
program_state.early_options = 1;
#ifdef ENHANCED_SYMBOLS
if (argcheck(argc, argv, ARG_DUMPGLYPHIDS) == 2)
exit(EXIT_SUCCESS);
#endif
/* handle -dalthackdir, -s <score stuff>, --version, --showpaths */
early_options(&argc, &argv, &dir);
program_state.early_options = 0;