Skip to content

Commit 42c2687

Browse files
committed
Fix setting of USECLANG/USEGCC
Move the unconditional `?=` definitions below all conditional definitions so that conditional `?=`s can take precedence. Also forcibly set `USEGCC=0` when `USECLANG=1`, otherwise the things guarded behind `USEGCC=1` will be visible. Without these changes, `gmake` on FreeBSD AArch64 incorrectly uses gcc instead of clang.
1 parent ca166a0 commit 42c2687

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Make.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ endif
2828
# Just Run: make clean && make coverage -j
2929
CODE_COVERAGE ?= 0
3030

31-
USEGCC ?= 1
32-
USECLANG ?= 0
33-
TOOLPREFIX ?=
34-
3531
ifneq (,$(findstring $(OS),Darwin FreeBSD OpenBSD))
3632
USEGCC ?= 0
3733
USECLANG ?= 1
@@ -49,10 +45,14 @@ USEGCC = 0
4945
TOOLPREFIX = llvm-
5046
endif
5147

48+
USEGCC ?= 1
49+
USECLANG ?= 0
50+
TOOLPREFIX ?=
51+
5252
AR := $(TOOLPREFIX)ar
5353

5454
ifeq ($(USECLANG),1)
55-
USEGCC ?= 0
55+
USEGCC = 0
5656
CC = clang
5757
CFLAGS_add += -fno-builtin -fno-strict-aliasing
5858
endif

0 commit comments

Comments
 (0)