common.mak: use clang/clang++ to compile C/C++ sources.
Note that -integrated-as is not active by default on OR1K, so we're still shelling out to binutils to assemble. It is not yet possible to build everything using -integrated-as.
This commit is contained in:
parent
0f47876d2e
commit
69c2a705bf
|
@ -1,19 +1,20 @@
|
||||||
include $(MSCDIR)/software/include/generated/cpu.mak
|
include $(MSCDIR)/software/include/generated/cpu.mak
|
||||||
TARGET_PREFIX=$(CPU)-elf-
|
TRIPLE=$(CPU)-elf
|
||||||
|
TARGET_PREFIX=$(TRIPLE)-
|
||||||
|
|
||||||
RM ?= rm -f
|
RM ?= rm -f
|
||||||
|
|
||||||
CC_normal := $(TARGET_PREFIX)gcc
|
CC_normal := clang -target $(TRIPLE)
|
||||||
CX_normal := $(TARGET_PREFIX)g++
|
CX_normal := clang++ -target $(TRIPLE)
|
||||||
AR_normal := $(TARGET_PREFIX)ar
|
AR_normal := $(TARGET_PREFIX)ar
|
||||||
LD_normal := $(TARGET_PREFIX)ld
|
LD_normal := $(TARGET_PREFIX)ld
|
||||||
OBJCOPY_normal := $(TARGET_PREFIX)objcopy
|
OBJCOPY_normal := $(TARGET_PREFIX)objcopy
|
||||||
|
|
||||||
CC_quiet = @echo " CC " $@ && $(TARGET_PREFIX)gcc
|
CC_quiet = @echo " CC " $@ && $(CC_normal)
|
||||||
CX_quiet = @echo " CX " $@ && $(TARGET_PREFIX)g++
|
CX_quiet = @echo " CX " $@ && $(CX_normal)
|
||||||
AR_quiet = @echo " AR " $@ && $(TARGET_PREFIX)ar
|
AR_quiet = @echo " AR " $@ && $(AR_normal)
|
||||||
LD_quiet = @echo " LD " $@ && $(TARGET_PREFIX)ld
|
LD_quiet = @echo " LD " $@ && $(LD_normal)
|
||||||
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(TARGET_PREFIX)objcopy
|
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(OBJCOPY_normal)
|
||||||
|
|
||||||
MSC_GIT_ID := $(shell cd $(MSCDIR) && python3 -c "from misoclib.cpu.identifier import get_id; print(hex(get_id()), end='')")
|
MSC_GIT_ID := $(shell cd $(MSCDIR) && python3 -c "from misoclib.cpu.identifier import get_id; print(hex(get_id()), end='')")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue