software/libc/Makefile: Use proper CFLAGS to avoid picolibc warnings and cleanup a bit Makefile.

This commit is contained in:
Florent Kermarrec 2021-09-27 13:57:44 +02:00
parent c0b54f0105
commit ae1d43b965

View file

@ -5,6 +5,9 @@ all: libc.a stdio.c.o missing.c.o
CPUFAMILY= CPUFAMILY=
CFLAGS = $(COMMONFLAGS) -fexceptions -Wpragmas
# FIXME: Generate from Python.
ifneq ($(findstring $(CPU), serv femtorv picorv32 minerva vexriscv vexriscv_smp ibex cv32e40p rocket blackparrot),) ifneq ($(findstring $(CPU), serv femtorv picorv32 minerva vexriscv vexriscv_smp ibex cv32e40p rocket blackparrot),)
CPUFAMILY = riscv CPUFAMILY = riscv
else ifeq ($(CPU), lm32) else ifeq ($(CPU), lm32)
@ -22,20 +25,20 @@ endif
define CROSSFILE define CROSSFILE
[binaries] [binaries]
c = '$(TRIPLE)-gcc' c = '$(TRIPLE)-gcc'
ar = '$(TRIPLE)-gcc-ar' ar = '$(TRIPLE)-gcc-ar'
as = '$(TRIPLE)-as' as = '$(TRIPLE)-as'
nm = '$(TRIPLE)-gcc-nm' nm = '$(TRIPLE)-gcc-nm'
strip = '$(TRIPLE)-strip' strip = '$(TRIPLE)-strip'
[host_machine] [host_machine]
system = 'unknown' system = 'unknown'
cpu_family = '$(CPUFAMILY)' cpu_family = '$(CPUFAMILY)'
cpu = '$(CPU)' cpu = '$(CPU)'
endian = '$(CPUENDIANNESS)' endian = '$(CPUENDIANNESS)'
[built-in options] [built-in options]
c_args = [ $(foreach flag,$(filter-out $(DEPFLAGS) -flto,$(CFLAGS)),'$(flag)',) ] c_args = [ $(foreach flag,$(filter-out $(DEPFLAGS) -flto,$(CFLAGS)),'$(flag)',) ]
c_link_args = [ $(foreach flag,$(filter-out -flto,$(LDFLAGS)),'$(flag)',) ] c_link_args = [ $(foreach flag,$(filter-out -flto,$(LDFLAGS)),'$(flag)',) ]
endef endef