DescriptionStig M. Halvorsen
2014-02-10 07:58:00 EST
Windows 7/8, MinGW, CC=clang. Clang v.3.4 (198054):
----------
DED_CC code/server/sv_bot.c
clang.exe: error: unknown argument: '-falign-loops=2'
clang.exe: error: unknown argument: '-falign-jumps=2'
make[2]: *** [build/release-mingw32-x86/ded/sv_bot.o] Error 1
----------
And:
----------
LD build/release-mingw32-x86/openarena.x86.exe
clang.exe: error: unknown argument: '-mwindows'
make[2]: *** [build/release-mingw32-x86/openarena.x86.exe] Error 1
----------
The support for an optional compiler (CC) is a bit contra intuitive if the Makefile contains GCC specific flags, or am I wrong? This can anyways be fixed by changing the following in the Makefile under the mingw setup
--------------
Makefile l.556
--------------
ifeq ($(ARCH),x86_64)
OPTIMIZEVM = -O3 -fno-omit-frame-pointer \
-funroll-loops -falign-functions=2 \
-fstrength-reduce
ifeq ($(CC),gcc)
OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
endif
OPTIMIZE = $(OPTIMIZEVM) --fast-math
HAVE_VM_COMPILED = true
endif
----------
---------------------------------------------
Makefile l. 588 (after fix above, else l.585)
---------------------------------------------
ifeq ($(CC),gcc)
CLIENT_LDFLAGS += -mwindows
endif
----------
It can optionally be set to use the flags unless it is Clang; ifneq($(CC), clang).
Comment 1Stig M. Halvorsen
2014-02-10 07:59:03 EST
NB: I know my output states openarena, but it is the same in ioquake3's Makefile.
Windows 7/8, MinGW, CC=clang. Clang v.3.4 (198054): ---------- DED_CC code/server/sv_bot.c clang.exe: error: unknown argument: '-falign-loops=2' clang.exe: error: unknown argument: '-falign-jumps=2' make[2]: *** [build/release-mingw32-x86/ded/sv_bot.o] Error 1 ---------- And: ---------- LD build/release-mingw32-x86/openarena.x86.exe clang.exe: error: unknown argument: '-mwindows' make[2]: *** [build/release-mingw32-x86/openarena.x86.exe] Error 1 ---------- The support for an optional compiler (CC) is a bit contra intuitive if the Makefile contains GCC specific flags, or am I wrong? This can anyways be fixed by changing the following in the Makefile under the mingw setup -------------- Makefile l.556 -------------- ifeq ($(ARCH),x86_64) OPTIMIZEVM = -O3 -fno-omit-frame-pointer \ -funroll-loops -falign-functions=2 \ -fstrength-reduce ifeq ($(CC),gcc) OPTIMIZEVM += -falign-loops=2 -falign-jumps=2 endif OPTIMIZE = $(OPTIMIZEVM) --fast-math HAVE_VM_COMPILED = true endif ---------- --------------------------------------------- Makefile l. 588 (after fix above, else l.585) --------------------------------------------- ifeq ($(CC),gcc) CLIENT_LDFLAGS += -mwindows endif ---------- It can optionally be set to use the flags unless it is Clang; ifneq($(CC), clang).