diff --git a/sys/pic32/Makefile.kconf b/sys/pic32/Makefile.kconf index f092782..5ecea92 100644 --- a/sys/pic32/Makefile.kconf +++ b/sys/pic32/Makefile.kconf @@ -3,19 +3,19 @@ # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = $(LLVMBIN)/clang -target mipsel -mcpu=mips32r2 ${DEBUG} +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} CC = -mabi=o32 -mfloat-abi=soft \ -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include -CC = $(LLVMBIN)/clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ ${DEBUG} -nostdinc -fno-builtin -Werror -Wall -CPP = $(LLVMBIN)/clang-cpp +CPP = $(LLVMBIN)clang-cpp LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = $(LLVMBIN)/llvm-size -OBJCOPY = $(LLVMBIN)/llvm-objcopy -OBJDUMP = $(LLVMBIN)/llvm-objdump +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/baremetal/Makefile b/sys/pic32/baremetal/Makefile index 5fc6d6e..aadde66 100644 --- a/sys/pic32/baremetal/Makefile +++ b/sys/pic32/baremetal/Makefile @@ -18,20 +18,19 @@ LDSCRIPT = "baremetal/script.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/gcc-config.mk b/sys/pic32/clang-config.mk similarity index 100% rename from sys/pic32/gcc-config.mk rename to sys/pic32/clang-config.mk diff --git a/sys/pic32/duinomite-emega/Makefile b/sys/pic32/duinomite-emega/Makefile index b0f7e72..45e797c 100644 --- a/sys/pic32/duinomite-emega/Makefile +++ b/sys/pic32/duinomite-emega/Makefile @@ -27,20 +27,19 @@ LDSCRIPT = "maximite/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/duinomite/Makefile b/sys/pic32/duinomite/Makefile index e4fa976..320e84f 100644 --- a/sys/pic32/duinomite/Makefile +++ b/sys/pic32/duinomite/Makefile @@ -40,20 +40,19 @@ LDSCRIPT = "maximite/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/explorer16/Makefile b/sys/pic32/explorer16/Makefile index 4f76960..5783903 100644 --- a/sys/pic32/explorer16/Makefile +++ b/sys/pic32/explorer16/Makefile @@ -28,20 +28,19 @@ LDSCRIPT = "baremetal/script.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/fubarino/Makefile b/sys/pic32/fubarino/Makefile index a35bd27..f2af71c 100644 --- a/sys/pic32/fubarino/Makefile +++ b/sys/pic32/fubarino/Makefile @@ -27,20 +27,19 @@ LDSCRIPT = "max32/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/max32/Makefile b/sys/pic32/max32/Makefile index bd0eb5d..946b394 100644 --- a/sys/pic32/max32/Makefile +++ b/sys/pic32/max32/Makefile @@ -27,20 +27,19 @@ LDSCRIPT = "max32/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/maximite-color/Makefile b/sys/pic32/maximite-color/Makefile index ee1d756..a7ac220 100644 --- a/sys/pic32/maximite-color/Makefile +++ b/sys/pic32/maximite-color/Makefile @@ -26,20 +26,19 @@ LDSCRIPT = "maximite-color/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/maximite/Makefile b/sys/pic32/maximite/Makefile index bf41556..53c2849 100644 --- a/sys/pic32/maximite/Makefile +++ b/sys/pic32/maximite/Makefile @@ -26,20 +26,19 @@ LDSCRIPT = "maximite/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/mmb-mx7/Makefile b/sys/pic32/mmb-mx7/Makefile index afea736..9e78b8f 100644 --- a/sys/pic32/mmb-mx7/Makefile +++ b/sys/pic32/mmb-mx7/Makefile @@ -30,20 +30,19 @@ LDSCRIPT = "mmb-mx7/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/picadillo/Makefile b/sys/pic32/picadillo/Makefile index 09c6c9e..3626ce1 100644 --- a/sys/pic32/picadillo/Makefile +++ b/sys/pic32/picadillo/Makefile @@ -26,20 +26,19 @@ LDSCRIPT = "max32/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/pinguino-micro/Makefile b/sys/pic32/pinguino-micro/Makefile index f545484..aeda789 100644 --- a/sys/pic32/pinguino-micro/Makefile +++ b/sys/pic32/pinguino-micro/Makefile @@ -26,20 +26,19 @@ LDSCRIPT = "maximite/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/sdxl/Makefile b/sys/pic32/sdxl/Makefile index 9752905..96d460a 100644 --- a/sys/pic32/sdxl/Makefile +++ b/sys/pic32/sdxl/Makefile @@ -26,20 +26,19 @@ LDSCRIPT = "max32/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/snadpic/Makefile b/sys/pic32/snadpic/Makefile index 4104a54..f5b038e 100644 --- a/sys/pic32/snadpic/Makefile +++ b/sys/pic32/snadpic/Makefile @@ -26,20 +26,19 @@ LDSCRIPT = "maximite/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/starter-kit/Makefile b/sys/pic32/starter-kit/Makefile index 71aa999..9c1fd38 100644 --- a/sys/pic32/starter-kit/Makefile +++ b/sys/pic32/starter-kit/Makefile @@ -26,20 +26,19 @@ LDSCRIPT = "baremetal/script.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/ubw32/Makefile b/sys/pic32/ubw32/Makefile index 069619f..e7a776d 100644 --- a/sys/pic32/ubw32/Makefile +++ b/sys/pic32/ubw32/Makefile @@ -29,20 +29,19 @@ LDSCRIPT = "ubw32/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../.. diff --git a/sys/pic32/wf32/Makefile b/sys/pic32/wf32/Makefile index 10d6819..d6e8784 100644 --- a/sys/pic32/wf32/Makefile +++ b/sys/pic32/wf32/Makefile @@ -40,20 +40,19 @@ LDSCRIPT = "max32/bootloader.ld" # # DEBUG is set to -g by kconfig if debugging is requested (kconfig -g). # -include ../gcc-config.mk +include ../clang-config.mk -AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL -CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall -CPP = ${MIPS_GCC_PREFIX}cpp -LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL +AS = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 ${DEBUG} +CC = -mabi=o32 -mfloat-abi=soft \ + -nostdinc -fshort-double -fomit-frame-pointer -finline-hint-functions -I$(TOPSRC)/include +CC = $(LLVMBIN)clang -target mipsel -mcpu=mips32r2 -mabi=o32 -mfloat-abi=soft \ + ${DEBUG} -nostdinc -fno-builtin -Werror -Wall +CPP = $(LLVMBIN)clang-cpp +LD = /usr/lib/llvm-12/bin/ld.lld -m elf32ltsmip LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map -SIZE = ${MIPS_GCC_PREFIX}size -OBJCOPY = ${MIPS_GCC_PREFIX}objcopy -OBJDUMP = ${MIPS_GCC_PREFIX}objdump - -ifneq (${MIPS_GCC_FORMAT},) - LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} -endif +SIZE = $(LLVMBIN)llvm-size +OBJCOPY = $(LLVMBIN)llvm-objcopy +OBJDUMP = $(LLVMBIN)llvm-objdump # sources are located via $S relative to the compilation directory S = ../..