software: revert LTO changes (Disable it).
It seems LTO is not yet fully working with all configurations, so it's better reverting the changes for now. - cause issues with LM32 available compilers. - seems to cause issues with min/lite variant of VexRiscv. - seems to cause issues with some litex-buildenv configurations. (see https://github.com/enjoy-digital/litex/issues/417).
This commit is contained in:
parent
bb8905fa5d
commit
979f98ea31
|
@ -29,7 +29,7 @@ bios.elf: $(BIOS_DIRECTORY)/linker.ld $(OBJECTS)
|
|||
|
||||
|
||||
%.elf: ../libbase/crt0-$(CPU)-ctr.o ../libnet/libnet.a ../libbase/libbase-nofloat.a ../libcompiler_rt/libcompiler_rt.a
|
||||
$(CC) $(LDFLAGS) -T $(BIOS_DIRECTORY)/linker.ld -N -o $@ \
|
||||
$(LD) $(LDFLAGS) -T $(BIOS_DIRECTORY)/linker.ld -N -o $@ \
|
||||
../libbase/crt0-$(CPU)-ctr.o \
|
||||
$(OBJECTS) \
|
||||
-L../libnet \
|
||||
|
|
|
@ -7,24 +7,14 @@ endif
|
|||
RM ?= rm -f
|
||||
PYTHON ?= python3
|
||||
|
||||
ifeq ($(CPU), lm32)
|
||||
LTO = 0
|
||||
else
|
||||
LTO = 1
|
||||
endif
|
||||
|
||||
ifeq ($(CLANG), 1)
|
||||
ifeq ($(CLANG),1)
|
||||
CC_normal := clang -target $(TRIPLE) -integrated-as
|
||||
CX_normal := clang++ -target $(TRIPLE) -integrated-as
|
||||
else
|
||||
CC_normal := $(TARGET_PREFIX)gcc -std=gnu99
|
||||
CX_normal := $(TARGET_PREFIX)g++
|
||||
endif
|
||||
ifeq ($(LTO), 1)
|
||||
AR_normal := $(TARGET_PREFIX)gcc-ar
|
||||
else
|
||||
AR_normal := $(TARGET_PREFIX)ar
|
||||
endif
|
||||
LD_normal := $(TARGET_PREFIX)ld
|
||||
OBJCOPY_normal := $(TARGET_PREFIX)objcopy
|
||||
|
||||
|
@ -34,7 +24,7 @@ AR_quiet = @echo " AR " $@ && $(AR_normal)
|
|||
LD_quiet = @echo " LD " $@ && $(LD_normal)
|
||||
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(OBJCOPY_normal)
|
||||
|
||||
ifeq ($(V), 1)
|
||||
ifeq ($(V),1)
|
||||
CC = $(CC_normal)
|
||||
CX = $(CX_normal)
|
||||
AR = $(AR_normal)
|
||||
|
@ -57,13 +47,9 @@ DEPFLAGS += -MD -MP
|
|||
#
|
||||
INCLUDES = -I$(SOC_DIRECTORY)/software/include/base -I$(SOC_DIRECTORY)/software/include -I$(SOC_DIRECTORY)/common -I$(BUILDINC_DIRECTORY)
|
||||
COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES)
|
||||
COMMONFLAGS += -ffunction-sections -fdata-sections -nostartfiles -nostdlib -nodefaultlibs
|
||||
ifeq ($(LTO), 1)
|
||||
COMMONFLAGS += -flto -fuse-linker-plugin
|
||||
endif
|
||||
CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
|
||||
CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding
|
||||
LDFLAGS = -nostdlib -nodefaultlibs -Os $(CPUFLAGS) -L$(BUILDINC_DIRECTORY)
|
||||
LDFLAGS = -nostdlib -nodefaultlibs -L$(BUILDINC_DIRECTORY)
|
||||
|
||||
define compilexx
|
||||
$(CX) -c $(CXXFLAGS) $(1) $< -o $@
|
||||
|
|
Loading…
Reference in New Issue