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
|
%.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 \
|
../libbase/crt0-$(CPU)-ctr.o \
|
||||||
$(OBJECTS) \
|
$(OBJECTS) \
|
||||||
-L../libnet \
|
-L../libnet \
|
||||||
|
|
|
@ -7,24 +7,14 @@ endif
|
||||||
RM ?= rm -f
|
RM ?= rm -f
|
||||||
PYTHON ?= python3
|
PYTHON ?= python3
|
||||||
|
|
||||||
ifeq ($(CPU), lm32)
|
ifeq ($(CLANG),1)
|
||||||
LTO = 0
|
|
||||||
else
|
|
||||||
LTO = 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CLANG), 1)
|
|
||||||
CC_normal := clang -target $(TRIPLE) -integrated-as
|
CC_normal := clang -target $(TRIPLE) -integrated-as
|
||||||
CX_normal := clang++ -target $(TRIPLE) -integrated-as
|
CX_normal := clang++ -target $(TRIPLE) -integrated-as
|
||||||
else
|
else
|
||||||
CC_normal := $(TARGET_PREFIX)gcc -std=gnu99
|
CC_normal := $(TARGET_PREFIX)gcc -std=gnu99
|
||||||
CX_normal := $(TARGET_PREFIX)g++
|
CX_normal := $(TARGET_PREFIX)g++
|
||||||
endif
|
endif
|
||||||
ifeq ($(LTO), 1)
|
|
||||||
AR_normal := $(TARGET_PREFIX)gcc-ar
|
|
||||||
else
|
|
||||||
AR_normal := $(TARGET_PREFIX)ar
|
AR_normal := $(TARGET_PREFIX)ar
|
||||||
endif
|
|
||||||
LD_normal := $(TARGET_PREFIX)ld
|
LD_normal := $(TARGET_PREFIX)ld
|
||||||
OBJCOPY_normal := $(TARGET_PREFIX)objcopy
|
OBJCOPY_normal := $(TARGET_PREFIX)objcopy
|
||||||
|
|
||||||
|
@ -34,7 +24,7 @@ AR_quiet = @echo " AR " $@ && $(AR_normal)
|
||||||
LD_quiet = @echo " LD " $@ && $(LD_normal)
|
LD_quiet = @echo " LD " $@ && $(LD_normal)
|
||||||
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(OBJCOPY_normal)
|
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(OBJCOPY_normal)
|
||||||
|
|
||||||
ifeq ($(V), 1)
|
ifeq ($(V),1)
|
||||||
CC = $(CC_normal)
|
CC = $(CC_normal)
|
||||||
CX = $(CX_normal)
|
CX = $(CX_normal)
|
||||||
AR = $(AR_normal)
|
AR = $(AR_normal)
|
||||||
|
@ -55,15 +45,11 @@ DEPFLAGS += -MD -MP
|
||||||
|
|
||||||
# Toolchain options
|
# Toolchain options
|
||||||
#
|
#
|
||||||
INCLUDES = -I$(SOC_DIRECTORY)/software/include/base -I$(SOC_DIRECTORY)/software/include -I$(SOC_DIRECTORY)/common -I$(BUILDINC_DIRECTORY)
|
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 = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES)
|
||||||
COMMONFLAGS += -ffunction-sections -fdata-sections -nostartfiles -nostdlib -nodefaultlibs
|
CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
|
||||||
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
|
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
|
define compilexx
|
||||||
$(CX) -c $(CXXFLAGS) $(1) $< -o $@
|
$(CX) -c $(CXXFLAGS) $(1) $< -o $@
|
||||||
|
|
Loading…
Reference in New Issue