Fix CLANG=1 NOASM=1 build.

git-svn-id: https://svn.eduke32.com/eduke32@3292 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-12-14 19:28:20 +00:00
parent c93096e938
commit d7132e587f
2 changed files with 4 additions and 2 deletions

View file

@ -332,6 +332,7 @@ else
ifneq (0,$(CLANG))
# CLANG_MAJOR := $(shell clang -dM -E -x c /dev/null | grep __clang_major__ | awk '{ print $$3 }')
# KEEPINSYNC with build/Makefile:
BASECFLAGS+= -Xclang -fcatch-undefined-behavior
# ifeq ($(CLANG_MAJOR),3)
# debug+= -faddress-sanitizer

View file

@ -287,10 +287,11 @@ $(OBJ)/%.$o: $(SRC)/%.nasm
$(COMPILE_STATUS)
if $(AS) $(OURASFLAGS) $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
# comment out to debug a-c.o
# Comment out the following rule to debug a-c.o
$(OBJ)/a-c.$o: $(SRC)/a-c.c
$(COMPILE_STATUS)
if $(COMPILER) $(subst -O0,-O2,$(subst -fcatch-undefined-behavior,,$(OURCFLAGS))) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(subst -O0,-O2,$(subst -Xclang -fcatch-undefined-behavior,,$(OURCFLAGS))) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
# KEEPINSYNC the "... -fcatch-undefined-behavior" with Makefile.common
$(OBJ)/%.$o: $(SRC)/%.c
$(COMPILE_STATUS)